JEP 401: Value Objects (Preview) merged to OpenJDK master

JEP 401: Value Objects (Preview) merged to OpenJDK master

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.

此合并请求(Pull Request)实现了 JEP 401:值对象(预览版)的首次预览。该请求还包含了 JEP 539:JVM 中严格字段初始化(预览版)的实现。由于 JEP 401 依赖于严格字段初始化,因此这两项工作在同一个代码库中实现。

Sub-reviews, for spreading review debates are here:

  • JDK-8317277: Java language implementation of value objects #31121
  • JDK-8317278: JVM implementation of value objects #31122
  • JDK-8317279: Standard library implementation of value objects #31123

为了分散评审讨论,相关的子评审链接如下:

  • JDK-8317277:值对象的 Java 语言实现 #31121
  • JDK-8317278:值对象的 JVM 实现 #31122
  • JDK-8317279:值对象的标准库实现 #31123

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.

这是 JEP 401 初始预览版的“主合并请求”。对于如此大规模的变更,在单一合并请求中进行评论和评审难以高效扩展。此合并请求主要用于签署确认并集成到 jdk/master 分支中。评审意见应提交至上述对应的“子评审合并请求”中。

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.

注意:“子评审合并请求”包含与此“主合并请求”相同的完整代码变更集,以保持完整的实现上下文;因为语言编译器、JVM 和标准库的变更相互交织。拆分多个合并请求仅是为了按领域细分评审和相关讨论。

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.

任何后续的代码变更都应在 valhalla/lworld 中进行。每当创建每周 JDK 标签时,valhalla/lworld 都会从 jdk/master 进行更新。届时,来自 valhalla/lworld 的代码变更将同步到此主合并请求及所有子评审合并请求中。最终,评审确认将记录在此“主合并请求”上,而“子评审合并请求”将在不进行集成的情况下关闭。

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.

此合并请求涉及范围广泛,且经常与 jdk/master 产生冲突。请参考 valhalla/lworld 获取项目代码的最新状态,并注意它可能比 jdk/master 滞后几天。在评审过程中,可能需要同时参考这两个仓库。