[foreign-memaccess+abi] RFR: 8274219: Add back generic factory to create value layouts

Maurizio Cimadamore mcimadamore at openjdk.java.net
Thu Sep 23 17:14:21 UTC 2021


This patch adds back a factory to create value layouts in a generic way. While we cannot make the API 100% type safe, some dynamic usages can greatly benefit from this. The `Binding` class provides a good example (greatly simplified here). Also, the logic for reconstructing layouts (see `describeConstable`) becomes a lot more regular.

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

Commit messages:
 - Add factory for value layouts

Changes: https://git.openjdk.java.net/panama-foreign/pull/579/files
 Webrev: https://webrevs.openjdk.java.net/?repo=panama-foreign&pr=579&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8274219
  Stats: 172 lines in 4 files changed: 87 ins; 78 del; 7 mod
  Patch: https://git.openjdk.java.net/panama-foreign/pull/579.diff
  Fetch: git fetch https://git.openjdk.java.net/panama-foreign pull/579/head:pull/579

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


More information about the panama-dev mailing list