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