From 6e0acf1e915dc1c12363884874ab5d3c596ca486 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Fri, 12 May 2017 15:25:49 +1000 Subject: src/{ldo,lvm}.js: Copy style from lua C code --- src/ldo.js | 3 +-- src/lvm.js | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/ldo.js b/src/ldo.js index 57400ab..f7a8d8f 100644 --- a/src/ldo.js +++ b/src/ldo.js @@ -89,8 +89,7 @@ const luaD_precall = function(L, off, nresults) { ci.nresults = nresults; ci.func = func; ci.l_base = base; - ci.top = base + fsize; - L.top = ci.top; + L.top = ci.top = base + fsize; ci.l_savedpc = p.code; ci.pcOff = 0; ci.callstatus = lstate.CIST_LUA; diff --git a/src/lvm.js b/src/lvm.js index 7483738..fb32c91 100644 --- a/src/lvm.js +++ b/src/lvm.js @@ -489,14 +489,12 @@ const luaV_execute = function(L) { L.stack[ofuncOff + aux] = L.stack[nfuncOff + aux]; oci.func = nci.func; oci.l_base = ofuncOff + (nci.l_base - nfuncOff); - L.top = ofuncOff + (L.top - nfuncOff); - oci.top = L.top; + oci.top = L.top = ofuncOff + (L.top - nfuncOff); oci.l_savedpc = nci.l_savedpc; oci.pcOff = nci.pcOff; oci.callstatus |= lstate.CIST_TAIL; oci.next = null; - L.ci = oci; - ci = L.ci; + ci = L.ci = oci; L.ciOff--; assert(L.top === oci.l_base + L.stack[ofuncOff].value.p.maxstacksize); -- cgit v1.2.3-70-g09d2