-
Notifications
You must be signed in to change notification settings - Fork 49
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
8333725: Compiler Prototyping for Deconstructors #94
base: master
Are you sure you want to change the base?
Conversation
👋 Welcome back abimpoudis! A progress list of the required criteria for merging this PR into |
❗ This change is not yet ready to be integrated. |
@biboudis this pull request can not be integrated into git checkout matchers-experiment
git fetch https://git.openjdk.org/amber.git master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push |
|
d635684
to
ccc44d4
Compare
@@ -4286,6 +4366,70 @@ public void visitRecordPattern(JCRecordPattern tree) { | |||
matchBindings = new MatchBindings(outBindings.toList(), List.nil()); | |||
} | |||
|
|||
// todo: follow the protocol in Resolve::selectBest |
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.
this method I think belongs in Resolve
@@ -2779,6 +2779,32 @@ public void visitMethodDef(JCMethodDecl tree) { | |||
syms.methodClass); | |||
} | |||
|
|||
if (tree.sym.isPattern()) { | |||
tree.sym.flags_field |= STATIC; | |||
tree.sym.flags_field |= SYNTHETIC; |
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.
we are making synthetic an AST that actually appears in the source?
src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java
Outdated
Show resolved
Hide resolved
expectedRecordTypes = record.getRecordComponents() | ||
.stream() | ||
.map(rc -> types.memberType(site, rc)) | ||
.map(t -> types.upward(t, types.captures(t)).baseType()) |
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.
not sure why the upward projection is used here
6138923
to
5246297
Compare
bf45138
to
250d702
Compare
src/jdk.compiler/share/classes/com/sun/tools/javac/comp/MemberEnter.java
Outdated
Show resolved
Hide resolved
src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassReader.java
Outdated
Show resolved
Hide resolved
@@ -201,7 +202,7 @@ int putName(Name name) { | |||
* Puts a name and type pair into the pool and returns its index. | |||
*/ | |||
int putNameAndType(Symbol s) { | |||
return pool.writeIfNeeded(new NameAndType(s.name, descriptorType(s))); | |||
return pool.writeIfNeeded(new NameAndType(s instanceof MethodSymbol ms ? ms.externalName(types) : s.name, descriptorType(s))); |
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.
same not sure why you need this change
250d702
to
a19eff9
Compare
Co-authored-by: Angelos Bimpoudis <[email protected]> Co-authored-by: Jan Lahoda <[email protected]> Co-authored-by: Vicente Romero <[email protected]>
a19eff9
to
4c7b0ba
Compare
…o matchers-experiment # Conflicts: # src/java.base/share/classes/java/lang/Class.java
…periment # Conflicts: # src/java.base/share/classes/java/lang/reflect/Constructor.java
…periment # Conflicts: # src/java.base/share/classes/java/lang/Class.java # src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java
…periment # Conflicts: # test/jdk/jdk/classfile/helpers/RebuildingTransformation.java
@biboudis This pull request has been inactive for more than 8 weeks and will be automatically closed if another 8 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! |
Most definitely keep it open :D |
…periment # Conflicts: # src/java.base/share/classes/java/lang/Class.java # test/jdk/jdk/classfile/helpers/RebuildingTransformation.java
Reviewed-by: dfenacci, vlivanov, kvn
Reviewed-by: azvegint, prr
Reviewed-by: egahlin
Reviewed-by: vlivanov, dlong
…terpreter Reviewed-by: fyang, fjiang
Reviewed-by: jsjolen, matsaave
…a leaves Caret is not complete Reviewed-by: azvegint
Reviewed-by: amenkov, sspitsyn, shade
Reviewed-by: dholmes
Reviewed-by: matsaave, sspitsyn, dholmes
* An experiment on PatternType. * Fixing test. * Fixing build. * Fixing tests. * Cleanup.
# Conflicts: # src/java.base/share/classes/java/lang/classfile/Attributes.java
Work-in-progress prototyping of deconstructors.
Progress
Issue
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/amber.git pull/94/head:pull/94
$ git checkout pull/94
Update a local copy of the PR:
$ git checkout pull/94
$ git pull https://git.openjdk.org/amber.git pull/94/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 94
View PR using the GUI difftool:
$ git pr show -t 94
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/amber/pull/94.diff