Skip to content
Permalink
Browse files
8255301: Common and strengthen the code in ciMemberName and ciMethodH…
…andle

Reviewed-by: vlivanov, kvn
  • Loading branch information
shipilev committed Oct 26, 2020
1 parent 9b5a2a6 commit fa64477c820ecaa33b682214a02b82ab8a6f0686
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
@@ -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);
}
@@ -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);
}

1 comment on commit fa64477

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented on fa64477 Oct 26, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.