RFR: 7903613: Bad nested names are sometimes attached to structs [v10]
Maurizio Cimadamore
mcimadamore at openjdk.org
Thu Jan 11 16:51:14 UTC 2024
On Thu, 11 Jan 2024 13:24:06 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
>> Maurizio Cimadamore has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 20 commits:
>>
>> - Merge branch 'panama' into nested_structs
>> - Add fix and test for unsupported types in nested declarations
>> - Fix whitespaces in test
>> - Minimize diffs
>> - Fix mangling
>> Add mangling test for nested decls
>> - Add more comments
>> - Fix function pointer typedef mangled names for nested struct in param/returns
>> - Better names for function parameter/return structs
>> - Deal with param/return nested decls
>> - Drop spurious changes in OutputFactory
>> - ... and 10 more: https://git.openjdk.org/jextract/compare/82801be6...4c912c74
>
> src/main/java/org/openjdk/jextract/impl/NameMangler.java line 227:
>
>> 225: if (func.argumentTypes().get(i) instanceof Type.Declared declared && declared.tree() == nested) {
>> 226: // it's a function argument
>> 227: suffix = "$x" + i;
>
> Just checking: Is there no way to look up the actual parameter name here?
In the general case no (e.g. variable whose type is a function pointer typedef). We might be able to improve in some selected case (but I'd prefer to address that separately).
-------------
PR Review Comment: https://git.openjdk.org/jextract/pull/167#discussion_r1449131419
More information about the jextract-dev
mailing list