From 266c0a526374274b1b07187e52aec6b40d0cab00 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Fri, 12 May 2017 15:22:37 +1000 Subject: Move adhoc code into proper luaE_extendCI --- src/ldo.js | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) (limited to 'src/ldo.js') diff --git a/src/ldo.js b/src/ldo.js index da110e7..57400ab 100644 --- a/src/ldo.js +++ b/src/ldo.js @@ -53,17 +53,10 @@ const luaD_precall = function(L, off, nresults) { case CT.LUA_TLCF: { let f = func.type === CT.LUA_TCCL ? func.value.f : func.value; - // next_ci - let ci = new lstate.CallInfo(off); - L.ci.next = ci; - ci.previous = L.ci; - ci.next = null; - L.ci = ci; - L.ciOff++; - + let ci = lstate.luaE_extendCI(L); + ci.funcOff = off; ci.nresults = nresults; ci.func = func; - ci.funcOff = off; ci.top = L.top + defs.LUA_MINSTACK; ci.callstatus = 0; if (L.hookmask & defs.LUA_MASKCALL) @@ -91,17 +84,10 @@ const luaD_precall = function(L, off, nresults) { base = off + 1; } - // next_ci - let ci = new lstate.CallInfo(off); - L.ci.next = ci; - ci.previous = L.ci; - ci.next = null; - L.ci = ci; - L.ciOff++; - + let ci = lstate.luaE_extendCI(L); + ci.funcOff = off; ci.nresults = nresults; ci.func = func; - ci.funcOff = off; ci.l_base = base; ci.top = base + fsize; L.top = ci.top; -- cgit v1.2.3-54-g00ecf