[foreign-abi] RFR: 8241504: Expose MemoryLayout annotations/attributes in the public API

Jorn Vernee jvernee at openjdk.java.net
Tue Mar 24 12:51:08 UTC 2020


Hi,

This PR exposed MemoryLayout attributes in the public API.

A summary of the changes:
- Renamed annotation -> attribute everywhere to avoid confusion with Java language annotations
- Made sure that annotations were being serialized as part of a MemoryLayout's ConstantDesc, as well as the alignment
  which was previously left out. (The latter also meant changing PaddingLayout::hasNaturalAlignment to always return
  `true`, so serializing alignment is skipped for padding). Removed special casing for the abiType attribute. This can
  now instead be handled through the generic attribute mechanism.

Thanks,
Jorn

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

Commit messages:
 - Removed trailing whitespace
 - Clean up diff
 - Removed abiType, added type-casting helper for attribute
 - Rename annotations to attributes, and expose them in the public API.

Changes: https://git.openjdk.java.net/panama-foreign/pull/64/files
 Webrev: https://webrevs.openjdk.java.net/panama-foreign/64/webrev.00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8241504
  Stats: 283 lines in 15 files changed: 123 ins; 32 del; 128 mod
  Patch: https://git.openjdk.java.net/panama-foreign/pull/64.diff
  Fetch: git fetch https://git.openjdk.java.net/panama-foreign pull/64/head:pull/64

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


More information about the panama-dev mailing list