aboutsummaryrefslogtreecommitdiff
path: root/lcode.c
diff options
context:
space:
mode:
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 @@
1/* 1/*
2** $Id: lcode.c,v 2.125 2017/09/26 18:14:45 roberto Exp roberto $ 2** $Id: lcode.c,v 2.126 2017/09/28 16:53:29 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*/
@@ -1068,7 +1068,7 @@ static int isKstr (FuncState *fs, expdesc *e) {
1068*/ 1068*/
1069static int isKint (expdesc *e) { 1069static int isKint (expdesc *e) {
1070 return (e->k == VKINT && !hasjumps(e) && 1070 return (e->k == VKINT && !hasjumps(e) &&
1071 l_castS2U(e->u.ival) <= l_castS2U(MAXARG_C)); 1071 l_castS2U(e->u.ival) <= l_castS2U(MAXARG_Cr));
1072} 1072}
1073 1073
1074 1074
@@ -1178,8 +1178,8 @@ static void codebinexpval (FuncState *fs, OpCode op,
1178 v1 = luaK_exp2anyreg(fs, e1); 1178 v1 = luaK_exp2anyreg(fs, e1);
1179 } 1179 }
1180 else { /* exchange operands to make 2nd one a constant */ 1180 else { /* exchange operands to make 2nd one a constant */
1181 v2 = cast_int(e1->u.ival); 1181 v2 = cast_int(e1->u.ival) | BITRK; /* K bit signal the exchange */
1182 v1 = luaK_exp2anyreg(fs, e2) | BITRK; /* K bit signal the exchange */ 1182 v1 = luaK_exp2anyreg(fs, e2);
1183 } 1183 }
1184 op = OP_ADDI; 1184 op = OP_ADDI;
1185 } 1185 }