diff options
author | Benoit Giannangeli <benoit.giannangeli@boursorama.fr> | 2017-02-08 15:31:44 +0100 |
---|---|---|
committer | Benoit Giannangeli <giann008@gmail.com> | 2017-02-10 08:53:03 +0100 |
commit | ad5cb0ddb6d4bd187cd4370711b1c9e34245fe07 (patch) | |
tree | 3e8bccded1cd4625661fe9b06f66e11202c1dec2 /src/lstate.js | |
parent | bd6367e8f3162ff76628fa42948e66ba9e6ae281 (diff) | |
download | fengari-ad5cb0ddb6d4bd187cd4370711b1c9e34245fe07.tar.gz fengari-ad5cb0ddb6d4bd187cd4370711b1c9e34245fe07.tar.bz2 fengari-ad5cb0ddb6d4bd187cd4370711b1c9e34245fe07.zip |
Upvalues
Diffstat (limited to 'src/lstate.js')
-rw-r--r-- | src/lstate.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lstate.js b/src/lstate.js index 37f2d6b..2c322c3 100644 --- a/src/lstate.js +++ b/src/lstate.js @@ -2,6 +2,7 @@ "use strict"; const LUA_MULTRET = require('./lua.js').LUA_MULTRET; +const Table = require('./lobject.js').Table; class CallInfo { @@ -27,12 +28,13 @@ class CallInfo { class lua_State { constructor(cl) { - this.top = 1; + this.top = 2; 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 = [ + new Table(), // _ENV cl ]; this.openupval = []; |