summaryrefslogtreecommitdiff
path: root/src/lobject.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-05-02 15:00:04 +1000
committerdaurnimator <quae@daurnimator.com>2017-05-02 15:23:17 +1000
commitd9865ac5163f467268dcd894320bb283e053badb (patch)
tree125b276b1cd7b2cb275ade22c36b5d0f15c93ade /src/lobject.js
parentade2bbc6099b40fcde7b5a99ce24bd21913f117c (diff)
downloadfengari-d9865ac5163f467268dcd894320bb283e053badb.tar.gz
fengari-d9865ac5163f467268dcd894320bb283e053badb.tar.bz2
fengari-d9865ac5163f467268dcd894320bb283e053badb.zip
Use lfunc from lundump.js
Diffstat (limited to 'src/lobject.js')
-rw-r--r--src/lobject.js14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/lobject.js b/src/lobject.js
index 5918a84..784720b 100644
--- a/src/lobject.js
+++ b/src/lobject.js
@@ -7,9 +7,7 @@ const defs = require('./defs.js');
const ljstype = require('./ljstype.js');
const luaconf = require('./luaconf.js');
const llimit = require('./llimit.js');
-const ltable = require('./ltable.js');
const CT = defs.constant_types;
-const UpVal = require('./lfunc.js').UpVal;
const char = defs.char;
let tvalueCount = 0;
@@ -206,17 +204,7 @@ class LClosure {
constructor(L, n) {
this.p = null;
this.nupvalues = n;
-
- let _ENV = new UpVal(L);
- _ENV.refcount = 0;
- _ENV.v = null;
- _ENV.u.open.next = null;
- _ENV.u.open.touched = true;
- _ENV.u.value = new TValue(CT.LUA_TTABLE, ltable.luaH_new(L));
-
- this.upvals = [
- _ENV
- ];
+ this.upvals = Array(n);
}
}