summaryrefslogtreecommitdiff
path: root/src/lstate.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-05-08 17:27:02 +1000
committerdaurnimator <quae@daurnimator.com>2017-05-08 17:27:02 +1000
commit698a10a3aaa3b5df0c22597e9b92a89b4f921632 (patch)
treed43d54cfbc182bf61715ea83d6ea4cf964c6214d /src/lstate.js
parent1f53206abfbac6dcae709831f5070a99c23c19db (diff)
downloadfengari-698a10a3aaa3b5df0c22597e9b92a89b4f921632.tar.gz
fengari-698a10a3aaa3b5df0c22597e9b92a89b4f921632.tar.bz2
fengari-698a10a3aaa3b5df0c22597e9b92a89b4f921632.zip
ltm.TMS should be indexes into an array
Diffstat (limited to 'src/lstate.js')
-rw-r--r--src/lstate.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lstate.js b/src/lstate.js
index f2e17cd..664ef27 100644
--- a/src/lstate.js
+++ b/src/lstate.js
@@ -9,7 +9,7 @@ const ldo = require('./ldo.js');
const lapi = require('./lapi.js');
const ltable = require('./ltable.js');
const lfunc = require('./lfunc.js');
-const luaT_init = require('./ltm.js').luaT_init;
+const ltm = require('./ltm.js');
const CT = defs.constant_types;
const TS = defs.thread_status;
const LUA_NUMTAGS = defs.LUA_NUMTAGS;
@@ -68,6 +68,7 @@ class global_State {
this.l_registry = new lobject.TValue(CT.LUA_TNIL, null);
this.panic = null;
this.version = null;
+ this.tmname = new Array(ltm.TMS.TM_N);
this.mt = new Array(LUA_NUMTAGS);
}
@@ -105,7 +106,7 @@ const f_luaopen = function(L) {
let g = L.l_G;
stack_init(L, L);
init_registry(L, g);
- luaT_init(L);
+ ltm.luaT_init(L);
g.version = lapi.lua_version(null);
};