Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class verification support for regulated constructor in Project Valhalla #18309

Closed
hangshao0 opened this issue Oct 19, 2023 · 5 comments
Closed
Labels
comp:vm project:valhalla Used to track Project Valhalla related work

Comments

@hangshao0
Copy link
Contributor

hangshao0 commented Oct 19, 2023

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 hangshao0 added comp:vm project:valhalla Used to track Project Valhalla related work labels Oct 19, 2023
@hangshao0
Copy link
Contributor Author

FYI @ChengJin01

@hangshao0
Copy link
Contributor Author

This is gone in the latest spec. Closing this.

Copy link

github-actions bot commented Oct 3, 2024

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

@hangshao0
Copy link
Contributor Author

@llxia It seems more reasonable to not trigger #18309 (comment) when closing an issue.

@llxia
Copy link
Contributor

llxia commented Oct 4, 2024

#18309 (comment) 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:vm project:valhalla Used to track Project Valhalla related work
Projects
None yet
Development

No branches or pull requests

2 participants