diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2017-12-22 14:43:59 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2017-12-22 14:43:59 -0200 |
| commit | f360e7778bb7e4be6afc4e27bd9412222b2c6c55 (patch) | |
| tree | 75ed3f0949a5c45dd7c8380efb559612a58637d5 /lcode.c | |
| parent | 4676f6599e04d4eaa78c050616e94994e6a36396 (diff) | |
| download | lua-f360e7778bb7e4be6afc4e27bd9412222b2c6c55.tar.gz lua-f360e7778bb7e4be6afc4e27bd9412222b2c6c55.tar.bz2 lua-f360e7778bb7e4be6afc4e27bd9412222b2c6c55.zip | |
assert cannot use instruction after the last
Diffstat (limited to 'lcode.c')
| -rw-r--r-- | lcode.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lcode.c,v 2.146 2017/12/18 15:44:44 roberto Exp roberto $ | 2 | ** $Id: lcode.c,v 2.147 2017/12/22 14:16:46 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 | */ |
| @@ -1622,7 +1622,7 @@ void luaK_finish (FuncState *fs) { | |||
| 1622 | Proto *p = fs->f; | 1622 | Proto *p = fs->f; |
| 1623 | for (i = 0; i < fs->pc; i++) { | 1623 | for (i = 0; i < fs->pc; i++) { |
| 1624 | Instruction *pc = &p->code[i]; | 1624 | Instruction *pc = &p->code[i]; |
| 1625 | lua_assert(isOT(*pc) == isIT(*(pc + 1))); | 1625 | lua_assert(i == 0 || isOT(*(pc - 1)) == isIT(*pc)); |
| 1626 | switch (GET_OPCODE(*pc)) { | 1626 | switch (GET_OPCODE(*pc)) { |
| 1627 | case OP_RETURN: case OP_RETURN0: case OP_RETURN1: | 1627 | case OP_RETURN: case OP_RETURN0: case OP_RETURN1: |
| 1628 | case OP_TAILCALL: { | 1628 | case OP_TAILCALL: { |
