summaryrefslogtreecommitdiff
path: root/src/lparser.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-05-05 15:46:17 +0200
committerBenoit Giannangeli <giann008@gmail.com>2017-05-05 15:46:17 +0200
commitd4aa8fa4e548ef348753ef765f2680f1a188d145 (patch)
tree92663657a52eb529ccc5c64ff70622ae2412deff /src/lparser.js
parent7ef345bee73f6cc843b0d82866d036a3ac5829ca (diff)
parentc7b6fa63459d411cd7b20ea0de3dc2f4cf7e2a2f (diff)
downloadfengari-d4aa8fa4e548ef348753ef765f2680f1a188d145.tar.gz
fengari-d4aa8fa4e548ef348753ef765f2680f1a188d145.tar.bz2
fengari-d4aa8fa4e548ef348753ef765f2680f1a188d145.zip
Merge remote-tracking branch 'daurnimator/fix-errors'
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 */