diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-01-29 13:26:40 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-01-29 13:26:40 -0200 |
commit | 3b6f8bfbe688fdd0f1c17bd023140804155624f3 (patch) | |
tree | 9cb2bedcaded8e46e9cd471f7247ddce2916d633 /lparser.c | |
parent | caf01b5bfa33617b7bb2c40292f74599f6030eba (diff) | |
download | lua-3b6f8bfbe688fdd0f1c17bd023140804155624f3.tar.gz lua-3b6f8bfbe688fdd0f1c17bd023140804155624f3.tar.bz2 lua-3b6f8bfbe688fdd0f1c17bd023140804155624f3.zip |
simpler implementation of for loops
Diffstat (limited to 'lparser.c')
-rw-r--r-- | lparser.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lparser.c,v 1.125 2001/01/19 13:20:30 roberto Exp roberto $ | 2 | ** $Id: lparser.c,v 1.126 2001/01/29 13:14:49 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 | */ |
@@ -854,7 +854,7 @@ static void forbody (LexState *ls, int nvar, OpCode prepfor, OpCode loopfor) { | |||
854 | adjustlocalvars(ls, nvar); /* scope for control variables */ | 854 | adjustlocalvars(ls, nvar); /* scope for control variables */ |
855 | block(ls); | 855 | block(ls); |
856 | luaK_patchlist(fs, luaK_code1(fs, loopfor, NO_JUMP), blockinit); | 856 | luaK_patchlist(fs, luaK_code1(fs, loopfor, NO_JUMP), blockinit); |
857 | luaK_patchlist(fs, prep, luaK_getlabel(fs)); | 857 | luaK_fixfor(fs, prep, luaK_getlabel(fs)); |
858 | removelocalvars(ls, nvar); | 858 | removelocalvars(ls, nvar); |
859 | } | 859 | } |
860 | 860 | ||