aboutsummaryrefslogtreecommitdiff
path: root/lcode.c
diff options
context:
space:
mode:
Diffstat (limited to 'lcode.c')
-rw-r--r--lcode.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lcode.c b/lcode.c
index eae7e7d7..280d91ea 100644
--- a/lcode.c
+++ b/lcode.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lcode.c,v 2.98 2014/12/19 13:36:32 roberto Exp roberto $ 2** $Id: lcode.c,v 2.99 2014/12/29 16:49:25 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*/
@@ -573,8 +573,8 @@ int luaK_exp2RK (FuncState *fs, expdesc *e) {
573 case VKFLT: { 573 case VKFLT: {
574 e->u.info = luaK_numberK(fs, e->u.nval); 574 e->u.info = luaK_numberK(fs, e->u.nval);
575 e->k = VK; 575 e->k = VK;
576 /* go through */
577 } 576 }
577 /* FALLTHROUGH */
578 case VK: { 578 case VK: {
579 vk: 579 vk:
580 if (e->u.info <= MAXINDEXRK) /* constant fits in 'argC'? */ 580 if (e->u.info <= MAXINDEXRK) /* constant fits in 'argC'? */
@@ -793,7 +793,7 @@ static int constfolding (FuncState *fs, int op, expdesc *e1, expdesc *e2) {
793static void codeexpval (FuncState *fs, OpCode op, 793static void codeexpval (FuncState *fs, OpCode op,
794 expdesc *e1, expdesc *e2, int line) { 794 expdesc *e1, expdesc *e2, int line) {
795 lua_assert(op >= OP_ADD); 795 lua_assert(op >= OP_ADD);
796 if (op <= OP_BNOT && constfolding(fs, op - OP_ADD + LUA_OPADD, e1, e2)) 796 if (op <= OP_BNOT && constfolding(fs, (op - OP_ADD) + LUA_OPADD, e1, e2))
797 return; /* result has been folded */ 797 return; /* result has been folded */
798 else { 798 else {
799 int o1, o2; 799 int o1, o2;
@@ -920,11 +920,11 @@ void luaK_posfix (FuncState *fs, BinOpr op,
920 break; 920 break;
921 } 921 }
922 case OPR_EQ: case OPR_LT: case OPR_LE: { 922 case OPR_EQ: case OPR_LT: case OPR_LE: {
923 codecomp(fs, cast(OpCode, op - OPR_EQ + OP_EQ), 1, e1, e2); 923 codecomp(fs, cast(OpCode, (op - OPR_EQ) + OP_EQ), 1, e1, e2);
924 break; 924 break;
925 } 925 }
926 case OPR_NE: case OPR_GT: case OPR_GE: { 926 case OPR_NE: case OPR_GT: case OPR_GE: {
927 codecomp(fs, cast(OpCode, op - OPR_NE + OP_EQ), 0, e1, e2); 927 codecomp(fs, cast(OpCode, (op - OPR_NE) + OP_EQ), 0, e1, e2);
928 break; 928 break;
929 } 929 }
930 default: lua_assert(0); 930 default: lua_assert(0);