Skip to content

8389219: Implement JEP 401: Value Objects (Preview) - #31120

Closed
MrSimms wants to merge 2934 commits into
openjdk:masterfrom
MrSimms:8317277
Closed

8389219: Implement JEP 401: Value Objects (Preview)#31120
MrSimms wants to merge 2934 commits into
openjdk:masterfrom
MrSimms:8317277

Conversation

@MrSimms

@MrSimms MrSimms commented May 11, 2026

Copy link
Copy Markdown
Member

This pull request implements the first preview of JEP 401: Value Objects (Preview). This pull request also includes the implementation of JEP 539: Strict Field Initialization in the JVM (Preview). That work was implemented in the same code base because JEP 401 depends on strict field initialization.

Sub-reviews, for spreading review debates are here:

This is the "master pull request" for the initial preview of JEP 401. Comments and review for a change this large will not scale well in a single pull request. This pull request serves as the vehicle for sign-off and integration into jdk/master. Review comments should be directed to the appropriate "sub-review pull request" listed above.

Note

The "sub-review pull requests" contain the same full set of code changes as this "master pull request" to preserve the full implementation context; the language compiler, JVM, and standard library changes are intertwined. The separate pull requests exist only to subdivide the review and related discussion by area.

Any resulting code changes should be made in valhalla/lworld.

valhalla/lworld is currently updated from jdk/master whenever a weekly jdk tag is created. At that time, code changes from valhalla/lworld will be propagated to this pull request and to all sub-review pull requests.

Ultimately, review sign-off will be recorded on this "master pull request", and the "sub-review pull requests" will be closed without integration.

This pull request has a large surface area and frequently conflicts with jdk/master. Refer to valhalla/lworld for the latest state of the project code, keeping in mind that it may lag several days behind jdk/master. Both repositories may be needed as references during review.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed (2 reviews required, with at least 1 Reviewer, 1 Author)

Issues

  • JDK-8389219: Implement JEP 401: Value Objects (Preview) (Enhancement - P4)
  • JDK-8389220: Implement JEP 539: Strict Field Initialization in the JVM (Preview) (Enhancement - P4)

Reviewers

Contributors

  • David Simms <dsimms@openjdk.org>
  • Dan Smith <dlsmith@openjdk.org>
  • Frederic Parain <fparain@openjdk.org>
  • Tobias Hartmann <thartmann@openjdk.org>
  • Roger Riggs <rriggs@openjdk.org>
  • Vicente Romero <vromero@openjdk.org>
  • Axel Boldt-Christmas <aboldtch@openjdk.org>
  • Karen Kinnear <acorn@openjdk.org>
  • Alex Menkov <amenkov@openjdk.org>
  • Bill Huang <bhuang@openjdk.org>
  • Benoît Maillard <bmaillard@openjdk.org>
  • Christian Hagedorn <chagedorn@openjdk.org>
  • Chris Plummer <cjplummer@openjdk.org>
  • Casper Norrbin <cnorrbin@openjdk.org>
  • Coleen Phillimore <coleenp@openjdk.org>
  • David Beaumont <dbeaumont@openjdk.org>
  • Daniel D. Daugherty <dcubed@openjdk.org>
  • Damon Fenacci <dfenacci@openjdk.org>
  • David Holmes <dholmes@openjdk.org>
  • Dmitry Samersoff <dsamersoff@openjdk.org>
  • Eric Caspole <ecaspole@openjdk.org>
  • Evgeny Nikitin <enikitin@openjdk.org>
  • Ekaterina Pavlova <epavlova@openjdk.org>
  • Fei Yang <fyang@openjdk.org>
  • Dan Heidinga <heidinga@openjdk.org>
  • Harold Seigel <hseigel@openjdk.org>
  • Ioi Lam <iklam@openjdk.org>
  • Ivan Walulya <iwalulya@openjdk.org>
  • Jatin Bhateja <jbhateja@openjdk.org>
  • Jan Lahoda <jlahoda@openjdk.org>
  • Jim Laskey <jlaskey@openjdk.org>
  • John R Rose <jrose@openjdk.org>
  • Joel Sikström <jsikstro@openjdk.org>
  • Lois Foltan <lfoltan@openjdk.org>
  • Chen Liang <liach@openjdk.org>
  • Leonid Mesnik <lmesnik@openjdk.org>
  • Matias Saavedra Silva <matsaave@openjdk.org>
  • Marc Chevalier <mchevalier@openjdk.org>
  • Mandy Chung <mchung@openjdk.org>
  • Maurizio Cimadamore <mcimadamore@openjdk.org>
  • Markus Grönlund <mgronlun@openjdk.org>
  • Manuel Hässig <mhaessig@openjdk.org>
  • Nick Gasson <ngasson@openjdk.org>
  • Patricio Chilano Mateo <pchilanomate@openjdk.org>
  • Paul Hübner <phubner@openjdk.org>
  • Paul Sandoz <psandoz@openjdk.org>
  • Quan Anh Mai <qamai@openjdk.org>
  • Roberto Castañeda Lozano <rcastanedalo@openjdk.org>
  • Roland Westrelin <roland@openjdk.org>
  • Srikanth Adayapalam <sadayapalam@openjdk.org>
  • Aleksey Shipilev <shade@openjdk.org>
  • Stefan Johansson <sjohanss@openjdk.org>
  • Sergey Kuksenko <skuksenko@openjdk.org>
  • Serguei Spitsyn <sspitsyn@openjdk.org>
  • Stefan Karlsson <stefank@openjdk.org>
  • Thomas Stuefe <stuefe@openjdk.org>
  • Thomas Schatzl <tschatzl@openjdk.org>
  • Zoltan Majo <zmajo@openjdk.org>
  • Alan Bateman <alanb@openjdk.org>
  • Jaikiran Pai <jpai@openjdk.org>
  • Martin Doerr <mdoerr@openjdk.org>
  • Richard Reingruber <rrich@openjdk.org>
  • Feilong Jiang <fjiang@openjdk.org>
  • Daisuke Yamazaki <dyama@openjdk.org>

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/31120/head:pull/31120
$ git checkout pull/31120

