< prev index next >

src/share/vm/oops/cpCache.hpp

Print this page

@@ -400,10 +400,17 @@
   friend class MetadataFactory;
  private:
   int             _length;
   ConstantPool*   _constant_pool;          // the corresponding constant pool
 
+  // The following fields need to be modified at runtime, so they cannot be
+  // stored in the ConstantPool, which is read-only.
+  // Array of resolved objects from the constant pool and map from resolved
+  // object index to original constant pool index
+  jobject              _resolved_references;
+  Array<u2>*           _reference_map;
+
   // Sizing
   debug_only(friend class ClassVerifier;)
 
   // Constructor
   ConstantPoolCache(int length,

@@ -429,10 +436,19 @@
                                      const intStack& invokedynamic_cp_cache_map,
                                      const intStack& invokedynamic_references_map, TRAPS);
   bool is_constantPoolCache() const { return true; }
 
   int length() const                             { return _length; }
+
+  jobject resolved_references()           { return _resolved_references; }
+  void set_resolved_references(jobject s) { _resolved_references = s; }
+  Array<u2>* reference_map() const        { return _reference_map; }
+  void set_reference_map(Array<u2>* o)    { _reference_map = o; }
+
+  // Assembly code support
+  static int resolved_references_offset_in_bytes() { return offset_of(ConstantPoolCache, _resolved_references); }
+
  private:
   void set_length(int length)                    { _length = length; }
 
   static int header_size()                       { return sizeof(ConstantPoolCache) / wordSize; }
   static int size(int length)                    { return align_metadata_size(header_size() + length * in_words(ConstantPoolCacheEntry::size())); }
< prev index next >