summaryrefslogtreecommitdiff
path: root/src/lfunc.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-05-05 16:46:56 +1000
committerdaurnimator <quae@daurnimator.com>2017-05-05 16:52:49 +1000
commitb54eee30383e4eaae74551afc9d1c59126269305 (patch)
tree4902003c0ce70ac1b0b81d4b40aa144e30e61c2f /src/lfunc.js
parent1dc893efcd664df86606b571d4b6bbee5b5868ca (diff)
downloadfengari-b54eee30383e4eaae74551afc9d1c59126269305.tar.gz
fengari-b54eee30383e4eaae74551afc9d1c59126269305.tar.bz2
fengari-b54eee30383e4eaae74551afc9d1c59126269305.zip
An open upvalue already knows which lua_State it comes from
Diffstat (limited to 'src/lfunc.js')
-rw-r--r--src/lfunc.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lfunc.js b/src/lfunc.js
index db623b5..0b78bd3 100644
--- a/src/lfunc.js
+++ b/src/lfunc.js
@@ -41,8 +41,8 @@ class UpVal {
};
}
- val(L) {
- return this.v !== null ? L.stack[this.v] : this.u.value;
+ val() {
+ return this.v !== null ? this.L.stack[this.v] : this.u.value;
}
setval(L, ra) {
@@ -94,7 +94,7 @@ const luaF_close = function(L, level) {
assert(uv.isopen());
L.openupval = uv.u.open.next; /* remove from 'open' list */
if (uv.refcount > 0) {
- let from = L.stack[uv.v];
+ let from = uv.L.stack[uv.v];
uv.u.value = new lobject.TValue(from.type, from.value);
uv.v = null;
}