Review Request for MVT incubator module
mandy.chung at oracle.com
Fri Sep 15 06:02:37 UTC 2017
This patch proposes to define an incubator module  for MVT, named
`jdk.incubator.mvt`. Specifically this
jdk.experimental.value.ValueType APIto a new jdk.incubator.mvt package.
-XX:+EnableMVT continues to be the runtime option to enable MVT. I have
changed the runtime to add jdk.incubator.mvt when MVT is enabled. For
compile-time, compiling @VCC classes would require to run javac with
`--add-modules jdk.incubator.mvt` as incubator modules are not resolved
A couple points worth mentioning:
java.base can't reference @VCC and ValueType class statically since they
are now in a different module. In addition, @VCC can only be loaded
after startup asVM startup can only load classes in java.base.
jdk.incubator.mvtis defined by the platform loader (as we want it to be
deprivileged for security reason) and so Class.forName to find classes
in jdk.incubator.module should use the right loader.
jdk.incubator.mvt.ValueType is basically a wrapper around the internal
ValueTypeHolder class that is what java.base references in the
implementation. MethodHandleBuilder is kept as internal API for now. I
leave it as a future exercise if we decide to expose that API in the
The tests are updated with @modules jdk.incubator.mvt or add access to
I temporarily downgrade the javac incubating module warning to a note so
that -Werror has no effect. We will need to revisit this warning in JDK 10.
More information about the valhalla-dev