RFR: 8303374: Compiler Implementation for Primitive types in patterns, instanceof, and switch (Preview) [v41]

Vicente Romero vromero at openjdk.org
Wed Jan 24 04:00:37 UTC 2024


On Mon, 22 Jan 2024 18:42:56 GMT, Aggelos Biboudis <abimpoudis at openjdk.org> wrote:

>> This is the proposed patch for Primitive types in patterns, instanceof, and switch (Preview).
>> 
>> Draft spec here: https://cr.openjdk.org/~abimpoudis/instanceof/latest/
>
> Aggelos Biboudis has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 60 commits:
> 
>  - Improve Javadoc of ExactConversionsSupport
>  - Merge branch 'master' into primitive-patterns
>  - Update ExactConversionsSupport Javadoc and JDK version
>  - Revert "Update copyright year, javadoc, JDK version"
>    
>    This reverts commit 676af9de90d946f64f34762a6df94dbd91bce41b.
>  - Update copyright year, javadoc, JDK version
>  - Merge branch 'master' into primitive-patterns
>  - Merge branch 'master' into primitive-patterns
>  - Cleanup
>  - Merge branch 'master' into primitive-patterns
>  - Remove trailing spaces
>  - ... and 50 more: https://git.openjdk.org/jdk/compare/c9cacfb2...50cb9832

src/java.base/share/classes/java/lang/runtime/SwitchBootstraps.java line 72:

> 70:     private static final Object SENTINEL = new Object();
> 71:     private static final MethodHandles.Lookup LOOKUP = MethodHandles.lookup();
> 72:     private static final boolean previewEnabled = true;

not sure about the use of this constant, do we really need it?

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/15638#discussion_r1464262036


More information about the core-libs-dev mailing list