Time to keep up with the developments happening in Java and in the potential future of the JDK. Let’s take a look at this newly added JEP draft: JVMCI based just-in-time compiler pre-compiled as shared library. What goals for Java does it propose?

Open source collaboration on Java continues, with new additions and suggestions from the community on how the future of Java should progress. What changes are currently up for discussion?

To replace native compilers in HotSpot (i.e., C1 and C2), JVMCI based Compiler should have the following characteristics:

fast startup

compile time similar to native compilers

memory usage disjoint from the application Java heap

bulk de-allocation of memory used during a single compilation

do not pollute profiling of JDK code used by the application.

OpenJDK

How to achieve it?

What are the plans for tackling this draft JEP?

Vladimir Kozlov writes that “the best way to achieve this is to compile such Compiler with SubstrateVM native-image tool into a shared library that HotSpot VM can interface with via JNI. This requires:

A technology by which JVMCI and Compiler can be compiled into a shared library that implements the JNI Invocation API
Enhancements to JVMCI to support both producing and using SVM compiled shared library.”

In order to achieve this, the following proposed new hotspot flags would also be added: