From 5938212748636d21d6f4b372481ab3b6dd6c7538 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 28 Sep 2009 13:32:50 -0300 Subject: information about upvalues (where they come from) kept in Proto structure, instead of sequence of pseudo-opcodes after OP_CLOSURE --- ltests.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'ltests.c') diff --git a/ltests.c b/ltests.c index 0becc766..77677680 100644 --- a/ltests.c +++ b/ltests.c @@ -1,5 +1,5 @@ /* -** $Id: ltests.c,v 2.71 2009/09/14 14:30:39 roberto Exp roberto $ +** $Id: ltests.c,v 2.72 2009/09/17 18:04:21 roberto Exp roberto $ ** Internal Module for Debugging of the Lua Implementation ** See Copyright Notice in lua.h */ @@ -248,8 +248,8 @@ static void checkproto (global_State *g, Proto *f) { checkobjref(g, fgc, rawtsvalue(f->k+i)); } for (i=0; isizeupvalues; i++) { - if (f->upvalues[i]) - checkobjref(g, fgc, f->upvalues[i]); + if (f->upvalues[i].name) + checkobjref(g, fgc, f->upvalues[i].name); } for (i=0; isizep; i++) { if (f->p[i]) @@ -273,7 +273,7 @@ static void checkclosure (global_State *g, Closure *cl) { } else { int i; - lua_assert(cl->l.nupvalues == cl->l.p->nups); + lua_assert(cl->l.nupvalues == cl->l.p->sizeupvalues); checkobjref(g, clgc, cl->l.p); for (i=0; il.nupvalues; i++) { if (cl->l.upvals[i]) { @@ -493,7 +493,6 @@ static int get_limits (lua_State *L) { setnameval(L, "LFPF", LFIELDS_PER_FLUSH); setnameval(L, "MAXVARS", LUAI_MAXVARS); setnameval(L, "MAXSTACK", MAXSTACK); - setnameval(L, "MAXUPVALUES", LUAI_MAXUPVALUES); setnameval(L, "NUM_OPCODES", NUM_OPCODES); return 1; } -- cgit v1.2.3-55-g6feb