Rewrite the stack

This commit is contained in:
2026-07-18 22:31:01 -07:00
parent 891e5359bf
commit bd7ca2fa25
9 changed files with 343 additions and 200 deletions
+4 -1
View File
@@ -37,7 +37,7 @@ void *lisp_alloc_object(size_t size, LispValType type) {
lisp_gc_yield(NULL, false);
}
if (the_stack.depth > 0) {
add_local_reference_no_recurse(obj);
add_local_reference_no_recurse(LISP_STACK_REF(), obj);
}
lisp_gc_register_object(obj);
return obj;
@@ -74,6 +74,9 @@ noreturn void signal_type_error(LispVal *obj, LispVal *typespec) {
DEFINE_SYMBOL(nil, "nil");
DEFINE_SYMBOL(t, "t");
DEFINE_SYMBOL(unbound, "unbound");
DEFINE_SYMBOL(lexical_environment, "lexical-environment");
LispVal *Vlexical_environment;
DEFUN(id, "id", (LispVal * obj), "(id)", "") {
// TODO not all values are handled here