[foreign] RFR: add test for mutually referring structs
Sundararajan Athijegannathan
sundararajan.athijegannathan at oracle.com
Fri Aug 3 11:28:16 UTC 2018
Looks good.
PS. Would be nice to mention the equivalent C struct declarations in
comments.
-Sundar
On 03/08/18, 1:37 AM, Maurizio Cimadamore wrote:
>
>
> 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