summaryrefslogtreecommitdiff
path: root/src/lparser.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-05-05 17:57:45 +1000
committerdaurnimator <quae@daurnimator.com>2017-05-05 17:57:45 +1000
commitc706c851f52c0b56a65dbaf74bafb66f36a9c521 (patch)
tree297d1325010ac164d14c4afc46babeebca7e5a64 /src/lparser.js
parent91be09a37c65b6b9247c7e3cdf4e189627226511 (diff)
downloadfengari-c706c851f52c0b56a65dbaf74bafb66f36a9c521.tar.gz
fengari-c706c851f52c0b56a65dbaf74bafb66f36a9c521.tar.bz2
fengari-c706c851f52c0b56a65dbaf74bafb66f36a9c521.zip
Always pass lua_State to Proto constructor
Diffstat (limited to 'src/lparser.js')
-rw-r--r--src/lparser.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lparser.js b/src/lparser.js
index f0f1d87..566576a 100644
--- a/src/lparser.js
+++ b/src/lparser.js
@@ -504,8 +504,8 @@ const undefgoto = function(ls, gt) {
** adds a new prototype into list of prototypes
*/
const addprototype = function(ls) {
- let clp = new Proto();
let L = ls.L;
+ let clp = new Proto(L);
let fs = ls.fs;
let f = fs.f; /* prototype of current function */
f.p[fs.np++] = clp;
@@ -536,7 +536,7 @@ const open_func = function(ls, fs, bl) {
fs.nactvar = 0;
fs.firstlocal = ls.dyd.actvar.n;
fs.bl = null;
- let f = new Proto();
+ let f = new Proto(ls.L);
f = fs.f;
f.source = ls.source;
f.maxstacksize = 2; /* registers 0/1 are always valid */