< prev index next >

src/share/vm/ci/ciObject.cpp

Print this page
rev 12854 : [mq]: gcinterface.patch


 180     // embeddable but there's no easy way to distinguish the interned
 181     // from the regulars ones so just treat them all that way.
 182     if (klass() == env->String_klass() || klass() == env->Class_klass()) {
 183       return true;
 184     }
 185   if (klass()->is_subclass_of(env->MethodHandle_klass()) ||
 186       klass()->is_subclass_of(env->CallSite_klass())) {
 187     assert(ScavengeRootsInCode >= 1, "must be");
 188     // We want to treat these aggressively.
 189     return true;
 190   }
 191 
 192   return handle() == NULL;
 193 }
 194 
 195 // ------------------------------------------------------------------
 196 // ciObject::should_be_constant()
 197 void ciObject::init_flags_from(oop x) {
 198   int flags = 0;
 199   if (x != NULL) {
 200     assert(Universe::heap()->is_in_reserved(x), "must be");
 201     if (x->is_scavengable())
 202       flags |= SCAVENGABLE_FLAG;
 203   }
 204   _ident |= flags;
 205 }
 206 
 207 // ------------------------------------------------------------------
 208 // ciObject::print
 209 //
 210 // Print debugging output about this ciObject.
 211 //
 212 // Implementation note: dispatch to the virtual print_impl behavior
 213 // for this ciObject.
 214 void ciObject::print(outputStream* st) {
 215   st->print("<%s", type_string());
 216   GUARDED_VM_ENTRY(print_impl(st);)
 217   st->print(" ident=%d %s address=" INTPTR_FORMAT ">", ident(),
 218         is_scavengable() ? "SCAVENGABLE" : "",
 219         p2i((address)this));
 220 }


 180     // embeddable but there's no easy way to distinguish the interned
 181     // from the regulars ones so just treat them all that way.
 182     if (klass() == env->String_klass() || klass() == env->Class_klass()) {
 183       return true;
 184     }
 185   if (klass()->is_subclass_of(env->MethodHandle_klass()) ||
 186       klass()->is_subclass_of(env->CallSite_klass())) {
 187     assert(ScavengeRootsInCode >= 1, "must be");
 188     // We want to treat these aggressively.
 189     return true;
 190   }
 191 
 192   return handle() == NULL;
 193 }
 194 
 195 // ------------------------------------------------------------------
 196 // ciObject::should_be_constant()
 197 void ciObject::init_flags_from(oop x) {
 198   int flags = 0;
 199   if (x != NULL) {
 200     assert(GC::gc()->heap()->is_in_reserved(x), "must be");
 201     if (x->is_scavengable())
 202       flags |= SCAVENGABLE_FLAG;
 203   }
 204   _ident |= flags;
 205 }
 206 
 207 // ------------------------------------------------------------------
 208 // ciObject::print
 209 //
 210 // Print debugging output about this ciObject.
 211 //
 212 // Implementation note: dispatch to the virtual print_impl behavior
 213 // for this ciObject.
 214 void ciObject::print(outputStream* st) {
 215   st->print("<%s", type_string());
 216   GUARDED_VM_ENTRY(print_impl(st);)
 217   st->print(" ident=%d %s address=" INTPTR_FORMAT ">", ident(),
 218         is_scavengable() ? "SCAVENGABLE" : "",
 219         p2i((address)this));
 220 }
< prev index next >