-
CSR
-
Resolution: Approved
-
P3
-
None
-
behavioral
-
minimal
-
Most of the changes touched by this change are benign, in the sense that the spec changes remove exceptions that cannot occur. The change to MemoryLayout::equals is more substantial, although that's how the implementation was behaving anyway.
-
Java API
-
SE
Summary
The specification for the memory layout API contains some issues that have accumulated as a result of API changes over the various incubation steps.
Problem
More in-depth testing revealed the following issues in the MemoryLayout API javadoc:
the MemoryLayout::equals contract is partially incorrect, as it does not take into account
ValueLayout::carrier
SequenceLayout::reshape
andSequenceLayout::flatten
refer to an erroneous condition that can no longer happen given some simplifications in the API (e.g now all the layouts have a definite size)ValueLayout::arrayElementVarHandle
throws UOE if the alignment constraints are incorrect - but the javadoc text is unclear, and refers to theLayoutPath
API which does not matter here.
Specification
Javadoc: http://cr.openjdk.java.net/~mcimadamore/8289558/v1/javadoc/java.base/module-summary.html
Specdiff: http://cr.openjdk.java.net/~mcimadamore/8289558/v1/specdiff_out/overview-summary.html
- csr of
-
JDK-8289558 Need spec clarification of j.l.foreign.*Layout
-
- Resolved
-