8255301: Common and strengthen the code in ciMemberName and ciMethodHandle

Reviewed-by: vlivanov, kvn
This commit is contained in:
Aleksey Shipilev 2020-10-26 15:42:39 +00:00
parent 9b5a2a6b24
commit fa64477c82
2 changed files with 4 additions and 14 deletions

View File

@ -34,11 +34,6 @@
// Return: MN.vmtarget
ciMethod* ciMemberName::get_vmtarget() const {
VM_ENTRY_MARK;
// FIXME: Share code with ciMethodHandle::get_vmtarget
Metadata* vmtarget = java_lang_invoke_MemberName::vmtarget(get_oop());
if (vmtarget->is_method())
return CURRENT_ENV->get_method((Method*) vmtarget);
// FIXME: What if the vmtarget is a Klass?
assert(false, "");
return NULL;
Method* vmtarget = java_lang_invoke_MemberName::vmtarget(get_oop());
return CURRENT_ENV->get_method(vmtarget);
}

View File

@ -36,11 +36,6 @@ ciMethod* ciMethodHandle::get_vmtarget() const {
VM_ENTRY_MARK;
oop form_oop = java_lang_invoke_MethodHandle::form(get_oop());
oop vmentry_oop = java_lang_invoke_LambdaForm::vmentry(form_oop);
// FIXME: Share code with ciMemberName::get_vmtarget
Metadata* vmtarget = java_lang_invoke_MemberName::vmtarget(vmentry_oop);
if (vmtarget->is_method())
return CURRENT_ENV->get_method((Method*) vmtarget);
// FIXME: What if the vmtarget is a Klass?
assert(false, "");
return NULL;
Method* vmtarget = java_lang_invoke_MemberName::vmtarget(vmentry_oop);
return CURRENT_ENV->get_method(vmtarget);
}