[foreign-jextract] RFR: 8253798: Simplify ClassConstantHelper

Jorn Vernee jvernee at openjdk.java.net
Tue Sep 29 18:50:43 UTC 2020


Hi,

This patch removes a whole bunch of workarounds in jextract code, which are made possible by upstream changes to
foreign-abi.

ClassConstantHelper no longer has to manually canonicalize MemoryLayout constant that represent layout constants in
CLinker. This is now handled by the CValueLayout.describeConstable() override.

Making CValueLayout public also means we can remove the CanonicalField enum from jextract, and rely on the
CValueLayout.Kind instead. (note that since the enum was internal, complex recursive filtering would be needed if we
had kept it).

Thanks,
Jorn

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

Commit messages:
 - Simplify ClassConstantHelper

Changes: https://git.openjdk.java.net/panama-foreign/pull/360/files
 Webrev: https://webrevs.openjdk.java.net/?repo=panama-foreign&pr=360&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8253798
  Stats: 202 lines in 4 files changed: 8 ins; 178 del; 16 mod
  Patch: https://git.openjdk.java.net/panama-foreign/pull/360.diff
  Fetch: git fetch https://git.openjdk.java.net/panama-foreign pull/360/head:pull/360

PR: https://git.openjdk.java.net/panama-foreign/pull/360


More information about the panama-dev mailing list