JDK-8271959 : [lworld] Convert Optional and VBS classes to value class
  • Type: Enhancement
  • Component: core-libs
  • Affected Version: repo-valhalla
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-08-05
  • Updated: 2025-03-24
  • Resolved: 2023-03-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
repo-valhallaFixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
When value classes are enabled with --enable-preview, classes labeled at `Value Based` should be implemented as value classes.
Generally, this is a simple source modification to change "public class" to "public value class".
The compiled class files should replace the original value based classes when invoked with --enable-preview.

The modified classes need a place in the exploded and resulting image.
Changes are need in the build, launcher, and the candidate set of classes.
Comments
A pull request was submitted for review. URL: https://git.openjdk.org/valhalla/pull/816 Date: 2023-01-26 01:38:03 +0000
21-02-2023

Reassign to Roger as he is working on how to support `--enable-preview` for Valhalla that covers the conversion of `java.util.Optional` and `java.time` to value classes.
30-01-2023

[~thartmann] thanks for disabling the optimization. This workaround works.
17-08-2021

I've disabled the corresponding optimization for now with JDK-8272511 because I'm suspecting this to be another mainline issue.
16-08-2021

I've verified that the failures are unrelated to JDK-8271954 and filed JDK-8272448.
13-08-2021

A few test/jdk/java/lang/invoke tests fail with the following assertion. It may be related to JDK-8271954. # Internal Error (/Users/mlchung/ws/valhalla/lworld-closed/open/src/hotspot/share/opto/loopnode.cpp:5343), pid=38260, tid=23555 # assert(false) failed: Bad graph detected in build_loop_late
09-08-2021