diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2015-12-17 12:52:53 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2015-12-17 12:52:53 -0200 |
commit | b7446ea88dc3565b32ff180b9aea4f5313bb890b (patch) | |
tree | 98352d3de25ad4d9f3b2e46ef0d01d4146acac83 /lcode.c | |
parent | a051b3323ef6d12677e78ec0a47d1731bd424d38 (diff) | |
download | lua-b7446ea88dc3565b32ff180b9aea4f5313bb890b.tar.gz lua-b7446ea88dc3565b32ff180b9aea4f5313bb890b.tar.bz2 lua-b7446ea88dc3565b32ff180b9aea4f5313bb890b.zip |
detail ('while' -> 'for') in 'luaK_patchclose'
Diffstat (limited to 'lcode.c')
-rw-r--r-- | lcode.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lcode.c,v 2.102 2015/10/26 14:27:47 roberto Exp roberto $ | 2 | ** $Id: lcode.c,v 2.103 2015/11/19 19:16:22 roberto Exp roberto $ |
3 | ** Code generator for Lua | 3 | ** Code generator for Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -195,13 +195,11 @@ void luaK_patchlist (FuncState *fs, int list, int target) { | |||
195 | 195 | ||
196 | void luaK_patchclose (FuncState *fs, int list, int level) { | 196 | void luaK_patchclose (FuncState *fs, int list, int level) { |
197 | level++; /* argument is +1 to reserve 0 as non-op */ | 197 | level++; /* argument is +1 to reserve 0 as non-op */ |
198 | while (list != NO_JUMP) { | 198 | for (; list != NO_JUMP; list = getjump(fs, list)) { |
199 | int next = getjump(fs, list); | ||
200 | lua_assert(GET_OPCODE(fs->f->code[list]) == OP_JMP && | 199 | lua_assert(GET_OPCODE(fs->f->code[list]) == OP_JMP && |
201 | (GETARG_A(fs->f->code[list]) == 0 || | 200 | (GETARG_A(fs->f->code[list]) == 0 || |
202 | GETARG_A(fs->f->code[list]) >= level)); | 201 | GETARG_A(fs->f->code[list]) >= level)); |
203 | SETARG_A(fs->f->code[list], level); | 202 | SETARG_A(fs->f->code[list], level); |
204 | list = next; | ||
205 | } | 203 | } |
206 | } | 204 | } |
207 | 205 | ||