Method references with types [Re: lambda syntax tutorial]

Nathan Bryant nathan.bryant at linkshare.com
Thu Aug 5 15:09:09 PDT 2010



Remi Forax wrote:

> Also note that even if you use an Integer in the signature, the VM
> is already able to not do the corresponding boxing
> (see one of the last mail of Fredrik on this list).

The PowerPoint I saw dealt with adding function types to the VM as basically a type annotation on MethodHandle, which would be renamed Function. (A proposal I support, as it makes MethodHandles a first class citizen, not something that is only really useful to compiler backend writers.)

In this case, the compiler is able to remove the primitives. However, the more general box/unbox elimination optimization has not been implemented yet either in JDK7 or in any publically released version of JRockit. It also depends on the ability to inline.


More information about the lambda-dev mailing list