JEP 401: Value Objects Land in the Main OpenJDK Branch

Translated by a model; the original is in Russian.

· Technology
After many years of development within Project Valhalla, the first preview implementation of value objects has finally been merged into OpenJDK's master. Along with it, strict field initialization has made its way into the JVM.

cover.svg

One of the most eagerly awaited pieces of Project Valhalla has reached the main OpenJDK branch. Pull request #31120, carrying the implementation of JEP 401 “Value Objects (Preview),” has been integrated and closed with commit cc278db.

Alongside value objects, the JVM also gained the implementation of JEP 539 — Strict Field Initialization. It was no accident that both specifications were developed in a single codebase: JEP 401 depends directly on strict initialization, so there was no way to separate them.

The scale of the change

The patch's author, David Simms, warned right away that discussing such a large change in a single thread was impossible. So the main pull request served as a “showcase” for the final approval and integration, while the review itself was broken into three sub-requests — one for the language (JDK-8317277), one for the virtual machine (JDK-8317278), and one for the standard library (JDK-8317279). Each of them contained the full set of edits in order to preserve context: the changes to the compiler, the JVM, and the library are too tightly intertwined.

The list of those involved also speaks to the scope: the commit drew in dozens of co-authors and no fewer than a dozen and a half reviewers. The automation slapped labels for nearly every OpenJDK subsystem onto the request — from the compiler and hotspot to security, networking, i18n, and Shenandoah. In a note, the author separately confirmed that the contribution had been made in accordance with the “OpenJDK interim AI policy.”

The final flourish

The last few minutes before the merge turned almost comical. Since the author does not have committer status, the change needed to be “sponsored.” Daniel Daugherty patiently tried the bot's commands in various orders, commenting on the process with mounting nervousness: “knock-knock-knock… is this thing even working?” and the famous “Anyone? Bueller? Bueller?” In the end the bot reported that the change was going down in history as commit cc278db, and the request was closed as integrated.

Both features are being released with preview status, meaning they will be disabled by default and are intended for early testing by the community rather than for production use.


Source: Hacker News

Comments

Sign in, to comment.

  • No comments yet.