L2Simple_GeneralCall

class L2Simple_GeneralCall(    val stackp: Int,     val pc: Int,     val nextOffset: Int,     val liveIndices: IntArray,     val expectedType: A_Type,     val mustCheck: Boolean,     val bundle: A_Bundle) : L2Simple_AbstractInvokerInstruction

Extract arguments from registers[stackp], registersstackp-1.. registers[stackp-N+1], and use them to look up a method definition in a polymorphic method. If the lookup is successful, invoke that function, otherwise invoke the AvailRuntime.invalidMessageSendFunction with suitably packaged arguments and the lookup failure code.

Constructors

Link copied to clipboard
fun L2Simple_GeneralCall(    stackp: Int,     pc: Int,     nextOffset: Int,     liveIndices: IntArray,     expectedType: A_Type,     mustCheck: Boolean,     bundle: A_Bundle)

Functions

Link copied to clipboard
fun fieldValueToString(value: Any?): String

Generate a suitable print representation of the value.

Link copied to clipboard
fun handleVariableGetException(    e: VariableGetException,     interpreter: Interpreter,     registers: Array<AvailObject>): StackReifier

A VariableGetException has occurred. Invoke the READ_UNASSIGNED_VARIABLE hook function, which, because it is ⊥-valued, can only reify. Eventually answer that StackReifier.

Link copied to clipboard
fun handleVariableSetException(    e: VariableSetException,     variable: A_Variable,     value: AvailObject,     interpreter: Interpreter,     registers: Array<AvailObject>): StackReifier?

A VariableSetException has occurred. Run the implicit-observe handler, and answer null if it completes, or a suitable StackReifier if it eventually reifies.

Link copied to clipboard
open override fun reenter(registers: Array<AvailObject>, interpreter: Interpreter): StackReifier?

This is called when the invocation for this step had to reify, and now we've finished the actual Avail call and we're attempting to continue where we left off. We have to check the returned value and either capture it on the stack or invoke the result check failure function.

Link copied to clipboard
open override fun step(registers: Array<AvailObject>, interpreter: Interpreter): StackReifier?

Perform this instruction, a single step of an L2SimpleChunk. The mutable Array of AvailObjects acts as a simple set of registers. Element 0 is the current function, and the remaining elements correspond with the continuation slots, should one need to be constructed.

Link copied to clipboard
open override fun toString(): String

Properties

Link copied to clipboard
val bundle: A_Bundle
Link copied to clipboard
val expectedType: A_Type
Link copied to clipboard
val liveIndices: IntArray
Link copied to clipboard
val mustCheck: Boolean
Link copied to clipboard
val nextOffset: Int
Link copied to clipboard
val pc: Int
Link copied to clipboard
val stackp: Int