diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-05-12 21:03:42 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-05-12 21:03:42 -0700 |
commit | 146229666d039720e5ee56d21b8e937abc23f18a (patch) | |
tree | 890de2470a4eabdec8e6bc91a697cbe91648e8d6 /gc.c | |
parent | fffdf3f4287dd8636657969a7e39e5a544cdb885 (diff) | |
download | txr-146229666d039720e5ee56d21b8e937abc23f18a.tar.gz txr-146229666d039720e5ee56d21b8e937abc23f18a.tar.bz2 txr-146229666d039720e5ee56d21b8e937abc23f18a.zip |
gc: use symbolic constants for special vec slots.
* gc.c (mark_obj): The vector alloc size and length
which lie at negative indices should be accessed using
the index constants vec_alloc and vec_length, rather
than -2 and -1.
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -371,12 +371,12 @@ tail_call: return; case VEC: { - val alloc_size = obj->v.vec[-2]; - val fill_ptr = obj->v.vec[-1]; - cnum i, fp = c_num(fill_ptr); + val alloc_size = obj->v.vec[vec_alloc]; + val len = obj->v.vec[vec_length]; + cnum i, fp = c_num(len); mark_obj(alloc_size); - mark_obj(fill_ptr); + mark_obj(len); for (i = 0; i < fp; i++) mark_obj(obj->v.vec[i]); |