aboutsummaryrefslogtreecommitdiff
path: root/lparser.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-03-29 17:19:20 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-03-29 17:19:20 -0300
commita69356e9e0a7525b1cebadc928a0efcce8c39b46 (patch)
treec676ee2997c699d3e0b036323ecbafa7ea0d786f /lparser.c
parentb53dc0c4853c56694dda727793e5f6188de39dd8 (diff)
downloadlua-a69356e9e0a7525b1cebadc928a0efcce8c39b46.tar.gz
lua-a69356e9e0a7525b1cebadc928a0efcce8c39b46.tar.bz2
lua-a69356e9e0a7525b1cebadc928a0efcce8c39b46.zip
no more special cases for closures with 0 upvalues (performance is the same,
memory use a little higher, code much simpler).
Diffstat (limited to 'lparser.c')
-rw-r--r--lparser.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/lparser.c b/lparser.c
index 8238b996..5f0b6adb 100644
--- a/lparser.c
+++ b/lparser.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lparser.c,v 1.72 2000/03/24 12:17:53 roberto Exp roberto $ 2** $Id: lparser.c,v 1.73 2000/03/24 17:26:08 roberto Exp roberto $
3** LL(1) Parser and code generator for Lua 3** LL(1) Parser and code generator for Lua
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -345,10 +345,6 @@ static void init_state (LexState *ls, FuncState *fs, TString *source) {
345 f->numparams = 0; /* default for main chunk */ 345 f->numparams = 0; /* default for main chunk */
346 f->is_vararg = 0; /* default for main chunk */ 346 f->is_vararg = 0; /* default for main chunk */
347 fs->nvars = (L->debug) ? 0 : -1; /* flag no debug information? */ 347 fs->nvars = (L->debug) ? 0 : -1; /* flag no debug information? */
348 /* push function (to avoid GC) */
349 tfvalue(L->top) = f;
350 ttype(L->top) = TAG_LPROTO;
351 incr_top;
352} 348}
353 349
354 350
@@ -366,7 +362,6 @@ static void close_func (LexState *ls) {
366 luaM_reallocvector(L, f->locvars, fs->nvars, LocVar); 362 luaM_reallocvector(L, f->locvars, fs->nvars, LocVar);
367 } 363 }
368 ls->fs = fs->prev; 364 ls->fs = fs->prev;
369 L->top--; /* pop function */
370} 365}
371 366
372 367