summaryrefslogtreecommitdiffstats
path: root/gc.c
diff options
context:
space:
mode:
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gc.c b/gc.c
index 1f31cf54..4f8c41bc 100644
--- a/gc.c
+++ b/gc.c
@@ -39,6 +39,7 @@
#include "stream.h"
#include "hash.h"
#include "txr.h"
+#include "eval.h"
#include "gc.h"
#define PROT_STACK_SIZE 1024
@@ -202,6 +203,8 @@ static void finalize(val obj)
case COBJ:
obj->co.ops->destroy(obj);
return;
+ case ENV:
+ return;
}
assert (0 && "corrupt type field");
@@ -287,6 +290,10 @@ tail_call:
case COBJ:
obj->co.ops->mark(obj);
mark_obj_tail(obj->co.cls);
+ case ENV:
+ mark_obj(obj->e.vbindings);
+ mark_obj(obj->e.fbindings);
+ mark_obj_tail(obj->e.up_env);
}
assert (0 && "corrupt type field");