diff options
author | daurnimator <quae@daurnimator.com> | 2017-05-24 14:14:58 +1000 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2017-05-27 22:14:45 +1000 |
commit | 018f9cd8bbff126b7381bafa135e8127033c2faa (patch) | |
tree | fbbaee1d4fd0b9a0184a7eef4a2768b320cd3f54 /src/ldebug.js | |
parent | 4034ef458697729d1a8a25058b43272ae5882ce2 (diff) | |
download | fengari-018f9cd8bbff126b7381bafa135e8127033c2faa.tar.gz fengari-018f9cd8bbff126b7381bafa135e8127033c2faa.tar.bz2 fengari-018f9cd8bbff126b7381bafa135e8127033c2faa.zip |
Keep api_incr_top macro contents distinct
- Don't have postincrement in a previous expression
- Fix a couple of places the assert was missing
Diffstat (limited to 'src/ldebug.js')
-rw-r--r-- | src/ldebug.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ldebug.js b/src/ldebug.js index e78d3e7..2a9ada6 100644 --- a/src/ldebug.js +++ b/src/ldebug.js @@ -183,12 +183,14 @@ const funcinfo = function(ar, cl) { const collectvalidlines = function(L, f) { if (f === null || f instanceof lobject.CClosure) { - L.stack[L.top++] = new lobject.TValue(CT.LUA_TNIL, null); + L.stack[L.top] = new lobject.TValue(CT.LUA_TNIL, null); + L.top++; assert(L.top <= L.ci.top, "stack overflow"); } else { let lineinfo = f.l.p.lineinfo; let t = ltable.luaH_new(L); - L.stack[L.top++] = new lobject.TValue(CT.LUA_TTABLE, t); + L.stack[L.top] = new lobject.TValue(CT.LUA_TTABLE, t); + L.top++; assert(L.top <= L.ci.top, "stack overflow"); let v = new lobject.TValue(CT.LUA_TBOOLEAN, true); for (let i = 0; i < f.l.p.length; i++) |