mirror of https://github.com/rusefi/lua.git
detail ('while' -> 'for') in 'luaK_patchclose'
This commit is contained in:
parent
a051b3323e
commit
b7446ea88d
6
lcode.c
6
lcode.c
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: lcode.c,v 2.102 2015/10/26 14:27:47 roberto Exp roberto $
|
** $Id: lcode.c,v 2.103 2015/11/19 19:16:22 roberto Exp roberto $
|
||||||
** Code generator for Lua
|
** Code generator for Lua
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -195,13 +195,11 @@ void luaK_patchlist (FuncState *fs, int list, int target) {
|
||||||
|
|
||||||
void luaK_patchclose (FuncState *fs, int list, int level) {
|
void luaK_patchclose (FuncState *fs, int list, int level) {
|
||||||
level++; /* argument is +1 to reserve 0 as non-op */
|
level++; /* argument is +1 to reserve 0 as non-op */
|
||||||
while (list != NO_JUMP) {
|
for (; list != NO_JUMP; list = getjump(fs, list)) {
|
||||||
int next = getjump(fs, list);
|
|
||||||
lua_assert(GET_OPCODE(fs->f->code[list]) == OP_JMP &&
|
lua_assert(GET_OPCODE(fs->f->code[list]) == OP_JMP &&
|
||||||
(GETARG_A(fs->f->code[list]) == 0 ||
|
(GETARG_A(fs->f->code[list]) == 0 ||
|
||||||
GETARG_A(fs->f->code[list]) >= level));
|
GETARG_A(fs->f->code[list]) >= level));
|
||||||
SETARG_A(fs->f->code[list], level);
|
SETARG_A(fs->f->code[list], level);
|
||||||
list = next;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue