[foreign-abi] Integrated: 8253255: Investigate replacing ABI layout attributes with custom subtypes of ValueLayout

Jorn Vernee jvernee at openjdk.java.net
Tue Sep 29 12:02:08 UTC 2020


On Mon, 28 Sep 2020 16:01:30 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

> Hi,
> 
> This patch removes ABI attributes, and replaces them with a custom ValueLayout subtype, called CValueLayout.
> 
> This, for one, allows us to override the describeConstable method to return a dynamic constant descriptor that will
> load the public constant field in CLinker. This avoids getting illegal access errors when trying to resolve the
> internal ABI attributes. The illegal access error was forcing clients, like jextract, to basically re-implement the
> describeConstable methods for FunctionDescriptor, GroupLayout, SequenceLayout and ValueLayout in order the
> 'cannonicalize' these constant descriptors to reference the fields.  Most of the needed changes were in the TypeClass
> classes, which now need to map the CValueLayout.Kind into the appropriate ABI classes (though doing this was pretty
> straight forward).  I've also added a test to make sure it is possible to resolve constant descriptors with these
> CValueLayouts inside with a public Lookup object.  Thanks, Jorn

This pull request has now been integrated.

Changeset: 79c2bf5d
Author:    Jorn Vernee <jvernee at openjdk.org>
URL:       https://git.openjdk.java.net/panama-foreign/commit/79c2bf5d
Stats:     593 lines in 15 files changed: 352 ins; 163 del; 78 mod

8253255: Investigate replacing ABI layout attributes with custom subtypes of ValueLayout

Reviewed-by: mcimadamore

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

PR: https://git.openjdk.java.net/panama-foreign/pull/358


More information about the panama-dev mailing list