< prev index next >

src/share/vm/jvmci/jvmciCodeInstaller.cpp

Print this page

        

*** 179,190 **** void* CodeInstaller::record_metadata_reference(Handle constant, TRAPS) { /* * This method needs to return a raw (untyped) pointer, since the value of a pointer to the base * class is in general not equal to the pointer of the subclass. When patching metaspace pointers, ! * the compiler expects a direct pointer to the subclass (Klass*, Method* or Symbol*), not a ! * pointer to the base class (Metadata* or MetaspaceObj*). */ oop obj = HotSpotMetaspaceConstantImpl::metaspaceObject(constant); if (obj->is_a(HotSpotResolvedObjectTypeImpl::klass())) { Klass* klass = java_lang_Class::as_Klass(HotSpotResolvedObjectTypeImpl::javaClass(obj)); assert(!HotSpotMetaspaceConstantImpl::compressed(constant), "unexpected compressed klass pointer %s @ " INTPTR_FORMAT, klass->name()->as_C_string(), p2i(klass)); --- 179,190 ---- void* CodeInstaller::record_metadata_reference(Handle constant, TRAPS) { /* * This method needs to return a raw (untyped) pointer, since the value of a pointer to the base * class is in general not equal to the pointer of the subclass. When patching metaspace pointers, ! * the compiler expects a direct pointer to the subclass (Klass* or Method*), not a pointer to the ! * base class (Metadata* or MetaspaceObj*). */ oop obj = HotSpotMetaspaceConstantImpl::metaspaceObject(constant); if (obj->is_a(HotSpotResolvedObjectTypeImpl::klass())) { Klass* klass = java_lang_Class::as_Klass(HotSpotResolvedObjectTypeImpl::javaClass(obj)); assert(!HotSpotMetaspaceConstantImpl::compressed(constant), "unexpected compressed klass pointer %s @ " INTPTR_FORMAT, klass->name()->as_C_string(), p2i(klass));
*** 195,209 **** Method* method = (Method*) (address) HotSpotResolvedJavaMethodImpl::metaspaceMethod(obj); assert(!HotSpotMetaspaceConstantImpl::compressed(constant), "unexpected compressed method pointer %s @ " INTPTR_FORMAT, method->name()->as_C_string(), p2i(method)); int index = _oop_recorder->find_index(method); TRACE_jvmci_3("metadata[%d of %d] = %s", index, _oop_recorder->metadata_count(), method->name()->as_C_string()); return method; - } else if (obj->is_a(HotSpotSymbol::klass())) { - Symbol* symbol = (Symbol*) (address) HotSpotSymbol::pointer(obj); - assert(!HotSpotMetaspaceConstantImpl::compressed(constant), "unexpected compressed symbol pointer %s @ " INTPTR_FORMAT, symbol->as_C_string(), p2i(symbol)); - TRACE_jvmci_3("symbol = %s", symbol->as_C_string()); - return symbol; } else { JVMCI_ERROR_NULL("unexpected metadata reference for constant of type %s", obj->klass()->signature_name()); } } --- 195,204 ----
< prev index next >