diff options
Diffstat (limited to '')
-rw-r--r-- | lopcodes.h | 12 |
1 files changed, 3 insertions, 9 deletions
@@ -8,6 +8,7 @@ | |||
8 | #define lopcodes_h | 8 | #define lopcodes_h |
9 | 9 | ||
10 | #include "llimits.h" | 10 | #include "llimits.h" |
11 | #include "lobject.h" | ||
11 | 12 | ||
12 | 13 | ||
13 | /*=========================================================================== | 14 | /*=========================================================================== |
@@ -394,16 +395,9 @@ LUAI_DDEC(const lu_byte luaP_opmodes[NUM_OPCODES];) | |||
394 | #define testOTMode(m) (luaP_opmodes[m] & (1 << 6)) | 395 | #define testOTMode(m) (luaP_opmodes[m] & (1 << 6)) |
395 | #define testMMMode(m) (luaP_opmodes[m] & (1 << 7)) | 396 | #define testMMMode(m) (luaP_opmodes[m] & (1 << 7)) |
396 | 397 | ||
397 | /* "out top" (set top for next instruction) */ | ||
398 | #define isOT(i) \ | ||
399 | ((testOTMode(GET_OPCODE(i)) && GETARG_C(i) == 0) || \ | ||
400 | GET_OPCODE(i) == OP_TAILCALL) | ||
401 | 398 | ||
402 | /* "in top" (uses top from previous instruction) */ | 399 | LUAI_FUNC int luaP_isOT (Instruction i); |
403 | #define isIT(i) (testITMode(GET_OPCODE(i)) && GETARG_B(i) == 0) | 400 | LUAI_FUNC int luaP_isIT (Instruction i); |
404 | |||
405 | #define opmode(mm,ot,it,t,a,m) \ | ||
406 | (((mm) << 7) | ((ot) << 6) | ((it) << 5) | ((t) << 4) | ((a) << 3) | (m)) | ||
407 | 401 | ||
408 | 402 | ||
409 | #endif | 403 | #endif |