From 54eb35a8aa0f60265cf1b4764beabe1199d66f42 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 3 Nov 2017 10:12:30 -0200 Subject: more fields moved out of 'CallInfo' --- ltests.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'ltests.c') diff --git a/ltests.c b/ltests.c index d05fc3b1..71ad09ea 100644 --- a/ltests.c +++ b/ltests.c @@ -1,5 +1,5 @@ /* -** $Id: ltests.c,v 2.226 2017/11/01 18:20:48 roberto Exp roberto $ +** $Id: ltests.c,v 2.227 2017/11/02 11:28:56 roberto Exp roberto $ ** Internal Module for Debugging of the Lua Implementation ** See Copyright Notice in lua.h */ @@ -310,7 +310,7 @@ static void checkLclosure (global_State *g, LClosure *cl) { static int lua_checkpc (CallInfo *ci) { - if (!isLua(ci)) return 1; + if (!isLua(ci->func)) return 1; else { StkId f = ci->func; Proto *p = clLvalue(s2v(f))->p; @@ -327,10 +327,11 @@ static void checkstack (global_State *g, lua_State *L1) { lua_assert(!isdead(g, L1)); for (uv = L1->openupval; uv != NULL; uv = uv->u.open.next) lua_assert(upisopen(uv)); /* must be open */ - for (ci = L1->ci; ci != NULL; ci = ci->previous) { - lua_assert(ci->top <= L1->stack_last); + for (ci = L1->ci; ci != NULL; ci = ci->previous) lua_assert(lua_checkpc(ci)); - } + for (o = L1->func; o->stkci.previous != 0; o -= o->stkci.previous) + lua_assert(functop(o) <= L1->stack_last); + lua_assert(o == L1->stack); if (L1->stack) { /* complete thread? */ for (o = L1->stack; o < L1->stack_last + EXTRA_STACK; o++) checkliveness(L1, s2v(o)); /* entire stack must have valid values */ -- cgit v1.2.3-55-g6feb