diff options
author | Benoit Giannangeli <benoit.giannangeli@boursorama.fr> | 2017-02-17 09:27:51 +0100 |
---|---|---|
committer | Benoit Giannangeli <benoit.giannangeli@boursorama.fr> | 2017-02-17 09:27:51 +0100 |
commit | 50aa5b5029165be03d0cfb34e7d664795dd80898 (patch) | |
tree | dc42e1a73ac367fef1a88c3dd0502a0879eebea3 /src/lstate.js | |
parent | 4eea48935f2e0ea1267d314f2900af2a1a4b8b02 (diff) | |
download | fengari-50aa5b5029165be03d0cfb34e7d664795dd80898.tar.gz fengari-50aa5b5029165be03d0cfb34e7d664795dd80898.tar.bz2 fengari-50aa5b5029165be03d0cfb34e7d664795dd80898.zip |
More accurate state and closure init
Diffstat (limited to 'src/lstate.js')
-rw-r--r-- | src/lstate.js | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/src/lstate.js b/src/lstate.js index 4d71be7..54e7ac7 100644 --- a/src/lstate.js +++ b/src/lstate.js @@ -44,22 +44,11 @@ class CallInfo { class lua_State { constructor(cl) { - if (cl) { // TODO: remove - this.top = 1; - this.ci = new CallInfo(0, cl, 1, 1, null, null); - this.ci.u.l.savedpc = cl.p.code; - this.ci.nresults = LUA_MULTRET; - this.ciOff = 0; - this.stack = [ - cl - ]; - } else { - this.base_ci = new CallInfo(); // Will be populated later - this.top = 0; - this.ci = null; - this.ciOff = null; - this.stack = []; - } + this.base_ci = new CallInfo(); // Will be populated later + this.top = 0; + this.ci = null; + this.ciOff = null; + this.stack = []; this.openupval = []; this.status = TS.LUA_OK; this.next = null; |