From f5f3df3bd17fb3489bbd26ab39fe1580a8dbf9c9 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 23 Feb 2017 18:07:34 -0300 Subject: generational collection: new attempt (still incomplete) --- ltests.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'ltests.c') diff --git a/ltests.c b/ltests.c index 6dba514a..ac177de8 100644 --- a/ltests.c +++ b/ltests.c @@ -1,5 +1,5 @@ /* -** $Id: ltests.c,v 2.210 2016/11/07 12:38:35 roberto Exp roberto $ +** $Id: ltests.c,v 2.211 2016/12/04 20:17:24 roberto Exp roberto $ ** Internal Module for Debugging of the Lua Implementation ** See Copyright Notice in lua.h */ @@ -195,9 +195,13 @@ static int testobjref1 (global_State *g, GCObject *f, GCObject *t) { static void printobj (global_State *g, GCObject *o) { - printf("||%s(%p)-%c(%02X)||", + printf("||%s(%p)-%c%c(%02X)||", ttypename(novariant(o->tt)), (void *)o, - isdead(g,o)?'d':isblack(o)?'b':iswhite(o)?'w':'g', o->marked); + isdead(g,o) ? 'd' : isblack(o) ? 'b' : iswhite(o) ? 'w' : 'g', + testbit(o->marked, OLDBIT) ? 'o' : 'n', + o->marked); + if (o->tt == LUA_TSHRSTR || o->tt == LUA_TLNGSTR) + printf(" '%s'", getstr(gco2ts(o))); } @@ -364,8 +368,6 @@ static void checkobject (global_State *g, GCObject *o, int maybedead) { } -#define TESTGRAYBIT 7 - static void checkgraylist (global_State *g, GCObject *o) { ((void)g); /* better to keep it available if we need to print an object */ while (o) { -- cgit v1.2.3-55-g6feb