Package-level declarations

Types

Link copied to clipboard

Primitive: Always fail. The Avail failure code invokes the body block. A handler block is only invoked when an exception is raised.

Link copied to clipboard

Primitive: Get the stackDumpAtom associated with the specified exception.

Link copied to clipboard

Primitive: Exit the given continuation (returning nil to its caller), but only if the provided boolean is true. Otherwise do nothing.

Link copied to clipboard

Primitive: Exit the given continuation (returning result to its caller), but only if the provided boolean is true. Otherwise do nothing.

Link copied to clipboard

Primitive: Invoke the falseBlock.

Link copied to clipboard

Primitive: Invoke the trueBlock.

Link copied to clipboard

Primitive: Function evaluation, given a tuple of arguments. Check the types dynamically to prevent corruption of the type system. Fail if the arguments are not of the required types.

Link copied to clipboard

Primitive: Mark a primitive failure variable from a nearby invocation of P_CatchException. The three states are (1) unmarked and running the body, (2) handling an exception, and (3) running the final ensure clause. If the current state is 1, it can be marked as either 2 or 3. If the state is 2, it can be marked as 3. No other transitions are allowed.

Link copied to clipboard

Primitive: Mark the nearest frame corresponding to an invocation of P_CatchException as ineligible to handle exceptions any longer.

Link copied to clipboard

Primitive: Raise an exception. Scan the stack of continuations until one is found for a function whose code is P_CatchException. Get that continuation's second argument (a tuple of handler functions of one argument), and check if any of the handler functions will accept exceptionValue. If not, keep looking. If it will accept it, unwind the stack so that the P_CatchException continuation is the top entry, and invoke the handler block with exceptionValue. If there is no suitable handler block, then fail this primitive (with the unhandled exception).

Link copied to clipboard

Primitive: Restart the given continuation. Make sure it's a label-like continuation rather than a call-like, because a call-like continuation requires a value to be stored on its stack in order to resume it, something this primitive does not do.

Link copied to clipboard

Primitive: Restart the given continuation, but passing in the given tuple of arguments. Make sure it's a label-like continuation rather than a call-like, because a call-like continuation has the expected return type already pushed on the stack, and requires the return value, after checking against that type, to overwrite the type in the stack (without affecting the stack depth). Fail if the continuation's function is not capable of accepting the given arguments.

Link copied to clipboard

Primitive: Resume the specified continuation.

Link copied to clipboard

Primitive: Run the zero-argument function, ignoring the leading any argument. This is used for short-circuit evaluation.