[foreign] RFR: do not infer layout from Java signatures
Maurizio Cimadamore
maurizio.cimadamore at oracle.com
Fri May 18 11:30:25 UTC 2018
Hi,
as part of the cleanup I pushed yesterday, I realized there are quite
few places where the binder infers layouts from the Java signatures
rather than sticking to what the annotations say. This patch fixes such
bad usages.
http://cr.openjdk.java.net/~mcimadamore/panama/dont-infer-layout-v2/src/java.base/share/classes/jdk/internal/nicl/Util.java.udiff.html
The only place where we need to do something like this is with variadic
calls; so Util still has a function that goes from Class to Layout, but
its scope is much more limited, and the resulting layout is also
approximate (I've added comments in that direction), since varargs are
always passed in register-aligned slots, regardless of the underlying
real layout - so we don't need much 'inference' there.
I fixed a test which was missing layout annotation in a Java callback.
Maurizio
More information about the panama-dev
mailing list