diff options
| author | Roberto I <roberto@inf.puc-rio.br> | 2026-05-28 15:10:17 -0300 |
|---|---|---|
| committer | Roberto I <roberto@inf.puc-rio.br> | 2026-05-28 15:10:17 -0300 |
| commit | 0465c23b3ee214ea3a117ab9d69a83cf85e7a82f (patch) | |
| tree | 2c286695a3c00501c2c8610844f968472ec85903 /lcode.c | |
| parent | 53b41d0cddd80bf33fdc631bdd32e3ba53842b89 (diff) | |
| download | lua-0465c23b3ee214ea3a117ab9d69a83cf85e7a82f.tar.gz lua-0465c23b3ee214ea3a117ab9d69a83cf85e7a82f.tar.bz2 lua-0465c23b3ee214ea3a117ab9d69a83cf85e7a82f.zip | |
Cleaning 'luaP_isIT' and 'luaP_isOT'
- 'luaP_isOT' is only used for tests, so it is defined as a macro to avoid
wasting space with an unused function.
- 'luaP_isIT' must include OP_VARARGPREP.
Diffstat (limited to 'lcode.c')
| -rw-r--r-- | lcode.c | 2 |
1 files changed, 0 insertions, 2 deletions
| @@ -1934,8 +1934,6 @@ void luaK_finish (FuncState *fs) { | |||
| 1934 | p->flag &= cast_byte(~PF_VAHID); /* then it will not use hidden args. */ | 1934 | p->flag &= cast_byte(~PF_VAHID); /* then it will not use hidden args. */ |
| 1935 | for (i = 0; i < fs->pc; i++) { | 1935 | for (i = 0; i < fs->pc; i++) { |
| 1936 | Instruction *pc = &p->code[i]; | 1936 | Instruction *pc = &p->code[i]; |
| 1937 | /* avoid "not used" warnings when assert is off (for 'onelua.c') */ | ||
| 1938 | (void)luaP_isOT; (void)luaP_isIT; | ||
| 1939 | lua_assert(i == 0 || luaP_isOT(*(pc - 1)) == luaP_isIT(*pc)); | 1937 | lua_assert(i == 0 || luaP_isOT(*(pc - 1)) == luaP_isIT(*pc)); |
| 1940 | switch (GET_OPCODE(*pc)) { | 1938 | switch (GET_OPCODE(*pc)) { |
| 1941 | case OP_RETURN0: case OP_RETURN1: { | 1939 | case OP_RETURN0: case OP_RETURN1: { |
