L2Simple_RunInfalliblePrimitiveNoCheck

class L2Simple_RunInfalliblePrimitiveNoCheck(    val stackp: Int,     val function: A_Function,     val rawFunction: A_RawFunction,     val primitive: Primitive = rawFunction.codePrimitive()!!) : L2SimpleInstruction

Invoke a primitive which is infallible for the given arguments, and does not invoke, suspend, or switch continuations. I.e., it will run to completion and return some value (possibly nil).

The call from which this is distilled must have an expectedType no stronger than the type that the primitive is guaranteed to produce for these arguments. If the expectedType is too strong for this primitive's guarantees (due to a semantic restriction), an L2Simple_Invoke must be generated instead.

Constructors

Link copied to clipboard
fun L2Simple_RunInfalliblePrimitiveNoCheck(    stackp: Int,     function: A_Function,     rawFunction: A_RawFunction,     primitive: Primitive = rawFunction.codePrimitive()!!)

Functions

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

Generate a suitable print representation of the value.

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

A previously constructed continuation is being resumed in some way, and the instruction just before the continuation's L2 offset has been asked to do anything specific to reentering the continuation. For example, a method call might be forced to reify the stack, but at resumption time (i.e., when "returning" into it), it will still need to check the type of the "returned" value against the expected type.

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 function: A_Function
Link copied to clipboard
val primitive: Primitive
Link copied to clipboard
val rawFunction: A_RawFunction
Link copied to clipboard
val stackp: Int