|
microlisp 0.1.0
A small Scheme-subset interpreter in modern C.
|
Options controlling a state. More...
#include <microlisp.h>

Data Fields | |
| const microlisp_allocator * | allocator |
| Allocator. | |
| size_t | max_read_depth |
| Maximum reader nesting depth. | |
| size_t | max_eval_depth |
| Maximum evaluator recursion depth. | |
| size_t | max_print_depth |
| Maximum printer pair-walk depth. | |
| size_t | max_equal_depth |
| Maximum structural-equality walk depth. | |
| size_t | gc_initial_threshold |
| Hard ceiling on heap objects between GC collections. | |
Options controlling a state.
Zero-initialize to use defaults; pass NULL to microlisp_state_create for "all defaults."
| const microlisp_allocator* microlisp_options::allocator |
Allocator.
NULL means stdlib malloc / free.
| size_t microlisp_options::gc_initial_threshold |
Hard ceiling on heap objects between GC collections.
0 means "use the built-in default" (currently 4096 objects, doubling with the live set after each collection). This is a heuristic knob, not a contract: collection policy may change between minor releases.
| size_t microlisp_options::max_equal_depth |
Maximum structural-equality walk depth.
0 means MICROLISP_DEFAULT_MAX_EQUAL_DEPTH. equal? and eqv? on trees deeper than this fail with MICROLISP_ERR_EQUAL_DEPTH instead of exhausting the host C stack. Same v0.2-iterative plan as the printer.
| size_t microlisp_options::max_eval_depth |
Maximum evaluator recursion depth.
0 means MICROLISP_DEFAULT_MAX_EVAL_DEPTH. Tail-recursive code runs in constant C-stack space regardless of this limit; the cap only constrains non-tail-recursive invocations that grow the host C stack. Forms that exceed it fail with MICROLISP_ERR_EVAL_DEPTH.
| size_t microlisp_options::max_print_depth |
Maximum printer pair-walk depth.
0 means MICROLISP_DEFAULT_MAX_PRINT_DEPTH. Output of trees deeper than this fails with MICROLISP_ERR_PRINT_DEPTH instead of exhausting the host C stack. v0.1's printer is recursive on the pair-car axis; the limit bounds the worst case until v0.2's iterative printer lands.
| size_t microlisp_options::max_read_depth |
Maximum reader nesting depth.
0 means MICROLISP_DEFAULT_MAX_READ_DEPTH. Forms deeper than the limit fail with MICROLISP_ERR_READ_DEPTH.