RFR: 7903239: ofAddress factory of function pointer type is wrong for struct returns [v2]
Marko
duke at openjdk.org
Wed Aug 3 22:16:31 UTC 2022
On Wed, 3 Aug 2022 21:08:33 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> Marko has updated the pull request incrementally with one additional commit since the last revision:
>>
>> add proper tests
>
> test/jtreg/generator/test7903239/Test7903239.java line 51:
>
>> 49: var foo = test7903239_h.foo$SEGMENT();
>> 50:
>> 51: var barA = Foo.a(foo, session).apply();
>
> I think the limitation of the strategy are clearer in this example :-)
> The allocator is decided once and for all when the functional interface instance is obtained. Any other call to `apply` will use the same segment allocator specified on creation. To solve this, I believe the only way is to use the default method setup I described earlier. But the patch is good enough as is for now.
Yes, the tradeoff is quite apparent, but I suppose reasonable to an extent. Your solution is probably the best road to go down when playing around with it though 👍.
-------------
PR: https://git.openjdk.org/jextract/pull/58
More information about the jextract-dev
mailing list