MethodHandle vs function types
Rémi Forax
forax at univ-mlv.fr
Mon Feb 22 08:31:48 PST 2010
Le 22/02/2010 10:54, John Rose a écrit :
[...]
> For SAM types (a contentious topic!) JSR 292 could perhaps help by defining library APIs (or other mechanisms?) for converting between method handles and SAM references. Rather than requiring a stereotyped bytecode adapter for every statically detected SAM conversion, a library API would (a) provide a compact way to express such conversions and (b) a location for JVM vendors to concentrate optimization work.
>
> With helpful best wishes,
> -- John
>
I really like that idea !
Instead of letting the compiler to produce bytecodes in order create an
object implementing an interface from a MethodHandle,
a VM can create a lightweight class with an itable containing the same
pointer as the one contained in the MethodHandle.
Rémi
More information about the lambda-dev
mailing list