Change to incremental GC
This commit is contained in:
@@ -24,6 +24,8 @@ struct StackFrame {
|
||||
LispVal *args; // arguments of the function call
|
||||
LispVal *lexenv; // lexical environment (plist)
|
||||
struct LocalReferences local_refs;
|
||||
|
||||
bool marked; // whether we have GC'ed this frame
|
||||
};
|
||||
|
||||
struct LispStack {
|
||||
@@ -69,6 +71,8 @@ static inline void new_lexical_variable(LispVal *name, LispVal *value) {
|
||||
assert(the_stack.depth != 0);
|
||||
LISP_STACK_TOP()->lexenv =
|
||||
CONS(name, CONS(value, LISP_STACK_TOP()->lexenv));
|
||||
LISP_STACK_TOP()->marked = false;
|
||||
gc_mark_stack_for_rescan();
|
||||
}
|
||||
|
||||
// Copy the previous frame's lexenv to the top of the stack.
|
||||
|
||||
Reference in New Issue
Block a user