Rewrite the stack
This commit is contained in:
+3
-2
@@ -18,14 +18,15 @@ int main(int argc, const char **argv) {
|
||||
fclose(in);
|
||||
lisp_init();
|
||||
REGISTER_GLOBAL_FUNCTION(print);
|
||||
push_stack_frame(Qnil, Qnil, Qnil);
|
||||
push_local_reference_frame();
|
||||
StackFrame *toplevel = LISP_STACK_REF();
|
||||
ReadStream s;
|
||||
read_stream_init(&s, src, src_len);
|
||||
LispVal *r;
|
||||
while ((r = read(&s))) {
|
||||
Feval(r, Qnil);
|
||||
}
|
||||
pop_stack_frame();
|
||||
unwind_to(toplevel);
|
||||
lisp_shutdown();
|
||||
free(src);
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user