commit 8e26327b55afd79210216bc33f4d5310349d0496
parent a0e33a2cb5c8b9eee69edff6346817a17249c29a
Author: Andres Navarro <canavarro82@gmail.com>
Date: Sat, 16 Apr 2011 20:18:04 -0300
Bugfix: propagatemark wasn't advancing in scanning the gray list.
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/kgc.c b/src/kgc.c
@@ -75,6 +75,7 @@ static void removeentry (Node *n) {
static void reallymarkobject (klisp_State *K, GCObject *o)
{
+ printf("mark: %p (%s)\n", o, ktv_names[o->gch.tt]);
klisp_assert(iswhite(o) && !isdead(K, o));
white2gray(o);
/* klisp: most of klisp have the same structure, but conserve the switch
@@ -232,6 +233,8 @@ static void traverseproto (global_State *g, Proto *f) {
*/
static int32_t propagatemark (klisp_State *K) {
GCObject *o = K->gray;
+ printf("propagate: %p (%s)\n", o, ktv_names[o->gch.tt]);
+ K->gray = o->gch.gclist;
klisp_assert(isgray(o));
gray2black(o);
uint8_t type = o->gch.tt;