8244720: Check MethodType and FunctionDescritpor used when linking #158
This patch adds exhaustive checking to the MethodType and FunctionDescriptor used to link down calls and upcalls.
These checks define and enforce a set of acceptable carrier types, as well as which carrier type & memory layout combinations are acceptable. The set of accepted carrier types is:
For (1), it is also checked that the used MemoryLayout is a ValueLayout, and that the size of the carrier matches the size of the layout. For (2) the expected layout must also be a ValueLayout, and again the size is checked. For (3) it is only checked that the layout is a GroupLayout, (since we don't have access to the size of the segment when linking).
This makes it easier to reason about the set of MethodType and FunctionDescriptor combinations that can be used during linking, as well as helping to catch any errors made with mismatching carrier types and memory layouts.
The additional checks turned up 2 cases of carrier type to memory layout mismatch in StdLibTest, which I've fixed.
@JornVernee This change now passes all automated pre-integration checks, type
There are currently no new commits on the