[foreign-abi] RFR 8237545: Merge C layout constant classes with SystemABI implementations

Jorn Vernee jorn.vernee at oracle.com
Tue Jan 21 12:05:40 UTC 2020


Hi,

Please review the following patch that merges the internal SystemABI 
implementations (which were very minimal) with the layout constant 
classes we already had in the public API, and puts the resulting classes 
under SystemABI. I've also added (back) some dynamic constants that get 
initialized based on the platform we are running on (which saw some 
immediate use in the tests).

It is a good place to house any platform-specific code that is still 
needed in the public API. For instance, should we decide to make layout 
annotations a part of the public API, we can move the different 
ArgumentClassImpl enums here as well.

Moving the SystemABI implementations into the public space also allows 
users to check which platform they are running on by checking the value 
returned by SystemABI::getInstance against one of the implementation 
types (which we've seen some need for in cross-platform code).

As the implementation classes grow, we might want to put them into their 
own source files as well, and create a public `abi` package for them, 
but I've held off on that for now.

Bug: https://bugs.openjdk.java.net/browse/JDK-8237545
Webrev: 
http://cr.openjdk.java.net/~jvernee/panama/webrevs/8237545/webrev.00/

Thanks,
Jorn



More information about the panama-dev mailing list