diff options
author | daurnimator <quae@daurnimator.com> | 2017-05-08 17:27:02 +1000 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2017-05-08 17:27:02 +1000 |
commit | 698a10a3aaa3b5df0c22597e9b92a89b4f921632 (patch) | |
tree | d43d54cfbc182bf61715ea83d6ea4cf964c6214d /src/lstate.js | |
parent | 1f53206abfbac6dcae709831f5070a99c23c19db (diff) | |
download | fengari-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.js | 5 |
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); }; |