RFR: 8303374: Compiler Implementation for Primitive types in patterns, instanceof, and switch (Preview) [v27]
Aggelos Biboudis
abimpoudis at openjdk.org
Mon Oct 30 22:27:18 UTC 2023
> This is the proposed patch for Primitive types in patterns, instanceof, and switch (Preview).
>
> Draft spec here: https://cr.openjdk.org/~abimpoudis/instanceof/jep443-20231010/specs/instanceof-jls.html
Aggelos Biboudis has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 33 commits:
- Merge branch 'master' into primitive-patterns
# Conflicts:
# src/jdk.compiler/share/classes/com/sun/tools/javac/code/Preview.java
# src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java
- Add tests for new data types in switch statements
- Fix Bootstrap initialization error by using `explicitCastArguments` for integral tests
- Fix SwitchBootstraps for pattern matching over longs
- Merge branch 'master' into primitive-patterns
- Improve javadoc of ExactConversionsSupport
Co-authored-by: Raffaello Giulietti <raffaello.giulietti at oracle.com>
- Adjust javadoc on ExactConversionsSupport
- Merge branch 'master' into primitive-patterns
- Address review
- Add comments
- Rename exactness methods
- Use convenience methods from TypeTag for checkUnconditionallyExactPrimitives in Types
- Port isStrictSubRangeOf to Wrapper and use it for unconditionalExactnessCheck in SwitchBootstraps
- Fix duplicate method name and add a new test in PrimitivePatternsSwitchErrors
- ... and 23 more: https://git.openjdk.org/jdk/compare/1ca2cfaf...b437373b
-------------
Changes: https://git.openjdk.org/jdk/pull/15638/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15638&range=26
Stats: 3055 lines in 40 files changed: 2799 ins; 111 del; 145 mod
Patch: https://git.openjdk.org/jdk/pull/15638.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/15638/head:pull/15638
PR: https://git.openjdk.org/jdk/pull/15638
More information about the core-libs-dev
mailing list