no more 'Proto' objects on the stack. Protos are anchored on outer

Protos or on a Closure, which must be created before the Proto.
This commit is contained in:
Roberto Ierusalimschy
2012-05-08 10:53:33 -03:00
parent bb1146dc39
commit 3cadc37f47
11 changed files with 103 additions and 90 deletions

3
lgc.c
View File

@@ -1,5 +1,5 @@
/*
** $Id: lgc.c,v 2.117 2012/01/20 22:05:50 roberto Exp roberto $
** $Id: lgc.c,v 2.119 2012/01/25 21:05:40 roberto Exp roberto $
** Garbage Collector
** See Copyright Notice in lua.h
*/
@@ -489,7 +489,6 @@ static int traverseCclosure (global_State *g, CClosure *cl) {
static int traverseLclosure (global_State *g, LClosure *cl) {
int i;
lua_assert(cl->nupvalues == cl->p->sizeupvalues);
markobject(g, cl->p); /* mark its prototype */
for (i = 0; i < cl->nupvalues; i++) /* mark its upvalues */
markobject(g, cl->upvals[i]);