runChunk

open override fun runChunk(interpreter: Interpreter, offset: Int): StackReifier?

Run the ExecutableChunk to completion. Note that a reification request may cut this short. For an initial invocation, the Interpreter.argsBuffer will have been set up for the call. For a return into this continuation, the offset will refer to code that will rebuild the register set from the top reified continuation, using the Interpreter.getLatestResult. For resuming the continuation, the offset will point to code that also rebuilds the register set from the top reified continuation, but it won't expect a return value. These re-entry points should perform validity checks on the chunk, allowing an orderly off-ramp into the unoptimizedChunk (which simply interprets the L1 nybblecodes).

Return

null if returning normally, otherwise a StackReifier to effect reification.

Parameters

interpreter

An interpreter that is appropriately setup to execute the receiver.

offset

The offset at which to begin execution.