ExecutableChunk

interface ExecutableChunk

An ExecutableChunk represents an optimized implementation of a compiled code object.

Author

Todd L Smith

Functions

Link copied to clipboard
abstract fun name(): String

Answer a descriptive (non-unique) name for the ExecutableChunk.

Link copied to clipboard
abstract 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).

Inheritors

Link copied to clipboard
Link copied to clipboard