aboutsummaryrefslogtreecommitdiff
path: root/lvm.c
diff options
context:
space:
mode:
Diffstat (limited to 'lvm.c')
-rw-r--r--lvm.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/lvm.c b/lvm.c
index 7e6f148d..c1b6749d 100644
--- a/lvm.c
+++ b/lvm.c
@@ -1574,8 +1574,10 @@ void luaV_execute (lua_State *L, CallInfo *ci) {
1574 savepc(ci); /* some calls here can raise errors */ 1574 savepc(ci); /* some calls here can raise errors */
1575 if (TESTARG_k(i)) { 1575 if (TESTARG_k(i)) {
1576 /* close upvalues from current call; the compiler ensures 1576 /* close upvalues from current call; the compiler ensures
1577 that there are no to-be-closed variables here */ 1577 that there are no to-be-closed variables here, so this
1578 call cannot change the stack */
1578 luaF_close(L, base, NOCLOSINGMETH); 1579 luaF_close(L, base, NOCLOSINGMETH);
1580 lua_assert(base == ci->func + 1);
1579 } 1581 }
1580 if (!ttisfunction(s2v(ra))) { /* not a function? */ 1582 if (!ttisfunction(s2v(ra))) { /* not a function? */
1581 luaD_tryfuncTM(L, ra); /* try '__call' metamethod */ 1583 luaD_tryfuncTM(L, ra); /* try '__call' metamethod */
@@ -1602,10 +1604,11 @@ void luaV_execute (lua_State *L, CallInfo *ci) {
1602 if (n < 0) /* not fixed? */ 1604 if (n < 0) /* not fixed? */
1603 n = cast_int(L->top - ra); /* get what is available */ 1605 n = cast_int(L->top - ra); /* get what is available */
1604 savepc(ci); 1606 savepc(ci);
1605 if (TESTARG_k(i)) { 1607 if (TESTARG_k(i)) { /* may there be open upvalues? */
1606 if (L->top < ci->top) 1608 if (L->top < ci->top)
1607 L->top = ci->top; 1609 L->top = ci->top;
1608 luaF_close(L, base, LUA_OK); /* there may be open upvalues */ 1610 luaF_close(L, base, LUA_OK);
1611 updatetrap(ci);
1609 updatestack(ci); 1612 updatestack(ci);
1610 } 1613 }
1611 if (nparams1) /* vararg function? */ 1614 if (nparams1) /* vararg function? */