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

Maurizio Cimadamore mcimadamore at openjdk.org
Thu Oct 5 10:10:22 UTC 2023


On Thu, 5 Oct 2023 08:20:58 GMT, Aggelos Biboudis <abimpoudis at openjdk.org> wrote:

>> This is the first draft of a patch for Primitive types in patterns, instanceof, and switch (Preview).
>> 
>> Draft spec here: https://cr.openjdk.org/~abimpoudis/instanceof/instanceof-20230913/specs/instanceof-jls.html
>
> Aggelos Biboudis has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Declutter Lower.visitTypeTest

src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Lower.java line 2938:

> 2936:                 }
> 2937:             }
> 2938:             else if (tree.expr.type.isReference()) {

Much better logic!

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

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


More information about the core-libs-dev mailing list