-
Notifications
You must be signed in to change notification settings - Fork 101
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
8199429: [lworld] value type (re)constructors expressions value type should not be discardable #1274
Conversation
👋 Welcome back jespersm! A progress list of the required criteria for merging this PR into |
❗ This change is not yet ready to be integrated. |
Webrevs
|
I think the "reconstrcutor" proposal is out-of-date; the latest approach would be "deconstructors" openjdk/amber#94 and "Derived record creation" https://openjdk.org/jeps/468 For |
Thanks for the feedback, @liach Re. reconstructors: Good point, the case of an JCExpressionStatement "p with { y = 0}" is of course easy to flag as an error, (just from structure alone, like x+1 in the original motivation). As for the annotation: I could not find the Google presentation on YT, but I guess that what you're saying is that the annotation would make sense for any and all methods which return a computed value without causing any mutations or side-effects. Since values are immutable, only side effects need consideration, so the bar is a lot lower (and enforceable in practice, since we don't want to break people code, even nonsensical parts). So in the example given in the PR, the method As for identity objects, I'm guessing that developers in the future could use Or am I overthinking this? 😀 |
@jespersm This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
@jespersm This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the |
…be discardable as per https://bugs.openjdk.org/browse/JDK-8199429 .
This is a first stab at it, only with the manual marking on a method, and without the loading of the annotation in ClassReader.
Progress
Integration blocker
Issue
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/valhalla.git pull/1274/head:pull/1274
$ git checkout pull/1274
Update a local copy of the PR:
$ git checkout pull/1274
$ git pull https://git.openjdk.org/valhalla.git pull/1274/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 1274
View PR using the GUI difftool:
$ git pr show -t 1274
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/valhalla/pull/1274.diff
Using Webrev
Link to Webrev Comment