hotspot/src/share/vm/oops/constantPoolOop.hpp
changeset 1894 5c343868d071
parent 1550 be2fc37a817f
child 2105 347008ce7984
equal deleted inserted replaced
1893:c82e388e17c5 1894:5c343868d071
    41   typeArrayOop         _tags; // the tag array describing the constant pool's contents
    41   typeArrayOop         _tags; // the tag array describing the constant pool's contents
    42   constantPoolCacheOop _cache;         // the cache holding interpreter runtime information
    42   constantPoolCacheOop _cache;         // the cache holding interpreter runtime information
    43   klassOop             _pool_holder;   // the corresponding class
    43   klassOop             _pool_holder;   // the corresponding class
    44   int                  _flags;         // a few header bits to describe contents for GC
    44   int                  _flags;         // a few header bits to describe contents for GC
    45   int                  _length; // number of elements in the array
    45   int                  _length; // number of elements in the array
       
    46   volatile bool        _is_conc_safe; // if true, safe for concurrent
       
    47                                       // GC processing
    46   // only set to non-zero if constant pool is merged by RedefineClasses
    48   // only set to non-zero if constant pool is merged by RedefineClasses
    47   int                  _orig_length;
    49   int                  _orig_length;
    48 
    50 
    49   void set_tags(typeArrayOop tags)             { oop_store_without_check((oop*)&_tags, tags); }
    51   void set_tags(typeArrayOop tags)             { oop_store_without_check((oop*)&_tags, tags); }
    50   void tag_at_put(int which, jbyte t)          { tags()->byte_at_put(which, t); }
    52   void tag_at_put(int which, jbyte t)          { tags()->byte_at_put(which, t); }
   376   }
   378   }
   377 
   379 
   378   static int header_size()             { return sizeof(constantPoolOopDesc)/HeapWordSize; }
   380   static int header_size()             { return sizeof(constantPoolOopDesc)/HeapWordSize; }
   379   static int object_size(int length)   { return align_object_size(header_size() + length); }
   381   static int object_size(int length)   { return align_object_size(header_size() + length); }
   380   int object_size()                    { return object_size(length()); }
   382   int object_size()                    { return object_size(length()); }
       
   383 
       
   384   bool is_conc_safe()                  { return _is_conc_safe; }
       
   385   void set_is_conc_safe(bool v)        { _is_conc_safe = v; }
   381 
   386 
   382   friend class constantPoolKlass;
   387   friend class constantPoolKlass;
   383   friend class ClassFileParser;
   388   friend class ClassFileParser;
   384   friend class SystemDictionary;
   389   friend class SystemDictionary;
   385 
   390