lambda support for Graal
Remi Forax
forax at univ-mlv.fr
Wed Apr 3 13:41:30 PDT 2013
On 04/03/2013 10:15 PM, Venkatachalam, Vasanth wrote:
> Hi,
>
> Can someone explain what the plans for adding support to compile JDK8 lambda expressions?
>
> We'll need this functionality soon for the work we're doing, namely generating HSAIL for parallelizable Java code marked with lambdas.
>
> Vasanth
Hi Vasanth,
a lambda EG member here,
detecting the creation of a lambda is easy, you just have to lookup up
an invokedynamic that use the LambdaMetaFactory as bootstrap method.
So there is no need to have a support of invokedynamic in Graal,
detecting this peculiar pattern is enough.
[http://cr.openjdk.java.net/~briangoetz/lambda/lambda-translation.html]
The bootstrap arguments of the bootstrap method will give you the
code of the lambda, I suppose that you need to re-build an AST
(or a kind of) from the code of the lambda.
cheers,
Rémi
More information about the graal-dev
mailing list