[lworld] RFR: 8271959: [lworld] Convert Optional and VBS classes to value class [v4]

Erik Joelsson erikj at openjdk.org
Fri Feb 24 17:47:47 UTC 2023


On Thu, 23 Feb 2023 17:58:41 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

>> Make copies of classes to be made value classes in src/java.base/valueclasses/classes 
>> Modify CompileJavaModules.gmk to trigger builds of values classes and construct a .jar for each module.
>> Add the jar files to $JAVA_HOME/lib/valueclasses/<module\>-valueclasses.jar 
>> 
>> Modify hotspot arguments.cpp to scan for patch jar files when --enable-preview and -XX:+EnableValhalla.
>> For each jar, the equivalent of --patch-module <module>=<path-to-jar> is added and the system properties `jdk.module.patch.<n>` include jar file paths.
>
> Roger Riggs has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Restore disabling CDS if java.base is patched.

Except for some minor cosmetics, the build changes are looking really good.

make/CompileJavaModules.gmk line 127:

> 125: 
> 126: ifneq ($(COMPILER), bootjdk)
> 127:     MODULE_VALUECLASS_SRC_DIRS := $(call FindModuleValueClassSrcDirs, $(MODULE))

Please use 2 spaces for logic block indentation. (see https://openjdk.org/groups/build/doc/code-conventions.html)

make/CompileJavaModules.gmk line 132:

> 130:     ifneq ($(MODULE_VALUECLASS_SRC_DIRS),)
> 131:       $(eval $(call SetupJavaCompilation, $(MODULE)-$(VALUECLASSES_STR), \
> 132:         SMALL_JAVA := false, \

Please use 4 spaces indentation for continuation.

-------------

Marked as reviewed by erikj (no project role).

PR: https://git.openjdk.org/valhalla/pull/816



More information about the valhalla-dev mailing list