L2Simple_Invoke

class L2Simple_Invoke(    val stackp: Int,     val pc: Int,     val nextOffset: Int,     val liveIndices: IntArray,     val expectedType: A_Type,     val mustCheck: Boolean,     val function: A_Function) : L2Simple_AbstractInvokerInstruction

Invoke a constant A_Function, perhaps the result of a lookup that was proven at translation time to be monomorphic.

Constructors

Link copied to clipboard
fun L2Simple_Invoke(    stackp: Int,     pc: Int,     nextOffset: Int,     liveIndices: IntArray,     expectedType: A_Type,     mustCheck: Boolean,     function: A_Function)

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 expectedType: A_Type
Link copied to clipboard
val function: A_Function
Link copied to clipboard
val lastArgumentPosition: Int

Capture the last argument's stack position during instruction creation.

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