diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2017-05-04 10:32:01 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2017-05-04 10:32:01 -0300 |
| commit | 2376eb634751f92e6bcb9dc8dbc1ef88b9873319 (patch) | |
| tree | 579780bc7ff3d1374a701298749eca3634a17edb /ltests.c | |
| parent | 8634b2a0119e698e362fdb765f30258e79e1dfd0 (diff) | |
| download | lua-2376eb634751f92e6bcb9dc8dbc1ef88b9873319.tar.gz lua-2376eb634751f92e6bcb9dc8dbc1ef88b9873319.tar.bz2 lua-2376eb634751f92e6bcb9dc8dbc1ef88b9873319.zip | |
barrier for prototype's cache (with new gray list 'protogray' to keep
prototypes to have their caches visited again) + constant 'MAXMISS'
Diffstat (limited to 'ltests.c')
| -rw-r--r-- | ltests.c | 5 |
1 files changed, 4 insertions, 1 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ltests.c,v 2.215 2017/04/24 16:59:26 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 2.216 2017/04/24 18:06:12 roberto Exp roberto $ |
| 3 | ** Internal Module for Debugging of the Lua Implementation | 3 | ** Internal Module for Debugging of the Lua Implementation |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -409,6 +409,8 @@ static void checkobject (global_State *g, GCObject *o, int maybedead, | |||
| 409 | getage(o) == G_TOUCHED1 || | 409 | getage(o) == G_TOUCHED1 || |
| 410 | getage(o) == G_OLD0 || | 410 | getage(o) == G_OLD0 || |
| 411 | o->tt == LUA_TTHREAD || | 411 | o->tt == LUA_TTHREAD || |
| 412 | (o->tt == LUA_TPROTO && | ||
| 413 | (gco2p(o)->cache != NULL || gco2p(o)->cachemiss >= MAXMISS)) || | ||
| 412 | (o->tt == LUA_TUPVAL && upisopen(gco2upv(o)))); | 414 | (o->tt == LUA_TUPVAL && upisopen(gco2upv(o)))); |
| 413 | } | 415 | } |
| 414 | } | 416 | } |
| @@ -446,6 +448,7 @@ static void markgrays (global_State *g) { | |||
| 446 | checkgraylist(g, g->weak); | 448 | checkgraylist(g, g->weak); |
| 447 | checkgraylist(g, g->ephemeron); | 449 | checkgraylist(g, g->ephemeron); |
| 448 | checkgraylist(g, g->allweak); | 450 | checkgraylist(g, g->allweak); |
| 451 | checkgraylist(g, g->protogray); | ||
| 449 | } | 452 | } |
| 450 | 453 | ||
| 451 | 454 | ||
