From a69356e9e0a7525b1cebadc928a0efcce8c39b46 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 29 Mar 2000 17:19:20 -0300 Subject: no more special cases for closures with 0 upvalues (performance is the same, memory use a little higher, code much simpler). --- lparser.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'lparser.c') diff --git a/lparser.c b/lparser.c index 8238b996..5f0b6adb 100644 --- a/lparser.c +++ b/lparser.c @@ -1,5 +1,5 @@ /* -** $Id: lparser.c,v 1.72 2000/03/24 12:17:53 roberto Exp roberto $ +** $Id: lparser.c,v 1.73 2000/03/24 17:26:08 roberto Exp roberto $ ** LL(1) Parser and code generator for Lua ** See Copyright Notice in lua.h */ @@ -345,10 +345,6 @@ static void init_state (LexState *ls, FuncState *fs, TString *source) { f->numparams = 0; /* default for main chunk */ f->is_vararg = 0; /* default for main chunk */ fs->nvars = (L->debug) ? 0 : -1; /* flag no debug information? */ - /* push function (to avoid GC) */ - tfvalue(L->top) = f; - ttype(L->top) = TAG_LPROTO; - incr_top; } @@ -366,7 +362,6 @@ static void close_func (LexState *ls) { luaM_reallocvector(L, f->locvars, fs->nvars, LocVar); } ls->fs = fs->prev; - L->top--; /* pop function */ } -- cgit v1.2.3-55-g6feb