Update a local copy of the PR:
$ git checkout pull/31120
$ git pull https://git.openjdk.org/jdk.git pull/31120/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 31120

View PR using the GUI difftool:
$ git pr show -t 31120

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/31120.diff

Using Webrev

Link to Webrev Comment

@MrSimms

MrSimms commented May 11, 2026

Copy link
Copy Markdown
Member Author

/issue add 8317277, 8317278, 8317279

@bridgekeeper

bridgekeeper Bot commented May 11, 2026

Copy link
Copy Markdown

👋 Welcome back dsimms! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk

openjdk Bot commented May 11, 2026

Copy link
Copy Markdown

@MrSimms This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8389219: Implement JEP 401: Value Objects (Preview)
8389220: Implement JEP 539: Strict Field Initialization in the JVM (Preview)

Co-authored-by: David Simms <dsimms@openjdk.org>
Co-authored-by: Dan Smith <dlsmith@openjdk.org>
Co-authored-by: Frederic Parain <fparain@openjdk.org>
Co-authored-by: Tobias Hartmann <thartmann@openjdk.org>
Co-authored-by: Roger Riggs <rriggs@openjdk.org>
Co-authored-by: Vicente Romero <vromero@openjdk.org>
Co-authored-by: Axel Boldt-Christmas <aboldtch@openjdk.org>
Co-authored-by: Karen Kinnear <acorn@openjdk.org>
Co-authored-by: Alex Menkov <amenkov@openjdk.org>
Co-authored-by: Bill Huang <bhuang@openjdk.org>
Co-authored-by: Benoît Maillard <bmaillard@openjdk.org>
Co-authored-by: Christian Hagedorn <chagedorn@openjdk.org>
Co-authored-by: Chris Plummer <cjplummer@openjdk.org>
Co-authored-by: Casper Norrbin <cnorrbin@openjdk.org>
Co-authored-by: Coleen Phillimore <coleenp@openjdk.org>
Co-authored-by: David Beaumont <dbeaumont@openjdk.org>
Co-authored-by: Daniel D. Daugherty <dcubed@openjdk.org>
Co-authored-by: Damon Fenacci <dfenacci@openjdk.org>
Co-authored-by: David Holmes <dholmes@openjdk.org>
Co-authored-by: Dmitry Samersoff <dsamersoff@openjdk.org>
Co-authored-by: Eric Caspole <ecaspole@openjdk.org>
Co-authored-by: Evgeny Nikitin <enikitin@openjdk.org>
Co-authored-by: Ekaterina Pavlova <epavlova@openjdk.org>
Co-authored-by: Fei Yang <fyang@openjdk.org>
Co-authored-by: Dan Heidinga <heidinga@openjdk.org>
Co-authored-by: Harold Seigel <hseigel@openjdk.org>
Co-authored-by: Ioi Lam <iklam@openjdk.org>
Co-authored-by: Ivan Walulya <iwalulya@openjdk.org>
Co-authored-by: Jatin Bhateja <jbhateja@openjdk.org>
Co-authored-by: Jan Lahoda <jlahoda@openjdk.org>
Co-authored-by: Jim Laskey <jlaskey@openjdk.org>
Co-authored-by: John R Rose <jrose@openjdk.org>
Co-authored-by: Joel Sikström <jsikstro@openjdk.org>
Co-authored-by: Lois Foltan <lfoltan@openjdk.org>
Co-authored-by: Chen Liang <liach@openjdk.org>
Co-authored-by: Leonid Mesnik <lmesnik@openjdk.org>
Co-authored-by: Matias Saavedra Silva <matsaave@openjdk.org>
Co-authored-by: Marc Chevalier <mchevalier@openjdk.org>
Co-authored-by: Mandy Chung <mchung@openjdk.org>
Co-authored-by: Maurizio Cimadamore <mcimadamore@openjdk.org>
Co-authored-by: Markus Grönlund <mgronlun@openjdk.org>
Co-authored-by: Manuel Hässig <mhaessig@openjdk.org>
Co-authored-by: Nick Gasson <ngasson@openjdk.org>
Co-authored-by: Patricio Chilano Mateo <pchilanomate@openjdk.org>
Co-authored-by: Paul Hübner <phubner@openjdk.org>
Co-authored-by: Paul Sandoz <psandoz@openjdk.org>
Co-authored-by: Quan Anh Mai <qamai@openjdk.org>
Co-authored-by: Roberto Castañeda Lozano <rcastanedalo@openjdk.org>
Co-authored-by: Roland Westrelin <roland@openjdk.org>
Co-authored-by: Srikanth Adayapalam <sadayapalam@openjdk.org>
Co-authored-by: Aleksey Shipilev <shade@openjdk.org>
Co-authored-by: Stefan Johansson <sjohanss@openjdk.org>
Co-authored-by: Sergey Kuksenko <skuksenko@openjdk.org>
Co-authored-by: Serguei Spitsyn <sspitsyn@openjdk.org>
Co-authored-by: Stefan Karlsson <stefank@openjdk.org>
Co-authored-by: Thomas Stuefe <stuefe@openjdk.org>
Co-authored-by: Thomas Schatzl <tschatzl@openjdk.org>
Co-authored-by: Zoltan Majo <zmajo@openjdk.org>
Co-authored-by: Alan Bateman <alanb@openjdk.org>
Co-authored-by: Jaikiran Pai <jpai@openjdk.org>
Co-authored-by: Martin Doerr <mdoerr@openjdk.org>
Co-authored-by: Richard Reingruber <rrich@openjdk.org>
Co-authored-by: Feilong Jiang <fjiang@openjdk.org>
Co-authored-by: Daisuke Yamazaki <dyama@openjdk.org>
Reviewed-by: mcimadamore, liach, darcy, dcubed, aboldtch, coleenp, iklam, jlahoda, dlong, jpai, vklang, heidinga, sspitsyn, cjplummer

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been no new commits pushed to the master branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential automatic rebasing, please check the documentation for the /integrate command for further details.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@coleenp, @iklam, @mcimadamore, @lahodaj, @dean-long, @jaikiran, @viktorklang-ora, @sspitsyn, @plummercj, @liach, @jddarcy, @dcubed-ojdk, @xmas92) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk

