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

Investigate JEP 394: Pattern Matching for instanceof #22296

Open
tgodzik opened this issue Jan 2, 2025 · 2 comments
Open

Investigate JEP 394: Pattern Matching for instanceof #22296

tgodzik opened this issue Jan 2, 2025 · 2 comments
Labels
area:jdk Issues tied to artifacts published under a particular jdk compat:java:jep:stable Issues corresponding to a JEP which got already delivered as a stable feature in a JDK release compat:java:jep Issues corresponding to a JEP (JDK Enhancement Proposal) itype:enhancement

Comments

@tgodzik
Copy link
Contributor

tgodzik commented Jan 2, 2025

JEP 394 introduced Pattern Matching for instanceof. Since we are planning to update to a newer JDK at an unspecified future I hope we can figure out if this is in any way useful to use for example for some bytecode optimization similar to #22249

And if we can actually use them or whether it will be impossible for us.

Introduced in JDK 15

@tgodzik tgodzik added area:jdk Issues tied to artifacts published under a particular jdk compat:java:jep Issues corresponding to a JEP (JDK Enhancement Proposal) compat:java:jep:stable Issues corresponding to a JEP which got already delivered as a stable feature in a JDK release labels Jan 2, 2025
@sjrd
Copy link
Member

sjrd commented Jan 2, 2025

It doesn't seem like this JEP introduced any new byte code. So I believe there is nothing to take advantage of, here.

@He-Pin
Copy link

He-Pin commented Jan 2, 2025

introduce a typeswitch in lambda factory.
java.lang.runtime.SwitchBootstraps#typeSwitch since Java 21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:jdk Issues tied to artifacts published under a particular jdk compat:java:jep:stable Issues corresponding to a JEP which got already delivered as a stable feature in a JDK release compat:java:jep Issues corresponding to a JEP (JDK Enhancement Proposal) itype:enhancement
Projects
None yet
Development

No branches or pull requests

4 participants