[foreign-abi] RFR 8228486: Add ABI-specific layout constants
Jorn Vernee
jbvernee at xs4all.nl
Tue Jul 23 21:46:38 UTC 2019
Windows + Shared bits look good, tests pass as well.
About the PTR_LAYOUT in UniversalNativeInvoker (same with PTR_HANDLE in
UUH). I guess this should also be passed into the constructor by the ABI
implementations (like with CallingSequenceBuilder)?
It's only being used for in memory returns currently, but I was thinking
we could remove the in memory return handling from
UniversalNativeInvoker and let ABIs handle that separately (probably
still with some shared utility though), since the way it works is pretty
ABI specific.
Was looking into that among other things, but currently having some
problem with intellij not recognizing our incubator module in my test
projects (I swear it was working yesterday :P)
Jorn
On 2019-07-23 16:10, Maurizio Cimadamore wrote:
> Updated webrev:
>
> http://cr.openjdk.java.net/~mcimadamore/panama/8228486_v2/
>
> Thanks for the comments so far
>
> Maurizio
>
> On 22/07/2019 18:23, Maurizio Cimadamore wrote:
>> Hi,
>> the recent push for JDK-8228447, as expected, broke the foreign-abi
>> branch, since that branch depended on the ValueLayout::isIntegral
>> accessor.
>>
>> This patch replaces that logic with the custom layout annotation logic
>> discussed in [1]:
>>
>> http://cr.openjdk.java.net/~mcimadamore/panama/8228486/
>>
>> This patch makes the following changes:
>>
>> * introduces three set of annotated layout constants, one for
>> supported ABI
>> * the annotations point directly at the ABI-specific argument classes
>> * I've consolidated ArgumentClass a bit, so that now there's a common,
>> ABI-agnostic super-interface with some general predicates
>> * AddressLayout has been removed (we can just look for
>> argumentClass::isPointer)
>> * the tests have been tweaked to use the new ABI-specific constants;
>> since the test has to work across platforms, all ABI test use a new
>> interface which imports the 'right' set of constants
>>
>> While the patch might be a bit raw (I've only tested on Linux x64), I
>> like where this is going.
>>
>> Maurizio
>>
>>
>>
More information about the panama-dev
mailing list