openjdk Bot commented May 11, 2026

Copy link
Copy Markdown

@MrSimms this pull request can not be integrated into master due to one or more merge conflicts. To resolve these merge conflicts and update this pull request you can run the following commands in the local repository for your personal fork:

git checkout 8317277
git fetch https://git.openjdk.org/jdk.git master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push

@openjdk

openjdk Bot commented May 11, 2026

Copy link
Copy Markdown

⚠️ @MrSimms This pull request contains merges that bring in commits not present in the target repository. Since this is not a "merge style" pull request, these changes will be squashed when this pull request in integrated. If this is your intention, then please ignore this message. If you want to preserve the commit structure, you must change the title of this pull request to Merge <project>:<branch> where <project> is the name of another project in the OpenJDK organization (for example Merge jdk:master).

@openjdk openjdk Bot added csr Pull request needs approved CSR before integration merge-conflict Pull request has merge conflict with target branch labels May 11, 2026
@openjdk

openjdk Bot commented May 11, 2026

Copy link
Copy Markdown

@MrSimms This issue is referenced in the PR title - it will now be updated.

Adding additional issue to issue list: 8317278: JVM implementation of value classes and objects.

Adding additional issue to issue list: 8317279: Standard library implementation of value classes and objects.

@openjdk openjdk Bot added serviceability serviceability-dev@openjdk.org hotspot hotspot-dev@openjdk.org i18n i18n-dev@openjdk.org shenandoah shenandoah-dev@openjdk.org javadoc javadoc-dev@openjdk.org security security-dev@openjdk.org build build-dev@openjdk.org nio nio-dev@openjdk.org core-libs core-libs-dev@openjdk.org compiler compiler-dev@openjdk.org net net-dev@openjdk.org labels May 11, 2026
@openjdk

