hotspot/src/share/vm/code/nmethod.hpp
changeset 6268 9e96dde307e9
parent 6187 4fa7845f7c14
child 6418 6671edbd230e
equal deleted inserted replaced
6188:95ea4d66089a 6268:9e96dde307e9
   175   unsigned int _has_method_handle_invokes:1; // Has this method MethodHandle invokes?
   175   unsigned int _has_method_handle_invokes:1; // Has this method MethodHandle invokes?
   176 
   176 
   177   // Protected by Patching_lock
   177   // Protected by Patching_lock
   178   unsigned char _state;                      // {alive, not_entrant, zombie, unloaded)
   178   unsigned char _state;                      // {alive, not_entrant, zombie, unloaded)
   179 
   179 
       
   180 #ifdef ASSERT
       
   181   bool _oops_are_stale;  // indicates that it's no longer safe to access oops section
       
   182 #endif
       
   183 
   180   enum { alive        = 0,
   184   enum { alive        = 0,
   181          not_entrant  = 1, // uncommon trap has happened but activations may still exist
   185          not_entrant  = 1, // uncommon trap has happened but activations may still exist
   182          zombie       = 2,
   186          zombie       = 2,
   183          unloaded     = 3 };
   187          unloaded     = 3 };
   184 
   188 
   432   // Note: index 0 is reserved for null.
   436   // Note: index 0 is reserved for null.
   433   oop   oop_at(int index) const                   { return index == 0 ? (oop) NULL: *oop_addr_at(index); }
   437   oop   oop_at(int index) const                   { return index == 0 ? (oop) NULL: *oop_addr_at(index); }
   434   oop*  oop_addr_at(int index) const {  // for GC
   438   oop*  oop_addr_at(int index) const {  // for GC
   435     // relocation indexes are biased by 1 (because 0 is reserved)
   439     // relocation indexes are biased by 1 (because 0 is reserved)
   436     assert(index > 0 && index <= oops_size(), "must be a valid non-zero index");
   440     assert(index > 0 && index <= oops_size(), "must be a valid non-zero index");
       
   441     assert(!_oops_are_stale, "oops are stale");
   437     return &oops_begin()[index - 1];
   442     return &oops_begin()[index - 1];
   438   }
   443   }
   439 
   444 
   440   void copy_oops(GrowableArray<jobject>* oops);
   445   void copy_oops(GrowableArray<jobject>* oops);
   441 
   446