RFR: Backport: 7903449: Jextract generates structs that cannot be compiled

Jorn Vernee jvernee at openjdk.org
Tue Apr 11 10:53:45 UTC 2023


Backport https://github.com/openjdk/jextract/pull/117 to the master branch.

Patch applied relatively cleanly. I had to change some reference from `Arena` to `SegmentScope` in the generated code, and there was a reference to `MS::reinterpret` that was changed back to `ofAddress`.

Additional changes needed:
- AddressLayout -> ValueLayout.ofAddress
- AddressLayout::withTargetLayout -> AddressLayout::asUnbounded
- reimplement ValueLayout::withoutName as helper function

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

Commit messages:
 - Backport: 7903449: Jextract generates structs that cannot be compiled

Changes: https://git.openjdk.org/jextract/pull/118/files
 Webrev: https://webrevs.openjdk.org/?repo=jextract&pr=118&range=00
  Stats: 1370 lines in 10 files changed: 600 ins; 644 del; 126 mod
  Patch: https://git.openjdk.org/jextract/pull/118.diff
  Fetch: git fetch https://git.openjdk.org/jextract.git pull/118/head:pull/118

PR: https://git.openjdk.org/jextract/pull/118


More information about the jextract-dev mailing list