[foreign] RFR: add test for mutually referring structs

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Thu Aug 2 20:07:11 UTC 2018



On 02/08/18 19:57, Henry Jen wrote:
> +1.
>
> My eyes and brain hurts looking at it :P
I have a follow up test for pointers to arrays which is even more 
convoluted :-)
>
> Test hard coded with layout string works on 64-bit platform, that’s not a big deal as it’s what we supported now. However, if we want to use jextract over C declaration code, it can be done with JtregJextract helper class.
Right, test used 64 - but it could use any pointer size N, as the test 
doesn't really interop with any native library (in which case size would 
be an issue). This is merely creating a layout such and such, and verify 
that certain properties hold.

Maurizio
>
> Cheers,
> Henry
>
>
>> On Aug 2, 2018, at 5:10 AM, Maurizio Cimadamore <maurizio.cimadamore at oracle.com> wrote:
>>
>> Hi,
>> as part of some worek I'm doing on unresolved layout, I thought it would be a good idea to start checking in some tests stressing the unresolved layout resolution machinery, so that, if we make changes in this area, we make sure we do not regress.
>>
>> This test checks two mutually referring structs; there are two flavor of the test, one where the structs refer to each other with a pointer, another where the structs refer to themselves via a double pointer.
>>
>> Webrev:
>>
>> http://cr.openjdk.java.net/~mcimadamore/panama/mutual-structs/
>>
>> Maurizio
>>



More information about the panama-dev mailing list