diff options
author | Benoit Giannangeli <giann@users.noreply.github.com> | 2017-05-22 20:06:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-22 20:06:57 +0200 |
commit | e3bdd1fea3665df28de25ed76f6399faf957179d (patch) | |
tree | 6884757b43064fa7163b54b86aa4561d185b5ca2 /src/lparser.js | |
parent | 25e2110a5eac0a2e6c7b4d502ffbd53fc61af301 (diff) | |
parent | 8a439e5563f12335e3d35dd63b4f8cbcc25a9bd8 (diff) | |
download | fengari-e3bdd1fea3665df28de25ed76f6399faf957179d.tar.gz fengari-e3bdd1fea3665df28de25ed76f6399faf957179d.tar.bz2 fengari-e3bdd1fea3665df28de25ed76f6399faf957179d.zip |
Merge pull request #63 from daurnimator/fix-skipped-tests
Investigated + fixed some skipped tests
Diffstat (limited to 'src/lparser.js')
-rw-r--r-- | src/lparser.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lparser.js b/src/lparser.js index 100342a..13f75c9 100644 --- a/src/lparser.js +++ b/src/lparser.js @@ -4,6 +4,7 @@ const assert = require('assert'); const defs = require('./defs.js'); const lcode = require('./lcode.js'); +const ldo = require('./ldo.js'); const lfunc = require('./lfunc.js'); const llex = require('./llex.js'); const llimit = require('./llimit.js'); @@ -1563,9 +1564,11 @@ const luaY_parser = function(L, z, buff, dyd, name, firstchar) { let lexstate = new llex.LexState(); let funcstate = new FuncState(); let cl = lfunc.luaF_newLclosure(L, 1); /* create main closure */ - L.stack[L.top++] = new TValue(defs.CT.LUA_TLCL, cl); + ldo.luaD_inctop(L); + L.stack[L.top-1] = new TValue(defs.CT.LUA_TLCL, cl); lexstate.h = ltable.luaH_new(L); /* create table for scanner */ - L.stack[L.top++] = new TValue(defs.CT.LUA_TTABLE, lexstate.h); + ldo.luaD_inctop(L); + L.stack[L.top-1] = new TValue(defs.CT.LUA_TTABLE, lexstate.h); funcstate.f = cl.p = new Proto(L); funcstate.f.source = lstring.luaS_new(L, name); lexstate.buff = buff; |