aboutsummaryrefslogtreecommitdiff
path: root/ltests.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2009-09-28 13:32:50 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2009-09-28 13:32:50 -0300
commit5938212748636d21d6f4b372481ab3b6dd6c7538 (patch)
treefa5d0a28dac1ff6c087585bc684534eb1ae82298 /ltests.c
parent1829911d7c1c16cf01dfdbfc8e7a26cfa10ec797 (diff)
downloadlua-5938212748636d21d6f4b372481ab3b6dd6c7538.tar.gz
lua-5938212748636d21d6f4b372481ab3b6dd6c7538.tar.bz2
lua-5938212748636d21d6f4b372481ab3b6dd6c7538.zip
information about upvalues (where they come from) kept in Proto structure,
instead of sequence of pseudo-opcodes after OP_CLOSURE
Diffstat (limited to 'ltests.c')
-rw-r--r--ltests.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/ltests.c b/ltests.c
index 0becc766..77677680 100644
--- a/ltests.c
+++ b/ltests.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltests.c,v 2.71 2009/09/14 14:30:39 roberto Exp roberto $ 2** $Id: ltests.c,v 2.72 2009/09/17 18:04:21 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*/
@@ -248,8 +248,8 @@ static void checkproto (global_State *g, Proto *f) {
248 checkobjref(g, fgc, rawtsvalue(f->k+i)); 248 checkobjref(g, fgc, rawtsvalue(f->k+i));
249 } 249 }
250 for (i=0; i<f->sizeupvalues; i++) { 250 for (i=0; i<f->sizeupvalues; i++) {
251 if (f->upvalues[i]) 251 if (f->upvalues[i].name)
252 checkobjref(g, fgc, f->upvalues[i]); 252 checkobjref(g, fgc, f->upvalues[i].name);
253 } 253 }
254 for (i=0; i<f->sizep; i++) { 254 for (i=0; i<f->sizep; i++) {
255 if (f->p[i]) 255 if (f->p[i])
@@ -273,7 +273,7 @@ static void checkclosure (global_State *g, Closure *cl) {
273 } 273 }
274 else { 274 else {
275 int i; 275 int i;
276 lua_assert(cl->l.nupvalues == cl->l.p->nups); 276 lua_assert(cl->l.nupvalues == cl->l.p->sizeupvalues);
277 checkobjref(g, clgc, cl->l.p); 277 checkobjref(g, clgc, cl->l.p);
278 for (i=0; i<cl->l.nupvalues; i++) { 278 for (i=0; i<cl->l.nupvalues; i++) {
279 if (cl->l.upvals[i]) { 279 if (cl->l.upvals[i]) {
@@ -493,7 +493,6 @@ static int get_limits (lua_State *L) {
493 setnameval(L, "LFPF", LFIELDS_PER_FLUSH); 493 setnameval(L, "LFPF", LFIELDS_PER_FLUSH);
494 setnameval(L, "MAXVARS", LUAI_MAXVARS); 494 setnameval(L, "MAXVARS", LUAI_MAXVARS);
495 setnameval(L, "MAXSTACK", MAXSTACK); 495 setnameval(L, "MAXSTACK", MAXSTACK);
496 setnameval(L, "MAXUPVALUES", LUAI_MAXUPVALUES);
497 setnameval(L, "NUM_OPCODES", NUM_OPCODES); 496 setnameval(L, "NUM_OPCODES", NUM_OPCODES);
498 return 1; 497 return 1;
499} 498}