summaryrefslogtreecommitdiffstats
path: root/gc.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2009-11-21 11:12:20 -0800
committerKaz Kylheku <kaz@kylheku.com>2009-11-21 11:12:20 -0800
commit4a1556a848c5bfb527cecb2b823a750ba63e6f80 (patch)
treebe9378666222056692e4770a8f0eb79b45ef8993 /gc.c
parent00f823aee439ed8c2cdd71dfbb89385dc68eae7b (diff)
downloadtxr-4a1556a848c5bfb527cecb2b823a750ba63e6f80.tar.gz
txr-4a1556a848c5bfb527cecb2b823a750ba63e6f80.tar.bz2
txr-4a1556a848c5bfb527cecb2b823a750ba63e6f80.zip
Introducing symbol packages. Internal symbols are now in
a system package instead of being hacked with the $ prefix. Keyword symbols are provided. In the matcher, evaluation is tightened up. Keywords, nil and t are not bindeable, and errors are thrown if attempts are made to bind them. Destructuring in dest_bind is strict in the number of items. String streams are exploited to print bindings to objects that are not strings or characters. Numerous bugfixes.
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gc.c b/gc.c
index f195687a..0de0c3f2 100644
--- a/gc.c
+++ b/gc.c
@@ -160,6 +160,7 @@ static void finalize(val obj)
case NUM:
case LIT:
case SYM:
+ case PKG:
case FUN:
return;
case VEC:
@@ -216,7 +217,11 @@ tail_call:
return;
case SYM:
mark_obj(obj->s.name);
- mark_obj_tail(obj->s.val);
+ mark_obj(obj->s.val);
+ mark_obj_tail(obj->s.package);
+ case PKG:
+ mark_obj(obj->pk.name);
+ mark_obj_tail(obj->pk.symhash);
case FUN:
mark_obj(obj->f.env);
if (obj->f.functype == FINTERP)