aboutsummaryrefslogtreecommitdiff
path: root/lvm.c
diff options
context:
space:
mode:
Diffstat (limited to 'lvm.c')
-rw-r--r--lvm.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/lvm.c b/lvm.c
index be4793d1..b1e74f3d 100644
--- a/lvm.c
+++ b/lvm.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lvm.c,v 2.290 2017/07/07 16:34:32 roberto Exp roberto $ 2** $Id: lvm.c,v 2.291 2017/08/14 18:33:14 roberto Exp roberto $
3** Lua virtual machine 3** Lua virtual machine
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -753,10 +753,7 @@ void luaV_finishOp (lua_State *L) {
753** Execute a jump instruction. The 'updatemask' allows signals to stop 753** Execute a jump instruction. The 'updatemask' allows signals to stop
754** tight loops. (Without it, the local copy of 'mask' could never change.) 754** tight loops. (Without it, the local copy of 'mask' could never change.)
755*/ 755*/
756#define dojump(ci,i,e) \ 756#define dojump(ci,i,e) { pc += GETARG_sBx(i) + e; updatemask(L); }
757 { int a = GETARG_A(i); \
758 if (a != 0) luaF_close(L, ci->func + a); \
759 pc += GETARG_sBx(i) + e; updatemask(L); }
760 757
761 758
762/* for test instructions, execute the jump instruction that follows it */ 759/* for test instructions, execute the jump instruction that follows it */
@@ -1201,6 +1198,10 @@ void luaV_execute (lua_State *L) {
1201 L->top = ci->top; /* restore top */ 1198 L->top = ci->top; /* restore top */
1202 vmbreak; 1199 vmbreak;
1203 } 1200 }
1201 vmcase(OP_CLOSE) {
1202 luaF_close(L, ra);
1203 vmbreak;
1204 }
1204 vmcase(OP_JMP) { 1205 vmcase(OP_JMP) {
1205 dojump(ci, i, 0); 1206 dojump(ci, i, 0);
1206 vmbreak; 1207 vmbreak;