[code-reflection] RFR: 8337162: Support primitives in patterns [v5]

Paul Sandoz psandoz at openjdk.org
Tue Oct 8 17:37:25 UTC 2024


On Tue, 8 Oct 2024 16:44:03 GMT, Mourad Abbay <mabbay at openjdk.org> wrote:

>> Support primitives in patterns
>
> Mourad Abbay has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - Create JavaType of ExactConversionSupport from its class descriptor (compiler couldn't find the class)
>  - Update how we build the model for testing a conversion

test/jdk/java/lang/reflect/code/TestPrimitiveTypePatterns.java line 60:

> 58:     @CodeReflection
> 59:     // works as generic model that will be transformed to test conversion from a sourceType to targetType
> 60:     static boolean f(byte b) {

Alas unfortunately such a transformation it is harder than i anticipated because the types permeate through pattern match operation, so you have to replace the whole pattern match op. Which means you might as well build the model explicitly, sorry if i misled you.

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

PR Review Comment: https://git.openjdk.org/babylon/pull/246#discussion_r1792263126


More information about the babylon-dev mailing list