graal and jdk8

Bharadwaj Yadavalli bharadwaj.yadavalli at
Thu Feb 14 08:24:09 PST 2013


On 2/14/2013 10:58 AM, Frost, Gary wrote:
> Bharadwaj,
> The Sumatra project is interested in intercepting some of the upcoming Java 8 stream API features.
> Essentially we see the
>   IntStream.parallel().forEach( lambda );
> As low hanging fruit for GPU acceleration.

Yes, I understand this and am fully in agreement (It is in line with my 
post back in November '12 on Sumatra project mailing list

I am trying to figure out the various compilation steps in Hotspot/Graal 
framework that would allow me to recognize opportunities for code 
generation for alternate architectures (GPUs in this case).

> So it is important for us to ensure that Graal was (will be) Java 8 compatible moving forward, we are delighted that it seems to be ;)


The question was why does it matter whether we use JDK 7 or JDK 8 to 
build the (Graal) compiler that in turn could compile Java 8 classfiles. 
I am not objecting to compiling Graal with the latest JDK, but wish to 
understand the dependency, which I do not see.



> It is true that the lambda features seem to leverage only Java 7 classfile features at this time (method handles and constant pool enhancements) so we felt fairly comfortable experimenting with Graal on Java 7.  But prefer to continue our experiments with the Project Lambda and Java 8 hotspot VMs.
> Gary
> -----Original Message-----
> From:graal-dev-bounces at  [mailto:graal-dev-bounces at] On Behalf Of Bharadwaj Yadavalli
> Sent: Thursday, February 14, 2013 9:36 AM
> To:graal-dev at
> Subject: Re: graal and jdk8
> On 2/13/2013 12:03 PM, Venkatachalam, Vasanth wrote:
>> Hi,
>> I noticed that I had to use a JDK7 VM to build Graal.
>> I wasn't able to build it with JDK8. Is there a workaround for this, or does Graal require a JDK7 host VM?
> I am curious as to why Graal *build* needs to be done with JDK8 so that the resulting Graal compiler would be able to compile Java 8 class files? I believe Graal sources themselves do not (yet) use Java 8 features.
>> If Graal only supports JDK7, are there plans to make it compatible with JDK8?
>> We're looking to leverage Graal for the Sumatra project
>> (
>> This work requires being able to compile JDK8 lambda constructs for the GPU.
> However, it appears to me that the need is more for bringing in the ability to parse and verify Java 8 class files (along with possibly the support for indy, what else am I missing?) so that the Graal compiler has the ability to compile Java 8 class files.
> Thanks,
> Bharadwaj

More information about the graal-dev mailing list