summaryrefslogtreecommitdiff
path: root/src/lvm.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-04-27 17:20:28 +1000
committerBenoit Giannangeli <giann008@gmail.com>2017-04-28 14:15:58 +0200
commit18fde8bd2285ad45baa9f9b2f16b40fb6bd3b2dd (patch)
tree57a32acf8fc5f7149c94a8e979ed39b9dba7e912 /src/lvm.js
parent4cd7e4062219ccffbbc9e397e1ab599c26a3ae76 (diff)
downloadfengari-18fde8bd2285ad45baa9f9b2f16b40fb6bd3b2dd.tar.gz
fengari-18fde8bd2285ad45baa9f9b2f16b40fb6bd3b2dd.tar.bz2
fengari-18fde8bd2285ad45baa9f9b2f16b40fb6bd3b2dd.zip
LClosure and CClosure shouldn't subclass TValue
Diffstat (limited to 'src/lvm.js')
-rw-r--r--src/lvm.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lvm.js b/src/lvm.js
index 7f4392f..24822b6 100644
--- a/src/lvm.js
+++ b/src/lvm.js
@@ -114,7 +114,7 @@ const luaV_execute = function(L) {
specialCase = null;
} else {
ci = L.ci;
- cl = ci.func;
+ cl = ci.func.value;
k = cl.p.k;
base = ci.u.l.base;
@@ -523,7 +523,7 @@ const luaV_execute = function(L) {
let nfuncOff = nci.funcOff;
let ofunc = oci.func;
let ofuncOff = oci.funcOff;
- let lim = nci.u.l.base + nfunc.p.numparams;
+ let lim = nci.u.l.base + nfunc.value.p.numparams;
if (cl.p.p.length > 0) lfunc.luaF_close(L, oci.u.l.base);
for (let aux = 0; nfuncOff + aux < lim; aux++)
L.stack[ofuncOff + aux] = L.stack[nfuncOff + aux];
@@ -538,7 +538,7 @@ const luaV_execute = function(L) {
ci = L.ci;
L.ciOff--;
- assert(L.top === oci.u.l.base + L.stack[ofuncOff].p.maxstacksize);
+ assert(L.top === oci.u.l.base + L.stack[ofuncOff].value.p.maxstacksize);
continue newframe;
}
@@ -668,7 +668,7 @@ const luaV_execute = function(L) {
let ncl = new LClosure(L, nup);
ncl.p = p;
- L.stack[ra] = ncl;
+ L.stack[ra] = new TValue(CT.LUA_TLCL, ncl);
for (let i = 0; i < nup; i++) {
if (uv[i].instack)