< prev index next >

src/hotspot/share/oops/constantPool.cpp

Print this page




 287           // NULL is returned. Also set it in the array, so we won't
 288           // have a 'bad' reference in the archived resolved_reference
 289           // array.
 290           rr->obj_at_put(i, op);
 291         }
 292       }
 293     }
 294 
 295     oop archived = HeapShared::archive_heap_object(rr, THREAD);
 296     // If the resolved references array is not archived (too large),
 297     // the 'archived' object is NULL. No need to explicitly check
 298     // the return value of archive_heap_object here. At runtime, the
 299     // resolved references will be created using the normal process
 300     // when there is no archived value.
 301     _cache->set_archived_references(archived);
 302     set_resolved_references(NULL);
 303   }
 304 }
 305 
 306 void ConstantPool::resolve_class_constants(TRAPS) {
 307   assert(DumpSharedSpaces, "used during dump time only");
 308   // The _cache may be NULL if the _pool_holder klass fails verification
 309   // at dump time due to missing dependencies.
 310   if (cache() == NULL || reference_map() == NULL) {
 311     return; // nothing to do
 312   }
 313 
 314   constantPoolHandle cp(THREAD, this);
 315   for (int index = 1; index < length(); index++) { // Index 0 is unused
 316     if (tag_at(index).is_string() && !cp->is_pseudo_string_at(index)) {
 317       int cache_index = cp->cp_to_object_index(index);
 318       string_at_impl(cp, index, cache_index, CHECK);
 319     }
 320   }
 321 }
 322 #endif
 323 
 324 // CDS support. Create a new resolved_references array.
 325 void ConstantPool::restore_unshareable_info(TRAPS) {
 326   assert(is_constantPool(), "ensure C++ vtable is restored");
 327   assert(on_stack(), "should always be set for shared constant pools");




 287           // NULL is returned. Also set it in the array, so we won't
 288           // have a 'bad' reference in the archived resolved_reference
 289           // array.
 290           rr->obj_at_put(i, op);
 291         }
 292       }
 293     }
 294 
 295     oop archived = HeapShared::archive_heap_object(rr, THREAD);
 296     // If the resolved references array is not archived (too large),
 297     // the 'archived' object is NULL. No need to explicitly check
 298     // the return value of archive_heap_object here. At runtime, the
 299     // resolved references will be created using the normal process
 300     // when there is no archived value.
 301     _cache->set_archived_references(archived);
 302     set_resolved_references(NULL);
 303   }
 304 }
 305 
 306 void ConstantPool::resolve_class_constants(TRAPS) {
 307   Arguments::assert_is_dumping_archive();
 308   // The _cache may be NULL if the _pool_holder klass fails verification
 309   // at dump time due to missing dependencies.
 310   if (cache() == NULL || reference_map() == NULL) {
 311     return; // nothing to do
 312   }
 313 
 314   constantPoolHandle cp(THREAD, this);
 315   for (int index = 1; index < length(); index++) { // Index 0 is unused
 316     if (tag_at(index).is_string() && !cp->is_pseudo_string_at(index)) {
 317       int cache_index = cp->cp_to_object_index(index);
 318       string_at_impl(cp, index, cache_index, CHECK);
 319     }
 320   }
 321 }
 322 #endif
 323 
 324 // CDS support. Create a new resolved_references array.
 325 void ConstantPool::restore_unshareable_info(TRAPS) {
 326   assert(is_constantPool(), "ensure C++ vtable is restored");
 327   assert(on_stack(), "should always be set for shared constant pools");


< prev index next >