L1Ext_doSuperCall

L1Ext_doSuperCall(21, LITERAL, LITERAL, LITERAL)

Invoke a method with a supercall.

The first operand is an index into the current code's literals, which specifies a message bundle that is a particular naming of a method which itself contains a collection of method definitions that might be invoked. The stack is expected to contain the top-level arguments, from which their types will be extracted and assembled into a tuple type, which itself will undergo a A_Type.typeUnion with this instruction's third operand, a literal tuple type. The resulting tuple type (the union) will be used to select the method definition to invoke.

The second operand specifies a literal which is the expected return type of the end. When the invoked method eventually returns, the proposed return value is checked against the pushed type, and if it agrees then this stack entry is replaced by the returned value. If it disagrees, a runtime exception is thrown instead.

The third operand specifies a literal which directs the method search. The union of the tuple type derived from the actual arguments' types and this literal tuple type provides a tuple type that can be used to select the method definition that will be invoked.

Functions

Link copied to clipboard
open override fun dispatch(operationDispatcher: L1OperationDispatcher)

Dispatch this operation through an L1OperationDispatcher.

Link copied to clipboard
fun shortName(): String
Link copied to clipboard
fun writeTo(stream: NybbleOutputStream)

Write this operation to a NybbleOutputStream. Do not output operands.

Properties

Link copied to clipboard
val name: String
Link copied to clipboard
val operandTypes: Array<out L1OperandType>

This operation's collection of operand types.

Link copied to clipboard
val ordinal: Int