attempt

open override fun attempt(interpreter: Interpreter): Primitive.Result

Attempt this primitive with the given Interpreter. The interpreter's argument list must be set up prior to this call. If the primitive fails, it should set the primitive failure code by calling Interpreter.primitiveFailure and returning its result from the primitive. Otherwise it should set the interpreter's primitive result by calling Interpreter.primitiveSuccess and then return its result from the primitive. For unusual primitives that replace the current continuation, Result.CONTINUATION_CHANGED is more appropriate, and the latestResult need not be set. For primitives that need to cause a context switch, Result.FIBER_SUSPENDED should be returned.

Return

The Result code indicating success or failure (or special circumstance).

Parameters

interpreter

The Interpreter that is executing.