diff options
author | Benoit Giannangeli <benoit.giannangeli@boursorama.fr> | 2017-02-06 08:55:53 +0100 |
---|---|---|
committer | Benoit Giannangeli <benoit.giannangeli@boursorama.fr> | 2017-02-06 08:55:53 +0100 |
commit | 55db79dace02d22a7e0a6462cbf0b2b52f411639 (patch) | |
tree | 5ab9ac88f7ce7eff09d736a5adf470bbba8b4079 /src/lstate.js | |
parent | dfe6b5f2c1bde6900f81f1bb6ddc49724baa0471 (diff) | |
download | fengari-55db79dace02d22a7e0a6462cbf0b2b52f411639.tar.gz fengari-55db79dace02d22a7e0a6462cbf0b2b52f411639.tar.bz2 fengari-55db79dace02d22a7e0a6462cbf0b2b52f411639.zip |
postcall and precall
In the tests, we just look at the last n elements of the stack to check
our results. This is because the executed script itself doesn't expect
any result, so we did not put results at L.top.
Diffstat (limited to 'src/lstate.js')
-rw-r--r-- | src/lstate.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lstate.js b/src/lstate.js index bf49b42..ef84e07 100644 --- a/src/lstate.js +++ b/src/lstate.js @@ -4,8 +4,9 @@ class CallInfo { - constructor(func, top, base, previous, next) { + constructor(funcOff, func, top, base, previous, next) { this.func = func; + this.funcOff = funcOff; this.top = top; this.previous = previous; this.next = next; @@ -16,6 +17,7 @@ class CallInfo { savedpc: [] } }; + this.nresults = 0; } } @@ -24,7 +26,7 @@ class lua_State { constructor(cl) { this.top = 1; - this.ci = new CallInfo(cl, 1, 1, null, null); + this.ci = new CallInfo(0, cl, 1, 1, null, null); this.ci.u.l.savedpc = cl.p.code; this.ciOff = 0; this.stack = [ |