Request for reviews (M): 6930772: JSR 292 needs to support SPARC C1

Christian Thalinger Christian.Thalinger at Sun.COM
Wed Apr 28 04:22:33 PDT 2010

On Tue, 2010-04-27 at 10:27 -0700, John Rose wrote:
> On Apr 27, 2010, at 7:37 AM, Christian Thalinger wrote:
> > It seems there is a mismatch somewhere.  When running JRuby tests with
> > C2 I get asserts like:
> The mismatch is that the method triggering the assert is a member of
> InvokeDynamic, not MethodHandle.
> This means somebody reasonably thinks it's not really a method handle
> invoke.  In fact, it is a generated adapter for a compiled dynamic
> call site, isn't it?  

Yes, this is an adapter for an invokedynamic call site.

> And if we ever allow reflection to reify InvokeDynamic methods
> somehow, there will be regular methods that are members of
> InvokeDynamic, some of whom might be named 'invoke'.
> So, there's a terminology problem here.
> I think is_method_handle_invoke should be true only for the
> signature-polymorphic members of java.dyn.MethodHandle (invoke,
> eventually invokeGeneric/invokeExact).  We should have a different
> predicate (if we need it) for adapters.

Well, I think we need it, otherwise we don't inline them (from

  // Always inline MethodHandle methods.
  if (callee_method->is_method_handle_invoke())
    return NULL;

Wait!  We have methodOopDesc::is_method_handle_adapter.  I think we
should add a check for that in the above statement and only return true
in ciMethod::is_method_handle_invoke as you suggested above.

-- Christian

More information about the hotspot-compiler-dev mailing list