summaryrefslogtreecommitdiff
path: root/lcode.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2017-10-01 16:13:43 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2017-10-01 16:13:43 -0300
commitbc1b0733b808f02639ed79fff02f69f731636539 (patch)
treed90ae6263abb6fe1e6641e9a33981457418edea5 /lcode.c
parent722bdbe17d0192baf72978f88069d12a921e9bfb (diff)
downloadlua-github-bc1b0733b808f02639ed79fff02f69f731636539.tar.gz
avoid the use of bit 'Bk' ('B' will lose this bit soon)
Diffstat (limited to 'lcode.c')
-rw-r--r--lcode.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lcode.c b/lcode.c
index 1f6e9c11..1331a54e 100644
--- a/lcode.c
+++ b/lcode.c
@@ -1,5 +1,5 @@
/*
-** $Id: lcode.c,v 2.125 2017/09/26 18:14:45 roberto Exp roberto $
+** $Id: lcode.c,v 2.126 2017/09/28 16:53:29 roberto Exp roberto $
** Code generator for Lua
** See Copyright Notice in lua.h
*/
@@ -1068,7 +1068,7 @@ static int isKstr (FuncState *fs, expdesc *e) {
*/
static int isKint (expdesc *e) {
return (e->k == VKINT && !hasjumps(e) &&
- l_castS2U(e->u.ival) <= l_castS2U(MAXARG_C));
+ l_castS2U(e->u.ival) <= l_castS2U(MAXARG_Cr));
}
@@ -1178,8 +1178,8 @@ static void codebinexpval (FuncState *fs, OpCode op,
v1 = luaK_exp2anyreg(fs, e1);
}
else { /* exchange operands to make 2nd one a constant */
- v2 = cast_int(e1->u.ival);
- v1 = luaK_exp2anyreg(fs, e2) | BITRK; /* K bit signal the exchange */
+ v2 = cast_int(e1->u.ival) | BITRK; /* K bit signal the exchange */
+ v1 = luaK_exp2anyreg(fs, e2);
}
op = OP_ADDI;
}