< prev index next >

src/hotspot/share/oops/cpCache.hpp

Print this page




 112 //            resolved_references array.
 113 //            (upcoming metadata changes will move the appendix to a separate array)
 114 // _f2      = vtable/itable index (or final Method*) for virtual calls only,
 115 //            unused by non-virtual.  The is_vfinal flag indicates this is a
 116 //            method pointer for a final method, not an index.
 117 // _flags   = method type info (t section),
 118 //            virtual final bit (vfinal),
 119 //            parameter size (psize section)
 120 //
 121 // Note: invokevirtual & invokespecial bytecodes can share the same constant
 122 //       pool entry and thus the same constant pool cache entry. All invoke
 123 //       bytecodes but invokevirtual use only _f1 and the corresponding b1
 124 //       bytecode, while invokevirtual uses only _f2 and the corresponding
 125 //       b2 bytecode.  The value of _flags is shared for both types of entries.
 126 //
 127 // The fields are volatile so that they are stored in the order written in the
 128 // source code.  The _indices field with the bytecode must be written last.
 129 
 130 class CallInfo;
 131 
 132 class ConstantPoolCacheEntry VALUE_OBJ_CLASS_SPEC {
 133   friend class VMStructs;
 134   friend class constantPoolCacheKlass;
 135   friend class ConstantPool;
 136   friend class InterpreterRuntime;
 137 
 138  private:
 139   volatile intx     _indices;  // constant pool index & rewrite bytecodes
 140   Metadata* volatile   _f1;       // entry specific metadata field
 141   volatile intx        _f2;       // entry specific int/metadata field
 142   volatile intx     _flags;    // flags
 143 
 144 
 145   void set_bytecode_1(Bytecodes::Code code);
 146   void set_bytecode_2(Bytecodes::Code code);
 147   void set_f1(Metadata* f1) {
 148     Metadata* existing_f1 = _f1; // read once
 149     assert(existing_f1 == NULL || existing_f1 == f1, "illegal field change");
 150     _f1 = f1;
 151   }
 152   void release_set_f1(Metadata* f1);




 112 //            resolved_references array.
 113 //            (upcoming metadata changes will move the appendix to a separate array)
 114 // _f2      = vtable/itable index (or final Method*) for virtual calls only,
 115 //            unused by non-virtual.  The is_vfinal flag indicates this is a
 116 //            method pointer for a final method, not an index.
 117 // _flags   = method type info (t section),
 118 //            virtual final bit (vfinal),
 119 //            parameter size (psize section)
 120 //
 121 // Note: invokevirtual & invokespecial bytecodes can share the same constant
 122 //       pool entry and thus the same constant pool cache entry. All invoke
 123 //       bytecodes but invokevirtual use only _f1 and the corresponding b1
 124 //       bytecode, while invokevirtual uses only _f2 and the corresponding
 125 //       b2 bytecode.  The value of _flags is shared for both types of entries.
 126 //
 127 // The fields are volatile so that they are stored in the order written in the
 128 // source code.  The _indices field with the bytecode must be written last.
 129 
 130 class CallInfo;
 131 
 132 class ConstantPoolCacheEntry {
 133   friend class VMStructs;
 134   friend class constantPoolCacheKlass;
 135   friend class ConstantPool;
 136   friend class InterpreterRuntime;
 137 
 138  private:
 139   volatile intx     _indices;  // constant pool index & rewrite bytecodes
 140   Metadata* volatile   _f1;       // entry specific metadata field
 141   volatile intx        _f2;       // entry specific int/metadata field
 142   volatile intx     _flags;    // flags
 143 
 144 
 145   void set_bytecode_1(Bytecodes::Code code);
 146   void set_bytecode_2(Bytecodes::Code code);
 147   void set_f1(Metadata* f1) {
 148     Metadata* existing_f1 = _f1; // read once
 149     assert(existing_f1 == NULL || existing_f1 == f1, "illegal field change");
 150     _f1 = f1;
 151   }
 152   void release_set_f1(Metadata* f1);


< prev index next >