Integrated: 8297733: Refactor Cast binding to enum
Jorn Vernee
jvernee at openjdk.org
Mon Dec 5 15:32:40 UTC 2022
On Mon, 28 Nov 2022 20:13:35 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
> Refactor the cast binding to an enum, which clearly enumerates all supported conversions.
>
> This also fixes a bug where `java/foreign/normalize/TestNormalize` was failing when running in interpreted mode (`-Djdk.internal.foreign.DowncallLinker.USE_SPEC=false`), for conversions from `int` to `byte` because the `explicitCast` method handle that was used only considers the least significant bit, while we want to look at all of the least significant byte.
>
> As mentioned in the JBS issue, doing this will also make it easier going forward to support multiple conversions with the same from and to types, but requiring different semantics.
>
> Testing: jdk_foreign test suite.
This pull request has now been integrated.
Changeset: a38c63da
Author: Jorn Vernee <jvernee at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/a38c63da5632fe727838ff1ed88d9601bf954801
Stats: 82 lines in 2 files changed: 56 ins; 14 del; 12 mod
8297733: Refactor Cast binding to enum
Reviewed-by: mcimadamore
-------------
PR: https://git.openjdk.org/jdk/pull/11397
More information about the core-libs-dev
mailing list