barrier for prototype's cache (with new gray list 'protogray' to keep

prototypes to have their caches visited again) + constant 'MAXMISS'
This commit is contained in:
Roberto Ierusalimschy
2017-05-04 10:32:01 -03:00
parent 8634b2a011
commit 2376eb6347
7 changed files with 95 additions and 22 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: ltests.c,v 2.215 2017/04/24 16:59:26 roberto Exp roberto $
** $Id: ltests.c,v 2.216 2017/04/24 18:06:12 roberto Exp roberto $
** Internal Module for Debugging of the Lua Implementation
** See Copyright Notice in lua.h
*/
@@ -409,6 +409,8 @@ static void checkobject (global_State *g, GCObject *o, int maybedead,
getage(o) == G_TOUCHED1 ||
getage(o) == G_OLD0 ||
o->tt == LUA_TTHREAD ||
(o->tt == LUA_TPROTO &&
(gco2p(o)->cache != NULL || gco2p(o)->cachemiss >= MAXMISS)) ||
(o->tt == LUA_TUPVAL && upisopen(gco2upv(o))));
}
}
@@ -446,6 +448,7 @@ static void markgrays (global_State *g) {
checkgraylist(g, g->weak);
checkgraylist(g, g->ephemeron);
checkgraylist(g, g->allweak);
checkgraylist(g, g->protogray);
}