From cb0295e52870f22c5dd1a1726342b8d4b147b1c5 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Tue, 2 May 2017 16:37:50 +1000 Subject: Refactor table implementation --- src/ldebug.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/ldebug.js') 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); } }; -- cgit v1.2.3-70-g09d2