[lworld] RFR: 8331606: [lworld] javac should consider some library classes as value classes [v3]

Vicente Romero vromero at openjdk.org
Thu May 9 15:58:23 UTC 2024


> For some library classes two compiled versions are produced, one is the legacy class file and the other one is a class file representing a value class. The version representing a value class is stored in a separate jar. During compilation of classes using one of these library classes javac loads the vanilla version. But if preview features are enabled, javac should act as if the loaded class was the one representing the value class. So basically javac's class loader needs to massage the flags in the loaded class so that the rest of the compiler pipeline can handle it as a value class. This PR is proposing an annotation to mark these classes so that they can be identified by javac without having to keep an internal list of classes that will need to be maintained,
> 
> TIA

Vicente Romero has updated the pull request incrementally with one additional commit since the last revision:

  addressing review comments

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

Changes:
  - all: https://git.openjdk.org/valhalla/pull/1104/files
  - new: https://git.openjdk.org/valhalla/pull/1104/files/6a32bf99..9238bee9

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=valhalla&pr=1104&range=02
 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=1104&range=01-02

  Stats: 30 lines in 1 file changed: 27 ins; 0 del; 3 mod
  Patch: https://git.openjdk.org/valhalla/pull/1104.diff
  Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1104/head:pull/1104

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



More information about the valhalla-dev mailing list