mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8006267: InterfaceMethod_ref should allow invokestatic and invokespecial
Lambda changes; spec 0.6.2 - Allow static invokestatic and invokespecial calls to InterfaceMethod_ref Reviewed-by: dholmes, acorn
This commit is contained in:
parent
54b7ae1ff9
commit
f63b13e379
4 changed files with 44 additions and 12 deletions
|
@ -187,6 +187,11 @@ oop MethodHandles::init_method_MemberName(oop mname_oop, Method* m, bool do_disp
|
|||
flags |= IS_CONSTRUCTOR | (JVM_REF_invokeSpecial << REFERENCE_KIND_SHIFT);
|
||||
} else if (mods.is_static()) {
|
||||
flags |= IS_METHOD | (JVM_REF_invokeStatic << REFERENCE_KIND_SHIFT);
|
||||
// Check if this method is a lambda method that is generated as
|
||||
// private static method.
|
||||
if (m->is_private() && m->method_holder()->is_interface()) {
|
||||
vmindex = klassItable::compute_itable_index(m);
|
||||
}
|
||||
} else if (receiver_limit != mklass &&
|
||||
!receiver_limit->is_subtype_of(mklass)) {
|
||||
return NULL; // bad receiver limit
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue