diff options
Diffstat (limited to 'lopcodes.c')
| -rw-r--r-- | lopcodes.c | 12 |
1 files changed, 9 insertions, 3 deletions
| @@ -40,7 +40,7 @@ LUAI_DDEF const lu_byte luaP_opmodes[NUM_OPCODES] = { | |||
| 40 | ,opmode(0, 0, 0, 0, 0, iABC) /* OP_SETTABLE */ | 40 | ,opmode(0, 0, 0, 0, 0, iABC) /* OP_SETTABLE */ |
| 41 | ,opmode(0, 0, 0, 0, 0, iABC) /* OP_SETI */ | 41 | ,opmode(0, 0, 0, 0, 0, iABC) /* OP_SETI */ |
| 42 | ,opmode(0, 0, 0, 0, 0, iABC) /* OP_SETFIELD */ | 42 | ,opmode(0, 0, 0, 0, 0, iABC) /* OP_SETFIELD */ |
| 43 | ,opmode(0, 0, 0, 0, 1, iABC) /* OP_NEWTABLE */ | 43 | ,opmode(0, 0, 0, 0, 1, ivABC) /* OP_NEWTABLE */ |
| 44 | ,opmode(0, 0, 0, 0, 1, iABC) /* OP_SELF */ | 44 | ,opmode(0, 0, 0, 0, 1, iABC) /* OP_SELF */ |
| 45 | ,opmode(0, 0, 0, 0, 1, iABC) /* OP_ADDI */ | 45 | ,opmode(0, 0, 0, 0, 1, iABC) /* OP_ADDI */ |
| 46 | ,opmode(0, 0, 0, 0, 1, iABC) /* OP_ADDK */ | 46 | ,opmode(0, 0, 0, 0, 1, iABC) /* OP_ADDK */ |
| @@ -99,7 +99,7 @@ LUAI_DDEF const lu_byte luaP_opmodes[NUM_OPCODES] = { | |||
| 99 | ,opmode(0, 0, 0, 0, 0, iABx) /* OP_TFORPREP */ | 99 | ,opmode(0, 0, 0, 0, 0, iABx) /* OP_TFORPREP */ |
| 100 | ,opmode(0, 0, 0, 0, 0, iABC) /* OP_TFORCALL */ | 100 | ,opmode(0, 0, 0, 0, 0, iABC) /* OP_TFORCALL */ |
| 101 | ,opmode(0, 0, 0, 0, 1, iABx) /* OP_TFORLOOP */ | 101 | ,opmode(0, 0, 0, 0, 1, iABx) /* OP_TFORLOOP */ |
| 102 | ,opmode(0, 0, 1, 0, 0, iABC) /* OP_SETLIST */ | 102 | ,opmode(0, 0, 1, 0, 0, ivABC) /* OP_SETLIST */ |
| 103 | ,opmode(0, 0, 0, 0, 1, iABx) /* OP_CLOSURE */ | 103 | ,opmode(0, 0, 0, 0, 1, iABx) /* OP_CLOSURE */ |
| 104 | ,opmode(0, 1, 0, 0, 1, iABC) /* OP_VARARG */ | 104 | ,opmode(0, 1, 0, 0, 1, iABC) /* OP_VARARG */ |
| 105 | ,opmode(0, 0, 1, 0, 1, iABC) /* OP_VARARGPREP */ | 105 | ,opmode(0, 0, 1, 0, 1, iABC) /* OP_VARARGPREP */ |
| @@ -127,6 +127,12 @@ int luaP_isOT (Instruction i) { | |||
| 127 | ** it accepts multiple results. | 127 | ** it accepts multiple results. |
| 128 | */ | 128 | */ |
| 129 | int luaP_isIT (Instruction i) { | 129 | int luaP_isIT (Instruction i) { |
| 130 | return testITMode(GET_OPCODE(i)) && GETARG_B(i) == 0; | 130 | OpCode op = GET_OPCODE(i); |
| 131 | switch (op) { | ||
| 132 | case OP_SETLIST: | ||
| 133 | return testITMode(GET_OPCODE(i)) && GETARG_vB(i) == 0; | ||
| 134 | default: | ||
| 135 | return testITMode(GET_OPCODE(i)) && GETARG_B(i) == 0; | ||
| 136 | } | ||
| 131 | } | 137 | } |
| 132 | 138 | ||
