summaryrefslogtreecommitdiff
path: root/src/ldebug.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-05-02 16:37:50 +1000
committerdaurnimator <quae@daurnimator.com>2017-05-03 12:20:43 +1000
commitcb0295e52870f22c5dd1a1726342b8d4b147b1c5 (patch)
tree3655d4d6f4873ed246c00c0eb6680a06124f3046 /src/ldebug.js
parent50820e54d065bffbb504e6b20b6c27802e102c25 (diff)
downloadfengari-cb0295e52870f22c5dd1a1726342b8d4b147b1c5.tar.gz
fengari-cb0295e52870f22c5dd1a1726342b8d4b147b1c5.tar.bz2
fengari-cb0295e52870f22c5dd1a1726342b8d4b147b1c5.zip
Refactor table implementation
Diffstat (limited to 'src/ldebug.js')
-rw-r--r--src/ldebug.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ldebug.js b/src/ldebug.js
index d429457..d565829 100644
--- a/src/ldebug.js
+++ b/src/ldebug.js
@@ -180,12 +180,12 @@ const collectvalidlines = function(L, f) {
assert(L.top <= L.ci.top, "stack overflow");
} else {
let lineinfo = f.l.p.lineinfo;
- let t = new TValue(CT.LUA_TTABLE, ltable.luaH_new(L));
- L.stack[L.top++] = t;
+ let t = ltable.luaH_new(L);
+ L.stack[L.top++] = new TValue(CT.LUA_TTABLE, t);
assert(L.top <= L.ci.top, "stack overflow");
let v = new TValue(CT.LUA_TBOOLEAN, true);
for (let i = 0; i < f.l.p.length; i++)
- lobject.table_newindex(t, lineinfo[i], v);
+ ltable.luaH_setint(t, lineinfo[i], v);
}
};