[foreign-memaccess+abi] RFR: Simplify ValueLayouts [v2]

Per Minborg pminborg at openjdk.org
Thu Feb 16 10:26:20 UTC 2023


> This PR proposes a more shortened and simplified scheme when implementing value layouts. 
> 
> This provides a significant reduction of the code size. A new threeary duplicator is introduced. In the solution below, I sugest using a function (`ValueLayoutDuplicator<V>`) which reduces code but arguably makes it a bit more complicated. Another alternative would be to simply mandate a corresponding abstract method and Implement an explicit delegator to the constructor for each type. 
> 
> Let me know your thoughts around how to balance this.

Per Minborg has updated the pull request incrementally with one additional commit since the last revision:

  Rework duplicator

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

Changes:
  - all: https://git.openjdk.org/panama-foreign/pull/798/files
  - new: https://git.openjdk.org/panama-foreign/pull/798/files/b66bb688..dc2c8832

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=panama-foreign&pr=798&range=01
 - incr: https://webrevs.openjdk.org/?repo=panama-foreign&pr=798&range=00-01

  Stats: 28 lines in 2 files changed: 0 ins; 7 del; 21 mod
  Patch: https://git.openjdk.org/panama-foreign/pull/798.diff
  Fetch: git fetch https://git.openjdk.org/panama-foreign pull/798/head:pull/798

PR: https://git.openjdk.org/panama-foreign/pull/798


More information about the panama-dev mailing list