[foreign-jextract] RFR: 8252563: Field VarHandle generation in --source mode is missing the PathElement.groupElement argument [v2]
Jorn Vernee
jvernee at openjdk.java.net
Tue Sep 1 13:00:43 UTC 2020
> Hi,
>
> This PR fixes an issue where var handles in structs were not being created based on the layout of the parent struct,
> and were not using a PathElement.groupElement(...) argument to look up the right struct field, in --source mode,
> resulting in the created var handle not having the right offset. The core change is found in
> SourceConstantHelper#emitVarHandleField. To try and clear things up a bit, I've also split the addVarHandle method in
> ConstantHelper into addGlobalVarHandle, and addFieldVarHandle with only the applicable parameter types, at least at the
> ConstantHelper level, so that calling code doesn't have to pass a bunch of nulls when calling addVarHandle for a global
> variable (the nulls being for the parent layout and field name). To test this change, I've re-used the existing
> LibStructTest by running the test twice; once under the existing jtreg jextract driver that uses the binary constant
> helper, and once under a new jtreg jextract driver that first generates sources and then compiles them. Thanks, Jorn
Jorn Vernee has updated the pull request incrementally with one additional commit since the last revision:
Addressing review comment: __ -> ignored
-------------
Changes:
- all: https://git.openjdk.java.net/panama-foreign/pull/297/files
- new: https://git.openjdk.java.net/panama-foreign/pull/297/files/72071c02..aa8414ca
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=panama-foreign&pr=297&range=01
- incr: https://webrevs.openjdk.java.net/?repo=panama-foreign&pr=297&range=00-01
Stats: 3 lines in 3 files changed: 0 ins; 0 del; 3 mod
Patch: https://git.openjdk.java.net/panama-foreign/pull/297.diff
Fetch: git fetch https://git.openjdk.java.net/panama-foreign pull/297/head:pull/297
PR: https://git.openjdk.java.net/panama-foreign/pull/297
More information about the panama-dev
mailing list