Skip to main content

Crate sema_eval

Crate sema_eval 

Source

Structs§

EvalContext
Interpreter
The interpreter holds the global environment and state.

Enums§

Trampoline
Trampoline for tail-call optimization.

Constants§

SPECIAL_FORM_NAMES
Canonical list of all special form names recognized by the evaluator.

Functions§

call_value
Call a function value with already-evaluated arguments. This is the public API for stdlib functions that need to invoke callbacks.
create_module_env
Create an isolated module env: child of root (global/stdlib) env
eval_module_body_vm
Compile and run a loaded module body on the VM, one top-level form at a time so a defmacro / nested load that registers a macro is visible to later forms before they compile. env is the caller’s shared global env, so defines land in the global scope (matching load semantics). Returns the value of the last form (nil for an empty body).
eval_value_vm
VM-native evaluation for callback consumers (e.g. sema-llm tool handlers): macro-expand, compile, and run expr on a fresh bytecode VM rooted at env. This is the VM-backed counterpart of eval_value, used to keep the eval-callback path off the tree-walker (M5 / Phase 1c). Each call builds a throwaway VM over a clone of env (sharing its bindings), so it is suited to one-shot evaluation rather than a persistent define-accumulating session.
is_debug_session_active
Whether a debug session is active on the current thread.
load_prelude
Register __vm-* native functions that the bytecode VM calls back into the tree-walker for forms that cannot be fully compiled. Load built-in macros (threading, when-let, if-let) into the global environment.
register_vm_delegates
set_debug_session_active
Mark a debug session as active or inactive on the current thread.

Type Aliases§

EvalResult