x-engine-c v0.2.31
The C engine for x-lang
Loading...
Searching...
No Matches
Error Handler Macros

Navigate the error handler pair tree (jmp-ptr (saved-env . previous) error-value). A guard's handler carries the handler it displaced in the previous slot, so every installed handler stays reachable from the error_handler slot while the innermost is; a base-eval handler leaves it nil and is consed onto the target's stack. Every word of the tree is an object: call/cc keeps the handler in a continuation's state list, which the collector tree-marks. The raise line lives in the base's err-line cell, not here. More...

Macros

#define x_error_handler_jmp(H)   x_ptrval(x_firstobj(H))
 
#define x_error_handler_saved_env(H)   x_001(H)
 
#define x_error_handler_error(H)   x_011(H)
 

Detailed Description

Navigate the error handler pair tree (jmp-ptr (saved-env . previous) error-value). A guard's handler carries the handler it displaced in the previous slot, so every installed handler stays reachable from the error_handler slot while the innermost is; a base-eval handler leaves it nil and is consed onto the target's stack. Every word of the tree is an object: call/cc keeps the handler in a continuation's state list, which the collector tree-marks. The raise line lives in the base's err-line cell, not here.

Macro Definition Documentation

◆ x_error_handler_error

#define x_error_handler_error (   H)    x_011(H)

◆ x_error_handler_jmp

#define x_error_handler_jmp (   H)    x_ptrval(x_firstobj(H))

◆ x_error_handler_saved_env

#define x_error_handler_saved_env (   H)    x_001(H)