< prev index next >

src/share/vm/oops/constantPool.cpp

Print this page




 113   log_trace(cds)("Iter(ConstantPool): %p", this);
 114 
 115   it->push(&_tags, MetaspaceClosure::_writable);
 116   it->push(&_cache);
 117   it->push(&_pool_holder);
 118   it->push(&_operands);
 119   it->push(&_resolved_klasses, MetaspaceClosure::_writable);
 120 
 121   for (int i = 0; i < length(); i++) {
 122     // The only MSO's embedded in the CP entries are Symbols:
 123     //   JVM_CONSTANT_String (normal and pseudo)
 124     //   JVM_CONSTANT_Utf8
 125     constantTag ctag = tag_at(i);
 126     if (ctag.is_string() || ctag.is_utf8()) {
 127       it->push(symbol_at_addr(i));
 128     }
 129   }
 130 }
 131 
 132 objArrayOop ConstantPool::resolved_references() const {
 133   return (objArrayOop)JNIHandles::resolve(_cache->resolved_references());
 134 }
 135 
 136 // Create resolved_references array and mapping array for original cp indexes
 137 // The ldc bytecode was rewritten to have the resolved reference array index so need a way
 138 // to map it back for resolving and some unlikely miscellaneous uses.
 139 // The objects created by invokedynamic are appended to this list.
 140 void ConstantPool::initialize_resolved_references(ClassLoaderData* loader_data,
 141                                                   const intStack& reference_map,
 142                                                   int constant_pool_map_length,
 143                                                   TRAPS) {
 144   // Initialized the resolved object cache.
 145   int map_length = reference_map.length();
 146   if (map_length > 0) {
 147     // Only need mapping back to constant pool entries.  The map isn't used for
 148     // invokedynamic resolved_reference entries.  For invokedynamic entries,
 149     // the constant pool cache index has the mapping back to both the constant
 150     // pool and to the resolved reference index.
 151     if (constant_pool_map_length > 0) {
 152       Array<u2>* om = MetadataFactory::new_array<u2>(loader_data, constant_pool_map_length, CHECK);
 153 




 113   log_trace(cds)("Iter(ConstantPool): %p", this);
 114 
 115   it->push(&_tags, MetaspaceClosure::_writable);
 116   it->push(&_cache);
 117   it->push(&_pool_holder);
 118   it->push(&_operands);
 119   it->push(&_resolved_klasses, MetaspaceClosure::_writable);
 120 
 121   for (int i = 0; i < length(); i++) {
 122     // The only MSO's embedded in the CP entries are Symbols:
 123     //   JVM_CONSTANT_String (normal and pseudo)
 124     //   JVM_CONSTANT_Utf8
 125     constantTag ctag = tag_at(i);
 126     if (ctag.is_string() || ctag.is_utf8()) {
 127       it->push(symbol_at_addr(i));
 128     }
 129   }
 130 }
 131 
 132 objArrayOop ConstantPool::resolved_references() const {
 133   return (objArrayOop)_cache->resolved_references();
 134 }
 135 
 136 // Create resolved_references array and mapping array for original cp indexes
 137 // The ldc bytecode was rewritten to have the resolved reference array index so need a way
 138 // to map it back for resolving and some unlikely miscellaneous uses.
 139 // The objects created by invokedynamic are appended to this list.
 140 void ConstantPool::initialize_resolved_references(ClassLoaderData* loader_data,
 141                                                   const intStack& reference_map,
 142                                                   int constant_pool_map_length,
 143                                                   TRAPS) {
 144   // Initialized the resolved object cache.
 145   int map_length = reference_map.length();
 146   if (map_length > 0) {
 147     // Only need mapping back to constant pool entries.  The map isn't used for
 148     // invokedynamic resolved_reference entries.  For invokedynamic entries,
 149     // the constant pool cache index has the mapping back to both the constant
 150     // pool and to the resolved reference index.
 151     if (constant_pool_map_length > 0) {
 152       Array<u2>* om = MetadataFactory::new_array<u2>(loader_data, constant_pool_map_length, CHECK);
 153 


< prev index next >