summaryrefslogtreecommitdiffstats
path: root/gc.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2009-12-08 13:48:19 -0800
committerKaz Kylheku <kaz@kylheku.com>2009-12-08 13:48:19 -0800
commit08ee01ea9e6bd1bedd565f9e0e1c1a8938710887 (patch)
tree9d7c5017323261a681b8458b2dbd7ffe105e56fd /gc.c
parent0c86abee82a66963ec3c46e36c63ba8df89e1fa9 (diff)
downloadtxr-08ee01ea9e6bd1bedd565f9e0e1c1a8938710887.tar.gz
txr-08ee01ea9e6bd1bedd565f9e0e1c1a8938710887.tar.bz2
txr-08ee01ea9e6bd1bedd565f9e0e1c1a8938710887.zip
All COBJ operations have default implementations now;
no null pointer check over struct cobj_ops operations. New typechecking function for COBJ objects.
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/gc.c b/gc.c
index 1a48ab2f..2a659e2b 100644
--- a/gc.c
+++ b/gc.c
@@ -196,14 +196,17 @@ static void finalize(val obj)
case LSTR:
return;
case COBJ:
- if (obj->co.ops->destroy)
- obj->co.ops->destroy(obj);
+ obj->co.ops->destroy(obj);
return;
}
assert (0 && "corrupt type field");
}
+void cobj_destroy_op(val obj)
+{
+}
+
static void mark_obj(val obj)
{
type_t t;
@@ -272,14 +275,17 @@ tail_call:
mark_obj(obj->ls.opts);
mark_obj_tail(obj->ls.list);
case COBJ:
- if (obj->co.ops->mark)
- obj->co.ops->mark(obj);
+ obj->co.ops->mark(obj);
mark_obj_tail(obj->co.cls);
}
assert (0 && "corrupt type field");
}
+void cobj_mark_op(val obj)
+{
+}
+
static int in_heap(val ptr)
{
heap_t *heap;