hg: lambda/lambda/langtools: Handle non-static method references from static context. More specifically, if f is an instance method of Z whose signature is A, B->C, then #obj.f is of type A, B->C and #Z.f is of type Z, A, B->C.

Neal Gafter neal at gafter.com
Wed Aug 4 08:33:05 PDT 2010


On Wed, Aug 4, 2010 at 8:22 AM, Brian Goetz <brian.goetz at oracle.com> wrote:

> Has the 292 EG made any progress in defining the semantics and
> nonfunctional
> behavior (i.e., performance) of asSam()?  I am curious to hear.  Will
> MethodHandles.asSam(methodHandle, clazz) allocate a fresh MH on each
> invocation, or will they be cached somehow so that the above is
> allocation-free (and subsequent invocation is indirection-free)?
>

Brian-

Project lambda hasn't specified the behavior of the conversion (i.e., when
are exceptions from the SAM constructor thrown), so it's hard to know what
to want from jsr292.  Perhaps now would be a good time to specify the
desired behavior and see if jsr292 can deliver it.

Cheers,
Neal


More information about the lambda-dev mailing list