Reputation: 1708
The HotSpot JVM team is developing the extremely cool project Graal/Truffle, which allows developers to dynamically compile/inject Java, Javascript (and others) to run at JVM speed. Questions: - Is OpenJ9 interoperable with Graal/Truffle? - If OMR is similar to Graal/Truffle can you contrast them?
Upvotes: 1
Views: 1011
Reputation: 489
Comparisons between OMR and Graal have been written here: https://github.com/eclipse/omr/issues/1118
Quoting John Duimovich from that issue:
So, the short answer is that Truffle/Graal is research effort that is looking at using the JVM for implementing programming languages. Truffle is used to implement languages via implementing an AST parser and optimizing it via Graal (lots of details skipped). Graal focuses on code generation and relies on Java for garbage collection. You implement your language in Java. As many of the target languages use C/C++ as their implementation language, this could be a non-starter, but perhaps with TruffleC it could be used to re-compile directly but I don't think that is open source. They have some impressive benchmarks so there is cool stuff there.
and
Eclipse OMR, is production ready code, used by IBM Java, and trying to bootstrap into other languages, has good benchmarks in Java, but for other languages proof points are still in progress as OMR is about 1 year old as an open source project. An existing language implementer, would not need to re-write their C/C++ implementation so they could incrementally adopt components. If you want a code gen library to integrate, or a separate GC implementation to integrate, you would pick OMR as they are provided as modular components.
There is also prototypes that allow Java code to drive OMR's JITBuilder code generator from Java. See JVMLS presentation from Mark Stoodley: https://www.youtube.com/watch?v=w5rcBiOHrB0
Upvotes: 1
Reputation: 181
Some information on support for Truffle API is here: https://github.com/eclipse/openj9/issues/59
Upvotes: 2