summaryrefslogtreecommitdiff
path: root/lcode.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-01-09 09:24:12 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-01-09 09:24:12 -0200
commit33e3774f447cbcfa4fe43b8b47d0306e52937428 (patch)
treedc94b4a1cc4ef596747b0c5393b62eebd9fc714a /lcode.c
parenta9295a2b8ebca6bb7071c4424fd318afa33ebb9e (diff)
downloadlua-github-33e3774f447cbcfa4fe43b8b47d0306e52937428.tar.gz
keep more opcode arguments byte-aligned
Diffstat (limited to 'lcode.c')
-rw-r--r--lcode.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lcode.c b/lcode.c
index 1eae475a..ae024da8 100644
--- a/lcode.c
+++ b/lcode.c
@@ -1,5 +1,5 @@
/*
-** $Id: lcode.c,v 2.147 2017/12/22 14:16:46 roberto Exp roberto $
+** $Id: lcode.c,v 2.149 2018/01/09 11:21:41 roberto Exp $
** Code generator for Lua
** See Copyright Notice in lua.h
*/
@@ -262,16 +262,16 @@ void luaK_patchtohere (FuncState *fs, int list) {
/*
** Correct a jump list to jump to 'target'. If 'hasclose' is true,
** 'target' contains an OP_CLOSE instruction (see first assert).
-** Only jumps with the 'k' arg true need that close; other jumps
+** Only the jumps with ('m' == true) need that close; other jumps
** avoid it jumping to the next instruction.
*/
void luaK_patchgoto (FuncState *fs, int list, int target, int hasclose) {
lua_assert(!hasclose || GET_OPCODE(fs->f->code[target]) == OP_CLOSE);
while (list != NO_JUMP) {
int next = getjump(fs, list);
- lua_assert(!GETARG_k(fs->f->code[list]) || hasclose);
+ lua_assert(!GETARG_m(fs->f->code[list]) || hasclose);
patchtestreg(fs, list, NO_REG); /* do not generate values */
- if (!hasclose || GETARG_k(fs->f->code[list]))
+ if (!hasclose || GETARG_m(fs->f->code[list]))
fixjump(fs, list, target);
else /* there is a CLOSE instruction but jump does not need it */
fixjump(fs, list, target + 1); /* avoid CLOSE instruction */
@@ -281,14 +281,14 @@ void luaK_patchgoto (FuncState *fs, int list, int target, int hasclose) {
/*
-** Mark (using the 'k' arg) all jumps in 'list' to close upvalues. Mark
+** Mark (using the 'm' arg) all jumps in 'list' to close upvalues. Mark
** will instruct 'luaK_patchgoto' to make these jumps go to OP_CLOSE
** instructions.
*/
void luaK_patchclose (FuncState *fs, int list) {
for (; list != NO_JUMP; list = getjump(fs, list)) {
lua_assert(GET_OPCODE(fs->f->code[list]) == OP_JMP);
- SETARG_k(fs->f->code[list], 1);
+ SETARG_m(fs->f->code[list], 1);
}
}