Summary
Rename the module jdk.internal.vm.compiler
to jdk.graal.compiler
.
Problem
The Graal code base has been undergoing large structural changes to prepare for merging it into OpenJDK under Project Galahad. Making these changes prior to merging the sources into OpenJDK will avoid large changes post-merging into OpenJDK. For example, all code in the jdk.internal.vm.compiler
module was consolidated into a single source directory using the standard layout. The commit for this change alone had 3,481 changed files, 317 additions and 1,759 deletions.
The above change could be made without any JDK changes. The next large change renames the jdk.internal.vm.compiler
module to jdk.graal.compiler
. Due to the way Java modules work, this requires a JDK change. The service by which HotSpot requests a Graal compilation is defined in JVMCI. Since this service is in the boot layer, it can only be implemented by a provider in the boot layer and jdk.internal.vm.compiler
is in the boot layer by virtual of being a platform module. To be implemented by a service in jdk.graal.compiler
, this module also needs to be a platform module and the JVMCI service in question needs to be exported to it.
Solution
The solution requires adding a jdk.graal.compiler
module and updating the qualified exports in the jdk.internal.vm.ci
module to target this module. This could be done while preserving the existing jdk.internal.vm.compiler
module. However, given that there are no known implementations of this module apart from Graal, it should be removed so as to minimize the number of upgradeable platform modules in the JDK.
Note that the solution has already been merged.
Specification
Add jdk.graal.compiler
and jdk.graal.compiler.management
modules to replace the jdk.internal.vm.compiler
and jdk.internal.vm.compiler.management
modules:
module jdk.graal.compiler { requires jdk.internal.vm.ci; }
module jdk.graal.compiler.management { requires jdk.internal.vm.ci; }
Update the qualified exports in the module descriptor of jdk.internal.vm.ci
to replace "jdk.internal.vm.compiler" with "jdk.graal.compiler":
module jdk.internal.vm.ci {
exports jdk.vm.ci.services to
jdk.graal.compiler,
jdk.graal.compiler.management;
...
}
}
The full details are in the merged PR.
- csr of
-
JDK-8318027 Support alternative name to jdk.internal.vm.compiler
- Resolved