aboutsummaryrefslogtreecommitdiff
path: root/lvm.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2020-09-23 10:18:01 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2020-10-12 12:29:09 -0300
commit287b302acb8d925178e9edb800f0a8d18c7d35f6 (patch)
treebd662481ea995dc8c050324d553146e870434d93 /lvm.c
parent5d8ce05b3f6fad79e37ed21c1076e47a322472c6 (diff)
downloadlua-287b302acb8d925178e9edb800f0a8d18c7d35f6.tar.gz
lua-287b302acb8d925178e9edb800f0a8d18c7d35f6.tar.bz2
lua-287b302acb8d925178e9edb800f0a8d18c7d35f6.zip
Revision of stackless implementation
- more organized handling of 'nCcalls' - comments - deprecation of 'setcstacklimit'
Diffstat (limited to '')
-rw-r--r--lvm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lvm.c b/lvm.c
index a232e1e7..eadf66bf 100644
--- a/lvm.c
+++ b/lvm.c
@@ -1124,7 +1124,7 @@ void luaV_finishOp (lua_State *L) {
1124 1124
1125 1125
1126void luaV_execute (lua_State *L, CallInfo *ci) { 1126void luaV_execute (lua_State *L, CallInfo *ci) {
1127 const CallInfo *origci = ci; 1127 CallInfo * const origci = ci;
1128 LClosure *cl; 1128 LClosure *cl;
1129 TValue *k; 1129 TValue *k;
1130 StkId base; 1130 StkId base;
@@ -1624,7 +1624,7 @@ void luaV_execute (lua_State *L, CallInfo *ci) {
1624 vmcase(OP_TAILCALL) { 1624 vmcase(OP_TAILCALL) {
1625 int b = GETARG_B(i); /* number of arguments + 1 (function) */ 1625 int b = GETARG_B(i); /* number of arguments + 1 (function) */
1626 int nparams1 = GETARG_C(i); 1626 int nparams1 = GETARG_C(i);
1627 /* delat is virtual 'func' - real 'func' (vararg functions) */ 1627 /* delta is virtual 'func' - real 'func' (vararg functions) */
1628 int delta = (nparams1) ? ci->u.l.nextraargs + nparams1 : 0; 1628 int delta = (nparams1) ? ci->u.l.nextraargs + nparams1 : 0;
1629 if (b != 0) 1629 if (b != 0)
1630 L->top = ra + b; 1630 L->top = ra + b;
@@ -1648,7 +1648,7 @@ void luaV_execute (lua_State *L, CallInfo *ci) {
1648 updatetrap(ci); 1648 updatetrap(ci);
1649 updatestack(ci); /* stack may have been relocated */ 1649 updatestack(ci); /* stack may have been relocated */
1650 ci->func -= delta; 1650 ci->func -= delta;
1651 luaD_poscall(L, ci, cast_int(L->top - ra)); 1651 luaD_poscall(L, ci, cast_int(L->top - ra)); /* finish caller */
1652 goto ret; 1652 goto ret;
1653 } 1653 }
1654 ci->func -= delta; 1654 ci->func -= delta;