diff options
-rw-r--r-- | lcode.c | 2 | ||||
-rw-r--r-- | lvm.c | 9 |
2 files changed, 4 insertions, 7 deletions
@@ -110,7 +110,7 @@ int luaK_exp2const (FuncState *fs, const expdesc *e, TValue *v) { | |||
110 | ** optimizations). | 110 | ** optimizations). |
111 | */ | 111 | */ |
112 | static Instruction *previousinstruction (FuncState *fs) { | 112 | static Instruction *previousinstruction (FuncState *fs) { |
113 | static const Instruction invalidinstruction = -1; | 113 | static const Instruction invalidinstruction = ~(Instruction)0; |
114 | if (fs->pc > fs->lasttarget) | 114 | if (fs->pc > fs->lasttarget) |
115 | return &fs->f->code[fs->pc - 1]; /* previous instruction */ | 115 | return &fs->f->code[fs->pc - 1]; /* previous instruction */ |
116 | else | 116 | else |
@@ -1561,12 +1561,9 @@ void luaV_execute (lua_State *L, CallInfo *ci) { | |||
1561 | luaD_poscall(L, ci, cast_int(L->top - ra)); | 1561 | luaD_poscall(L, ci, cast_int(L->top - ra)); |
1562 | return; | 1562 | return; |
1563 | } | 1563 | } |
1564 | else { /* Lua tail call */ | 1564 | ci->func -= delta; |
1565 | ci->func -= delta; | 1565 | luaD_pretailcall(L, ci, ra, b); /* prepare call frame */ |
1566 | luaD_pretailcall(L, ci, ra, b); /* prepare call frame */ | 1566 | goto tailcall; |
1567 | goto tailcall; | ||
1568 | } | ||
1569 | vmbreak; | ||
1570 | } | 1567 | } |
1571 | vmcase(OP_RETURN) { | 1568 | vmcase(OP_RETURN) { |
1572 | int n = GETARG_B(i) - 1; /* number of results */ | 1569 | int n = GETARG_B(i) - 1; /* number of results */ |