eclipse-openj9 / openj9

Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
Other
3.27k stars 720 forks source link

Class verification support for regulated constructor in Project Valhalla #18309

Closed hangshao0 closed 4 days ago

hangshao0 commented 11 months ago

In the latest JEP401, a "regulated" constructor is introduced:

The constructor of a value class is regulated, meaning that its body must not make any use of this, except to write to an instance field. This ensures a value object does not "escape" to the rest of the program during construction.

More details can be found in the JEP.

The regulated constructor will be represented by modifier 0x0800 in the class file. Class format check should fail if a value class defines a non-regulated constructor. RT verification may need to be updated as well.

hangshao0 commented 11 months ago

FYI @ChengJin01

hangshao0 commented 4 days ago

This is gone in the latest spec. Closing this.

github-actions[bot] commented 4 days ago

Issue Number: 18309 Status: Closed Actual Components: comp:vm, project:valhalla Actual Assignees: No one :( PR Assignees: No one :(

hangshao0 commented 4 days ago

@llxia It seems more reasonable to not trigger https://github.com/eclipse-openj9/openj9/issues/18309#issuecomment-2392296888 when closing an issue.

llxia commented 3 days ago

https://github.com/eclipse-openj9/openj9/issues/18309#issuecomment-2392296888 is used to document the actual assigned components and assignees. It enables us to gather the actual values for comparison against the recommended values in the future. This issue was opened before triagerx was enabled. Otherwise, it would have the comment about the recommended components and assignees.

The plan is to let triagerx run for a while and reassess it later. We welcome your feedback in the upcoming survey.