SEMANTIC_RESTRICTIONS_SET
Content copied to clipboard
A set of semantic restrictions which, when their functions are invoked with suitable types as arguments, will determine whether the call arguments have mutually compatible types, and if so produce a type to which the call's return value is expected to conform. This type strengthening is assumed to hold at compile time (of the call) and checked at runtime.
When the L2Generator inlines a Primitive method definition, it asks the primitive what type it guarantees (Primitive.returnTypeGuaranteedByVM) to return for the specific provided argument types. If that return type is sufficiently strong, the above runtime check may be waived.