Mercurial > hg > graal-compiler
diff src/share/vm/prims/methodHandles.cpp @ 10128:41ed397cc0cd
8006267: InterfaceMethod_ref should allow invokestatic and invokespecial
Summary: Lambda changes; spec 0.6.2 - Allow static invokestatic and invokespecial calls to InterfaceMethod_ref
Reviewed-by: dholmes, acorn
author | bharadwaj |
---|---|
date | Thu, 18 Apr 2013 08:05:35 -0700 |
parents | 16885e702c88 |
children | 6337ca4dcad8 |
line wrap: on
line diff
--- a/src/share/vm/prims/methodHandles.cpp Wed Apr 17 08:20:02 2013 -0400 +++ b/src/share/vm/prims/methodHandles.cpp Thu Apr 18 08:05:35 2013 -0700 @@ -187,6 +187,11 @@ 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