diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-10-23 17:12:19 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-10-23 17:12:19 -0200 |
| commit | 5bc91c640588ca77b9f84146fc88fcc9bdbfbcd1 (patch) | |
| tree | d5d049ad2357648cabe25c19a8620566e9f27131 /ltests.c | |
| parent | f5073de0a72562e1998f23052715e56a3b9fde18 (diff) | |
| download | lua-5bc91c640588ca77b9f84146fc88fcc9bdbfbcd1.tar.gz lua-5bc91c640588ca77b9f84146fc88fcc9bdbfbcd1.tar.bz2 lua-5bc91c640588ca77b9f84146fc88fcc9bdbfbcd1.zip | |
no more one environment per thread: all threads share a single global
environment
Diffstat (limited to 'ltests.c')
| -rw-r--r-- | ltests.c | 5 |
1 files changed, 3 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ltests.c,v 2.75 2009/10/05 16:44:33 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 2.76 2009/10/11 20:02:19 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 | */ |
| @@ -305,7 +305,6 @@ static void checkstack (global_State *g, lua_State *L1) { | |||
| 305 | lua_assert(uv->v != &uv->u.value); /* must be open */ | 305 | lua_assert(uv->v != &uv->u.value); /* must be open */ |
| 306 | lua_assert(!isblack(uvo)); /* open upvalues cannot be black */ | 306 | lua_assert(!isblack(uvo)); /* open upvalues cannot be black */ |
| 307 | } | 307 | } |
| 308 | checkliveness(g, gt(L1)); | ||
| 309 | for (ci = L1->ci; ci != NULL; ci = ci->previous) { | 308 | for (ci = L1->ci; ci != NULL; ci = ci->previous) { |
| 310 | lua_assert(ci->top <= L1->stack_last); | 309 | lua_assert(ci->top <= L1->stack_last); |
| 311 | lua_assert(lua_checkpc(ci)); | 310 | lua_assert(lua_checkpc(ci)); |
| @@ -366,6 +365,8 @@ int lua_checkmemory (lua_State *L) { | |||
| 366 | global_State *g = G(L); | 365 | global_State *g = G(L); |
| 367 | GCObject *o; | 366 | GCObject *o; |
| 368 | UpVal *uv; | 367 | UpVal *uv; |
| 368 | checkliveness(g, &g->l_registry); | ||
| 369 | checkliveness(g, &g->l_gt); | ||
| 369 | checkstack(g, g->mainthread); | 370 | checkstack(g, g->mainthread); |
| 370 | for (o = g->rootgc; o != obj2gco(g->mainthread); o = gch(o)->next) { | 371 | for (o = g->rootgc; o != obj2gco(g->mainthread); o = gch(o)->next) { |
| 371 | lua_assert(!testbits(o->gch.marked, bit2mask(SEPARATED, SFIXEDBIT))); | 372 | lua_assert(!testbits(o->gch.marked, bit2mask(SEPARATED, SFIXEDBIT))); |
