RFR: 8264732: Clean up LinkResolver::vtable_index_of_interface_method()

Coleen Phillimore coleenp at openjdk.java.net
Mon Apr 5 19:12:25 UTC 2021


On Mon, 5 Apr 2021 18:01:15 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

> Turn `resolved_method` parameter into raw `Method*`.
> 
> Testing:
> * [x] hs-tier1 - hs-tier6

src/hotspot/share/jvmci/jvmciCompilerToVM.cpp line 731:

> 729: C2V_VMENTRY_0(jint, getVtableIndexForInterfaceMethod, (JNIEnv* env, jobject, jobject jvmci_type, jobject jvmci_method))
> 730:   Klass* klass = JVMCIENV->asKlass(jvmci_type);
> 731:   Method* method = JVMCIENV->asMethod(jvmci_method);

The reason that resolved_method was a methodHandle is in case of redefinition, we need to know if code is referring to this version of the method so that it's not deallocated.   It's enough for one of the callers to create a methodHandle but passing the methodHandle will guarantee it.  I'm not sure why you needed to make this change.

-------------

PR: https://git.openjdk.java.net/jdk/pull/3346


More information about the hotspot-runtime-dev mailing list