diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2015-03-28 16:14:47 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2015-03-28 16:14:47 -0300 |
| commit | e723c75c02a48d0c766f1f30f7a321f7fdb239dc (patch) | |
| tree | aa3f11828e25ccf2dc02d077e59ee12a4313a3bd /lcode.c | |
| parent | b436ed58a3416c2e1936bdce880ac09925401a87 (diff) | |
| download | lua-e723c75c02a48d0c766f1f30f7a321f7fdb239dc.tar.gz lua-e723c75c02a48d0c766f1f30f7a321f7fdb239dc.tar.bz2 lua-e723c75c02a48d0c766f1f30f7a321f7fdb239dc.zip | |
details (avoid 'lint' warnings)
Diffstat (limited to 'lcode.c')
| -rw-r--r-- | lcode.c | 10 |
1 files changed, 5 insertions, 5 deletions
| @@ -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) { | |||
| 793 | static void codeexpval (FuncState *fs, OpCode op, | 793 | static 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); |
