summaryrefslogtreecommitdiff
path: root/src/lobject.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-04-27 12:15:10 +1000
committerBenoit Giannangeli <giann008@gmail.com>2017-04-28 14:15:58 +0200
commitb45dc3dd1e3f9ef4548a5e422cb6f7daa9a3ba79 (patch)
treed27f1299ae4324395367703cf311ec4d3dc54ea7 /src/lobject.js
parent86c357cd0c0184b640d0c2233ff53b6f23188d90 (diff)
downloadfengari-b45dc3dd1e3f9ef4548a5e422cb6f7daa9a3ba79.tar.gz
fengari-b45dc3dd1e3f9ef4548a5e422cb6f7daa9a3ba79.tar.bz2
fengari-b45dc3dd1e3f9ef4548a5e422cb6f7daa9a3ba79.zip
Add table construction function
Diffstat (limited to 'src/lobject.js')
-rw-r--r--src/lobject.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lobject.js b/src/lobject.js
index e785e68..00f5ac6 100644
--- a/src/lobject.js
+++ b/src/lobject.js
@@ -7,6 +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;
@@ -172,7 +173,7 @@ class LClosure extends TValue {
_ENV.v = null;
_ENV.u.open.next = null;
_ENV.u.open.touched = true;
- _ENV.u.value = new TValue(CT.LUA_TTABLE, new Map());
+ _ENV.u.value = new TValue(CT.LUA_TTABLE, ltable.luaH_new(L));
this.upvals = [
_ENV