diff options
Diffstat (limited to 'lvm.c')
-rw-r--r-- | lvm.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -1038,7 +1038,10 @@ void luaV_finishOp (lua_State *L) { | |||
1038 | ** errors. (That is, it will not return to the interpreter main loop | 1038 | ** errors. (That is, it will not return to the interpreter main loop |
1039 | ** after changing the stack or hooks.) | 1039 | ** after changing the stack or hooks.) |
1040 | */ | 1040 | */ |
1041 | #define halfProtect(exp) (savepc(L), (exp)) | 1041 | #define halfProtect(exp) (savestate(L,ci), (exp)) |
1042 | |||
1043 | /* idem, but without changing the stack */ | ||
1044 | #define halfProtectNT(exp) (savepc(L), (exp)) | ||
1042 | 1045 | ||
1043 | 1046 | ||
1044 | #define checkGC(L,c) \ | 1047 | #define checkGC(L,c) \ |
@@ -1620,7 +1623,7 @@ void luaV_execute (lua_State *L, CallInfo *ci) { | |||
1620 | vmcase(OP_RETURN0) { | 1623 | vmcase(OP_RETURN0) { |
1621 | if (L->hookmask) { | 1624 | if (L->hookmask) { |
1622 | L->top = ra; | 1625 | L->top = ra; |
1623 | halfProtect(luaD_poscall(L, ci, 0)); /* no hurry... */ | 1626 | halfProtectNT(luaD_poscall(L, ci, 0)); /* no hurry... */ |
1624 | } | 1627 | } |
1625 | else { /* do the 'poscall' here */ | 1628 | else { /* do the 'poscall' here */ |
1626 | int nres = ci->nresults; | 1629 | int nres = ci->nresults; |
@@ -1634,7 +1637,7 @@ void luaV_execute (lua_State *L, CallInfo *ci) { | |||
1634 | vmcase(OP_RETURN1) { | 1637 | vmcase(OP_RETURN1) { |
1635 | if (L->hookmask) { | 1638 | if (L->hookmask) { |
1636 | L->top = ra + 1; | 1639 | L->top = ra + 1; |
1637 | halfProtect(luaD_poscall(L, ci, 1)); /* no hurry... */ | 1640 | halfProtectNT(luaD_poscall(L, ci, 1)); /* no hurry... */ |
1638 | } | 1641 | } |
1639 | else { /* do the 'poscall' here */ | 1642 | else { /* do the 'poscall' here */ |
1640 | int nres = ci->nresults; | 1643 | int nres = ci->nresults; |