diff options
Diffstat (limited to 'lvm.c')
-rw-r--r-- | lvm.c | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -890,9 +890,9 @@ void luaV_finishOp (lua_State *L) { | |||
890 | /* | 890 | /* |
891 | ** Auxiliary macro for arithmetic operations over floats and others | 891 | ** Auxiliary macro for arithmetic operations over floats and others |
892 | ** with immediate operand. 'fop' is the float operation; 'tm' is the | 892 | ** with immediate operand. 'fop' is the float operation; 'tm' is the |
893 | ** corresponding metamethod; 'flip' is true if operands were flipped. | 893 | ** corresponding metamethod. |
894 | */ | 894 | */ |
895 | #define op_arithfI_aux(L,v1,imm,fop,tm,flip) { \ | 895 | #define op_arithfI_aux(L,v1,imm,fop,tm) { \ |
896 | lua_Number nb; \ | 896 | lua_Number nb; \ |
897 | if (tonumberns(v1, nb)) { \ | 897 | if (tonumberns(v1, nb)) { \ |
898 | lua_Number fimm = cast_num(imm); \ | 898 | lua_Number fimm = cast_num(imm); \ |
@@ -912,14 +912,14 @@ void luaV_finishOp (lua_State *L) { | |||
912 | ** Arithmetic operations with immediate operands. 'iop' is the integer | 912 | ** Arithmetic operations with immediate operands. 'iop' is the integer |
913 | ** operation. | 913 | ** operation. |
914 | */ | 914 | */ |
915 | #define op_arithI(L,iop,fop,tm,flip) { \ | 915 | #define op_arithI(L,iop,fop,tm) { \ |
916 | TValue *v1 = vRB(i); \ | 916 | TValue *v1 = vRB(i); \ |
917 | int imm = GETARG_sC(i); \ | 917 | int imm = GETARG_sC(i); \ |
918 | if (ttisinteger(v1)) { \ | 918 | if (ttisinteger(v1)) { \ |
919 | lua_Integer iv1 = ivalue(v1); \ | 919 | lua_Integer iv1 = ivalue(v1); \ |
920 | pc++; setivalue(s2v(ra), iop(L, iv1, imm)); \ | 920 | pc++; setivalue(s2v(ra), iop(L, iv1, imm)); \ |
921 | } \ | 921 | } \ |
922 | else op_arithfI_aux(L, v1, imm, fop, tm, flip); } | 922 | else op_arithfI_aux(L, v1, imm, fop, tm); } |
923 | 923 | ||
924 | 924 | ||
925 | /* | 925 | /* |
@@ -958,7 +958,7 @@ void luaV_finishOp (lua_State *L) { | |||
958 | /* | 958 | /* |
959 | ** Arithmetic operations with K operands. | 959 | ** Arithmetic operations with K operands. |
960 | */ | 960 | */ |
961 | #define op_arithK(L,iop,fop,flip) { \ | 961 | #define op_arithK(L,iop,fop) { \ |
962 | TValue *v1 = vRB(i); \ | 962 | TValue *v1 = vRB(i); \ |
963 | TValue *v2 = KC(i); \ | 963 | TValue *v2 = KC(i); \ |
964 | if (ttisinteger(v1) && ttisinteger(v2)) { \ | 964 | if (ttisinteger(v1) && ttisinteger(v2)) { \ |
@@ -1367,23 +1367,23 @@ void luaV_execute (lua_State *L, CallInfo *ci) { | |||
1367 | vmbreak; | 1367 | vmbreak; |
1368 | } | 1368 | } |
1369 | vmcase(OP_ADDI) { | 1369 | vmcase(OP_ADDI) { |
1370 | op_arithI(L, l_addi, luai_numadd, TM_ADD, GETARG_k(i)); | 1370 | op_arithI(L, l_addi, luai_numadd, TM_ADD); |
1371 | vmbreak; | 1371 | vmbreak; |
1372 | } | 1372 | } |
1373 | vmcase(OP_ADDK) { | 1373 | vmcase(OP_ADDK) { |
1374 | op_arithK(L, l_addi, luai_numadd, GETARG_k(i)); | 1374 | op_arithK(L, l_addi, luai_numadd); |
1375 | vmbreak; | 1375 | vmbreak; |
1376 | } | 1376 | } |
1377 | vmcase(OP_SUBK) { | 1377 | vmcase(OP_SUBK) { |
1378 | op_arithK(L, l_subi, luai_numsub, 0); | 1378 | op_arithK(L, l_subi, luai_numsub); |
1379 | vmbreak; | 1379 | vmbreak; |
1380 | } | 1380 | } |
1381 | vmcase(OP_MULK) { | 1381 | vmcase(OP_MULK) { |
1382 | op_arithK(L, l_muli, luai_nummul, GETARG_k(i)); | 1382 | op_arithK(L, l_muli, luai_nummul); |
1383 | vmbreak; | 1383 | vmbreak; |
1384 | } | 1384 | } |
1385 | vmcase(OP_MODK) { | 1385 | vmcase(OP_MODK) { |
1386 | op_arithK(L, luaV_mod, luaV_modf, 0); | 1386 | op_arithK(L, luaV_mod, luaV_modf); |
1387 | vmbreak; | 1387 | vmbreak; |
1388 | } | 1388 | } |
1389 | vmcase(OP_POWK) { | 1389 | vmcase(OP_POWK) { |
@@ -1395,7 +1395,7 @@ void luaV_execute (lua_State *L, CallInfo *ci) { | |||
1395 | vmbreak; | 1395 | vmbreak; |
1396 | } | 1396 | } |
1397 | vmcase(OP_IDIVK) { | 1397 | vmcase(OP_IDIVK) { |
1398 | op_arithK(L, luaV_idiv, luai_numidiv, 0); | 1398 | op_arithK(L, luaV_idiv, luai_numidiv); |
1399 | vmbreak; | 1399 | vmbreak; |
1400 | } | 1400 | } |
1401 | vmcase(OP_BANDK) { | 1401 | vmcase(OP_BANDK) { |