-
Notifications
You must be signed in to change notification settings - Fork 99
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
8263900: [lworld] Make .default a separate node type in the parser. #370
Conversation
👋 Welcome back jespersm! A progress list of the required criteria for merging this PR into |
@jespersm This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 2 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@sadayapalam) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
Webrevs
|
Thanks Jesper, I will review this one and help you take it forward. |
I have made one high level pass over the changes, more verifying on the boiler plate parts. Need to delve deeper in Attr, Gen, Parser, TransValues, will do this tomorrow. Here are some comments so far: (1) Is DefaultExpression better named as DefaultInstance or DefaultValue ?? |
Here are cumulative comments: (1) Is DefaultExpression better named as DefaultInstance or even better DefaultValue ??
generates this strange error: I think we should attribute the clazz as a TYP_PCK and for package case emit an error. Let me know if you have any questions/clarifications. Thanks for your effort, this looks very promising prework for the poly expr typing task |
Regarding (7), I hit that earlier as well - but it is a entirely seperate bug, also available in the released product:
I get the same confusing error with e.g. "new java.lang()" This bug goes back to at least Java 11, but Java 8 u232 appears to get it right, explaining that there's no java.lang class. I'm guessing it may have come in with Jigsaw. While I might be able to fix this locally, I think it should really be addressed in the main repo first. I tried finding the bug for it, but didn't find it -- would you like me to report it? |
(1) Renamed DefaultExpression etc. to DefaultValue (and DEFAULT_EXPRESSION to DEFAULT_VALUE) (2) and (3) getClazz is now getType and returns JCExpression (4) Relevant visitor added to SourceComputer (5), (6), and (8) cleaned up (7) has not been addressed, as it appears to be an unrelated bug.
[...]
I agree this should be addressed in mainline first, yes please, could you raise a defect report for that ? Thanks! |
Actually, I think with your work to split Foo.default away from JCFieldAccess, this should be fixed independently in both mainline (for java.lang.class example you report) and in Valhalla for java.lang.default case we are discussing. With the code split, fixing mainline won't automatically fix Valhalla issue with java.lang.default. However, I am fine with that being handled on a separate ticket by itself without blocking or side tracking this PR/RFR and also the work on treating .default as a poly expression. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good Jesper, Can you issue an /integrate command and I will follow it up with /sponsor
Thanks!
/integrate |
/sponsor |
@sadayapalam @jespersm Since your change was applied there have been 2 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit 91c49e4. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
To prepare for making .default a poly expression and to implement further logic, .default-expressions should be split off as a separate AST node.
Progress
Issue
Reviewers
Download
To checkout this PR locally:
$ git fetch https://git.openjdk.java.net/valhalla pull/370/head:pull/370
$ git checkout pull/370
To update a local copy of the PR:
$ git checkout pull/370
$ git pull https://git.openjdk.java.net/valhalla pull/370/head