information about upvalues (where they come from) kept in Proto structure,

instead of sequence of pseudo-opcodes after OP_CLOSURE
This commit is contained in:
Roberto Ierusalimschy
2009-09-28 13:32:50 -03:00
parent 1829911d7c
commit 5938212748
14 changed files with 97 additions and 98 deletions

4
lapi.c
View File

@@ -1,5 +1,5 @@
/*
** $Id: lapi.c,v 2.90 2009/09/17 18:04:21 roberto Exp roberto $
** $Id: lapi.c,v 2.91 2009/09/21 12:09:52 roberto Exp roberto $
** Lua API
** See Copyright Notice in lua.h
*/
@@ -1043,7 +1043,7 @@ static const char *aux_upvalue (StkId fi, int n, TValue **val) {
Proto *p = f->l.p;
if (!(1 <= n && n <= p->sizeupvalues)) return NULL;
*val = f->l.upvals[n-1]->v;
return getstr(p->upvalues[n-1]);
return getstr(p->upvalues[n-1].name);
}
}