diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2009-11-09 17:33:46 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2009-11-09 17:33:46 -0800 |
commit | dd68bf698a5618226fb3807d752c4ff73966cb5f (patch) | |
tree | c2da5348387f6c75aa225f00ecbc5b2f7e198788 /gc.c | |
parent | 357121301094005f6c56471fb18f9ff1b6bc8d13 (diff) | |
download | txr-dd68bf698a5618226fb3807d752c4ff73966cb5f.tar.gz txr-dd68bf698a5618226fb3807d752c4ff73966cb5f.tar.bz2 txr-dd68bf698a5618226fb3807d752c4ff73966cb5f.zip |
Changing representation of objects to allow the NUM type to be
unboxed. If the lowest bit of the obj_t * pointer is 1, then
the remaining bits are a number. A lot of assumptions are made:
- the long type can be converted to and from a pointer
- two's complement.
- behavior of << and >> operators when the sign bit is involved.
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -189,7 +189,7 @@ tail_call: #define mark_obj_tail(o) return mark_obj(o) #endif - if (obj == nil) + if (!is_ptr(obj)) return; t = obj->t.type; @@ -380,7 +380,7 @@ int gc_is_reachable(obj_t *obj) { type_t t; - if (obj == nil) + if (!is_ptr(obj)) return 1; t = obj->t.type; |