OpenJ9 和项目 Graal/Truffle

OpenJ9 and Project Graal/Truffle

HotSpot JVM 团队正在开发非常酷的项目 Graal/Truffle,它允许开发人员动态地 compile/inject Java、Java 脚本(和其他)运行 以 JVM 速度。 问题: - OpenJ9 是否可与 Graal/Truffle 互操作? - 如果 OMR 与 Graal/Truffle 相似,你能对比一下吗?

有关支持 Truffle API 的一些信息位于此处: https://github.com/eclipse/openj9/issues/59

OMR 和 Graal 的比较写在这里:https://github.com/eclipse/omr/issues/1118

引用该期的 John Duimovich:

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.

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.

还有一些原型允许 Java 代码从 Java 驱动 OMR 的 JITBuilder 代码生成器。请参阅 Mark Stoodley 的 JVMLS 演示文稿:https://www.youtube.com/watch?v=w5rcBiOHrB0