[foreign-memaccess+abi] Integrated: 8289285: Use records for binding classes

Jorn Vernee jvernee at openjdk.org
Mon Jul 11 15:49:19 UTC 2022


On Tue, 28 Jun 2022 10:42:39 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

> This PR switches the Binding classes to use records. This results in a clean simplification of the code due to the no longer having the need to implement equals/hashcode/toString as well. When we have type patterns for switch, we will also be able to remove the tag, and just switch on the type.
> 
> I also noticed that the UnboxAddress binding had 2 fields that were not being used. In practice this binding always operates on Addressable instances (both in the interpreter and specializer). So, I've cleaned up these 2 fields as well, and related factory method.

This pull request has now been integrated.

Changeset: 37b7935e
Author:    Jorn Vernee <jvernee at openjdk.org>
URL:       https://git.openjdk.org/panama-foreign/commit/37b7935e5193d55748fddbd98a71be4ec5ce519f
Stats:     415 lines in 9 files changed: 15 ins; 280 del; 120 mod

8289285: Use records for binding classes

Reviewed-by: mcimadamore

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

PR: https://git.openjdk.org/panama-foreign/pull/690


More information about the panama-dev mailing list