openjdk Bot commented May 11, 2026

Copy link
Copy Markdown

@MrSimms The following labels will be automatically applied to this pull request:

  • build
  • compiler
  • core-libs
  • hotspot
  • i18n
  • javadoc
  • net
  • nio
  • security
  • serviceability
  • shenandoah

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.

@openjdk

openjdk Bot commented May 11, 2026

Copy link
Copy Markdown

The total number of required reviews for this PR has been set to 2 based on the presence of this label: hotspot. This can be overridden with the /reviewers command.

Dan Smith and others added 6 commits May 12, 2026 14:56

@dcubed-ojdk dcubed-ojdk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thumbs up.

@dcubed-ojdk

Copy link
Copy Markdown
Member

Waiting for "ready" to appear, the "/integrate auto" should process, then the "sponsor" flag will be added, then I can "/sponsor"...

@openjdk openjdk Bot added the ready Pull request is ready to be integrated label Jul 31, 2026
@openjdk

openjdk Bot commented Jul 31, 2026

Copy link
Copy Markdown

/integrate

@dcubed-ojdk

Copy link
Copy Markdown
Member

What happens if I do this early:

/sponsor

@openjdk openjdk Bot added the sponsor Pull request is ready to be sponsored label Jul 31, 2026
@openjdk

openjdk Bot commented Jul 31, 2026

Copy link
Copy Markdown

@openjdk[bot]
Your change (at version 58712b7) is now ready to be sponsored by a Committer.

@dcubed-ojdk

Copy link
Copy Markdown
Member

/sponsor

@dcubed-ojdk

Copy link
Copy Markdown
Member

Just to get it in the right order... if that makes a difference...

@dcubed-ojdk

Copy link
Copy Markdown
Member

tap, tap, tap... is this thing working?

@dcubed-ojdk

Copy link
Copy Markdown
Member

Anyone? Anyone? Bueller? Bueller? Bueller?

@openjdk

openjdk Bot commented Jul 31, 2026

Copy link
Copy Markdown

Going to push as commit cc278db.

@openjdk openjdk Bot added the integrated Pull request has been integrated label Jul 31, 2026
@openjdk openjdk Bot closed this Jul 31, 2026
@openjdk openjdk Bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels Jul 31, 2026
@openjdk

openjdk Bot commented Jul 31, 2026

Copy link
Copy Markdown

@dcubed-ojdk @MrSimms Pushed as commit cc278db.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@openjdk

openjdk Bot commented Jul 31, 2026

Copy link
Copy Markdown

@dcubed-ojdk The command sponsor can only be used in open pull requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto Expect automatic integration when ready; no further action required build build-dev@openjdk.org compiler compiler-dev@openjdk.org core-libs core-libs-dev@openjdk.org hotspot hotspot-dev@openjdk.org hotspot-jfr hotspot-jfr-dev@openjdk.org i18n i18n-dev@openjdk.org integrated Pull request has been integrated javadoc javadoc-dev@openjdk.org net net-dev@openjdk.org nio nio-dev@openjdk.org security security-dev@openjdk.org serviceability serviceability-dev@openjdk.org shenandoah shenandoah-dev@openjdk.org

Development

Successfully merging this pull request may close these issues.