RFR: 7903606: Move layout and function descriptor generation closer to code builders [v3]

Jorn Vernee jvernee at openjdk.org
Mon Dec 11 19:49:47 UTC 2023


On Mon, 11 Dec 2023 19:36:27 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> I was under the impression that this should only find function types for these 2 cases:
>> 
>> 
>>    void (*cb)(void)
>>    void cb(void)
>> 
>> 
>> In which case we want to generate a functional interface. The old code also doesn't seem to follow typedefs for instance, but the new code does. This seems like a behavior change.
>
> Yes, it's a behavior change, but when I wrote the new code, it seemed to me that the old behavior was missing certain cases where we wanted to generate a functional interface accessor?

Yeah... I think so. I don't think we can get into a situation where we try to generate the same interface twice, since for function parameters, the name of the interface is derived from the name of the function, so there's no clash with typedefs possible (and function param names are unique).

-------------

PR Review Comment: https://git.openjdk.org/jextract/pull/156#discussion_r1423043700


More information about the jextract-dev mailing list