Skip to content

8333725: Compiler Prototyping for Deconstructors - #94

Closed
biboudis wants to merge 141 commits into
openjdk:masterfrom
biboudis:matchers-experiment
Closed

8333725: Compiler Prototyping for Deconstructors#94
biboudis wants to merge 141 commits into
openjdk:masterfrom
biboudis:matchers-experiment

Conversation

@biboudis

@biboudis biboudis commented May 13, 2024

Copy link
Copy Markdown
Member

Work-in-progress prototyping of deconstructors.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Warnings

 ⚠️ Patch contains a binary file (src/java.desktop/share/classes/javax/swing/beaninfo/images/JAppletColor16.gif)
 ⚠️ Patch contains a binary file (src/java.desktop/share/classes/javax/swing/beaninfo/images/JAppletColor32.gif)
 ⚠️ Patch contains a binary file (src/java.desktop/share/classes/javax/swing/beaninfo/images/JAppletMono16.gif)
 ⚠️ Patch contains a binary file (src/java.desktop/share/classes/javax/swing/beaninfo/images/JAppletMono32.gif)
 ⚠️ Patch contains a binary file (src/java.desktop/share/classes/javax/swing/doc-files/JRootPane-1.gif)
 ⚠️ Patch contains a binary file (test/jdk/javax/rmi/ssl/keystore)
 ⚠️ Patch contains a binary file (test/jdk/javax/rmi/ssl/truststore)
 ⚠️ Patch contains a binary file (test/jdk/jdk/internal/loader/URLClassPath/testclasses.jar)
 ⚠️ Patch contains a binary file (test/jdk/sun/net/www/protocol/https/HttpsClient/dnsstore)
 ⚠️ Patch contains a binary file (test/jdk/sun/net/www/protocol/https/HttpsClient/ipstore)

Issue

  • JDK-8333725: Compiler Prototyping for Deconstructors (Enhancement - P4)

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

@bridgekeeper

bridgekeeper Bot commented May 13, 2024

Copy link
Copy Markdown

👋 Welcome back abimpoudis! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk

openjdk Bot commented May 13, 2024

Copy link
Copy Markdown

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk

openjdk Bot commented May 13, 2024

Copy link
Copy Markdown

@biboudis this pull request can not be integrated into master due to one or more merge conflicts. To resolve these merge conflicts and update this pull request you can run the following commands in the local repository for your personal fork:

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

@openjdk openjdk Bot added the merge-conflict The pull request has a merge conflict with the target branch label May 13, 2024
@biboudis
biboudis marked this pull request as draft May 13, 2024 14:20
@openjdk

openjdk Bot commented May 13, 2024

Copy link
Copy Markdown

⚠️ @biboudis This pull request contains merges that bring in commits not present in the target repository. Since this is not a "merge style" pull request, these changes will be squashed when this pull request in integrated. If this is your intention, then please ignore this message. If you want to preserve the commit structure, you must change the title of this pull request to Merge <project>:<branch> where <project> is the name of another project in the OpenJDK organization (for example Merge jdk:master).

@openjdk openjdk Bot removed the merge-conflict The pull request has a merge conflict with the target branch label May 13, 2024
@biboudis
biboudis force-pushed the matchers-experiment branch from d635684 to ccc44d4 Compare May 27, 2024 11:24
matchBindings = new MatchBindings(outBindings.toList(), List.nil());
}

// todo: follow the protocol in Resolve::selectBest

Copy link
Copy Markdown
Collaborator

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


if (tree.sym.isPattern()) {
tree.sym.flags_field |= STATIC;
tree.sym.flags_field |= SYNTHETIC;

Copy link
Copy Markdown
Collaborator

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?

Comment thread src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java Outdated
Comment thread test/test/Point.class Outdated
@openjdk openjdk Bot added the merge-conflict The pull request has a merge conflict with the target branch label Jun 3, 2024
expectedRecordTypes = record.getRecordComponents()
.stream()
.map(rc -> types.memberType(site, rc))
.map(t -> types.upward(t, types.captures(t)).baseType())

Copy link
Copy Markdown
Collaborator

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

@openjdk openjdk Bot removed the merge-conflict The pull request has a merge conflict with the target branch label Jun 6, 2024
@biboudis
biboudis force-pushed the matchers-experiment branch from 6138923 to 5246297 Compare June 6, 2024 13:46
@biboudis biboudis changed the title Pattern Declarations Compiler Prototyping for Deconstructors Jun 6, 2024
@biboudis biboudis changed the title Compiler Prototyping for Deconstructors 8333725: Compiler Prototyping for Deconstructors Jun 6, 2024
@biboudis
biboudis force-pushed the matchers-experiment branch 2 times, most recently from bf45138 to 250d702 Compare June 6, 2024 14:12
Comment thread src/java.base/share/classes/java/lang/Class.java Outdated
Comment thread src/java.base/share/classes/java/lang/Class.java
Comment thread src/java.base/share/classes/java/lang/Class.java Outdated
Comment thread src/java.base/share/classes/java/lang/Class.java Outdated
Comment thread src/java.base/share/classes/java/lang/Class.java Outdated
Comment thread src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java
Comment thread src/jdk.compiler/share/classes/com/sun/tools/javac/comp/MemberEnter.java Outdated
Comment thread src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassReader.java Outdated
Comment thread src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Items.java
*/
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)));

Copy link
Copy Markdown
Collaborator

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

@biboudis
biboudis force-pushed the matchers-experiment branch from 250d702 to a19eff9 Compare June 6, 2024 21:13
Co-authored-by: Angelos Bimpoudis <angelos.bimpoudis@oracle.com>
Co-authored-by: Jan Lahoda <jan.lahoda@oracle.com>
Co-authored-by: Vicente Romero <vicente.romero@oracle.com>
@biboudis
biboudis force-pushed the matchers-experiment branch from a19eff9 to 4c7b0ba Compare June 7, 2024 07:42
@openjdk openjdk Bot added the merge-conflict The pull request has a merge conflict with the target branch label Jun 17, 2024
…o matchers-experiment

# Conflicts:
#	src/java.base/share/classes/java/lang/Class.java
@openjdk openjdk Bot removed the merge-conflict The pull request has a merge conflict with the target branch label Jun 17, 2024
@openjdk openjdk Bot added the merge-conflict The pull request has a merge conflict with the target branch label Jun 5, 2025
kevinb9n and others added 20 commits June 5, 2025 15:13
Fixing a crash when javac is highlighting a deconstructor
…nce-pattern-parsing' into matchers-experiment-instance-pattern-parsing
…hers-experiment-instance-pattern-parsing-overloading
…ern-parsing

An attempt to parse instance patterns more correctly.
…pattern-parsing-overloading

# Conflicts:
#	src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java
@bridgekeeper

bridgekeeper Bot commented Jul 17, 2025

Copy link
Copy Markdown

@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 issue a /touch or /keepalive command to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@Rick-24

Rick-24 commented Jul 17, 2025 via email

Copy link
Copy Markdown

@biboudis biboudis closed this Sep 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-conflict The pull request has a merge conflict with the target branch

Development

Successfully merging this pull request may close these issues.

7 participants