summaryrefslogtreecommitdiff
path: root/src/lobject.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/lobject.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/lobject.js')
-rw-r--r--src/lobject.js12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/lobject.js b/src/lobject.js
index d7751b3..f7d07d7 100644
--- a/src/lobject.js
+++ b/src/lobject.js
@@ -195,11 +195,9 @@ const table_index = function(table, key) {
return v ? v : luaO_nilobject;
};
-class LClosure extends TValue {
+class LClosure {
constructor(L, n) {
- super(CT.LUA_TLCL, null);
-
this.p = null;
this.nupvalues = n;
@@ -213,22 +211,16 @@ class LClosure extends TValue {
this.upvals = [
_ENV
];
-
- this.value = this;
}
}
-class CClosure extends TValue {
+class CClosure {
constructor(f, n) {
- super(CT.LUA_TCCL, null);
-
this.f = f;
this.nupvalues = n;
this.upvalue = new Array(n);
-
- this.value = this;
}
}