diff options
author | Benoit Giannangeli <giann008@gmail.com> | 2017-04-18 15:20:37 +0200 |
---|---|---|
committer | Benoit Giannangeli <giann008@gmail.com> | 2017-04-18 15:20:37 +0200 |
commit | a02f4e93b92e7ebb7ef038ad151e51652b0ce84d (patch) | |
tree | 2b83cacef266ff88ca3ed8cf3f19c1a1cbea7b38 /src/lparser.js | |
parent | 924ca09e8e9ec765301868d90dd3eba98058cafb (diff) | |
download | fengari-a02f4e93b92e7ebb7ef038ad151e51652b0ce84d.tar.gz fengari-a02f4e93b92e7ebb7ef038ad151e51652b0ce84d.tar.bz2 fengari-a02f4e93b92e7ebb7ef038ad151e51652b0ce84d.zip |
No more Table, just TValue with table type and Map value
Diffstat (limited to 'src/lparser.js')
-rw-r--r-- | src/lparser.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lparser.js b/src/lparser.js index cf5f55b..a0d671b 100644 --- a/src/lparser.js +++ b/src/lparser.js @@ -14,7 +14,6 @@ const OpCodesI = lopcode.OpCodesI; const Proto = lfunc.Proto; const R = llex.RESERVED; const TValue = lobject.TValue; -const Table = lobject.Table; const UnOpr = lcode.UnOpr; const UpVal = lfunc.UpVal; const char = lua.char; @@ -1342,7 +1341,7 @@ const test_then_block = function(ls, escapelist) { escapelist = lcode.luaK_concat(fs, escapelist, lcode.luaK_jump(fs)); /* must jump over it */ lcode.luaK_patchtohere(fs, jf); - return escapelist + return escapelist; }; const ifstat = function(ls, line) { @@ -1547,7 +1546,7 @@ const luaY_parser = function(L, z, buff, dyd, name, firstchar) { let funcstate = new FuncState(); let cl = lfunc.luaF_newLclosure(L, 1); /* create main closure */ L.stack[L.top++] = cl; - lexstate.h = new Table(); /* create table for scanner */ + lexstate.h = new TValue(lua.CT.LUA_TTABLE, new Map()); /* create table for scanner */ L.stack[L.top++] = lexstate.h; funcstate.f = cl.p = new Proto(L); funcstate.f.source = new TValue(lua.CT.LUA_TLNGSTR, name); |