aboutsummaryrefslogtreecommitdiff
path: root/lparser.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2004-03-26 11:02:41 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2004-03-26 11:02:41 -0300
commit4c5d7b2dddeb853b61489d02b738572eb29cb323 (patch)
tree98fd0c7ad24d788bb60c8aee568fad856f630b89 /lparser.c
parentd7cb62286642b0f5c16057373ff129109e1a3e8a (diff)
downloadlua-4c5d7b2dddeb853b61489d02b738572eb29cb323.tar.gz
lua-4c5d7b2dddeb853b61489d02b738572eb29cb323.tar.bz2
lua-4c5d7b2dddeb853b61489d02b738572eb29cb323.zip
small optimization for {f()}
Diffstat (limited to 'lparser.c')
-rw-r--r--lparser.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lparser.c b/lparser.c
index ec5ae272..b8e1b2a7 100644
--- a/lparser.c
+++ b/lparser.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lparser.c,v 2.1 2003/12/10 12:13:36 roberto Exp roberto $ 2** $Id: lparser.c,v 2.2 2004/03/12 19:53:56 roberto Exp roberto $
3** Lua Parser 3** Lua Parser
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -483,6 +483,7 @@ static void lastlistfield (FuncState *fs, struct ConsControl *cc) {
483 if (cc->v.k == VCALL) { 483 if (cc->v.k == VCALL) {
484 luaK_setcallreturns(fs, &cc->v, LUA_MULTRET); 484 luaK_setcallreturns(fs, &cc->v, LUA_MULTRET);
485 luaK_codeABx(fs, OP_SETLISTO, cc->t->info, cc->na-1); 485 luaK_codeABx(fs, OP_SETLISTO, cc->t->info, cc->na-1);
486 cc->na--; /* do not count last expression (unknown number of elements) */
486 } 487 }
487 else { 488 else {
488 if (cc->v.k != VVOID) 489 if (cc->v.k != VVOID)