aboutsummaryrefslogtreecommitdiff
path: root/src/lstate.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2018-01-29 19:01:22 +1100
committerdaurnimator <quae@daurnimator.com>2018-01-29 22:07:00 +1100
commit313f55905253697fe4966f979865296aeaa7a801 (patch)
treea8f060a377d45943952ade62507951cd4555a21b /src/lstate.js
parent62b07567d9f39fa746ea35d9c08cd1dcf37dc67a (diff)
downloadfengari-313f55905253697fe4966f979865296aeaa7a801.tar.gz
fengari-313f55905253697fe4966f979865296aeaa7a801.tar.bz2
fengari-313f55905253697fe4966f979865296aeaa7a801.zip
src/: Upvalues are now just TValues (possibly referencing on-stack)
- Removes `Upval` class - closing over upvalues is now done by creating new on-stack TValue objects - No more `openupval` linked list With this fix, upvalues from collected coroutines will no longer keep other values alive Closes #44
Diffstat (limited to 'src/lstate.js')
-rw-r--r--src/lstate.js4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/lstate.js b/src/lstate.js
index 461ad83..0c44f3c 100644
--- a/src/lstate.js
+++ b/src/lstate.js
@@ -18,7 +18,6 @@ const lobject = require('./lobject.js');
const ldo = require('./ldo.js');
const lapi = require('./lapi.js');
const ltable = require('./ltable.js');
-const lfunc = require('./lfunc.js');
const ltm = require('./ltm.js');
const EXTRA_STACK = 5;
@@ -70,7 +69,6 @@ class lua_State {
this.basehookcount = 0;
this.allowhook = 1;
this.hookcount = this.basehookcount;
- this.openupval = null;
this.nny = 1;
this.status = LUA_OK;
this.errfunc = 0;
@@ -166,7 +164,6 @@ const lua_newthread = function(L) {
};
const luaE_freethread = function(L, L1) {
- lfunc.luaF_close(L1, L1.stack);
freestack(L1);
};
@@ -183,7 +180,6 @@ const lua_newstate = function() {
};
const close_state = function(L) {
- lfunc.luaF_close(L, L.stack); /* close all upvalues for this thread */
freestack(L);
};