summaryrefslogtreecommitdiff
path: root/src/lparser.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-05-05 13:25:03 +1000
committerdaurnimator <quae@daurnimator.com>2017-05-05 13:32:06 +1000
commit9624b3bb70f4d28f468d34503c919c9bc3eee11b (patch)
tree0adc8e25a6e9ae242148717e9e7821064407f6de /src/lparser.js
parent1cab03b0f0675a86617a7de1749ef3d519a4c334 (diff)
downloadfengari-9624b3bb70f4d28f468d34503c919c9bc3eee11b.tar.gz
fengari-9624b3bb70f4d28f468d34503c919c9bc3eee11b.tar.bz2
fengari-9624b3bb70f4d28f468d34503c919c9bc3eee11b.zip
src/lparser.js: protos have Upvaldescs not UpVals
Diffstat (limited to 'src/lparser.js')
-rw-r--r--src/lparser.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lparser.js b/src/lparser.js
index 7b39701..f0f1d87 100644
--- a/src/lparser.js
+++ b/src/lparser.js
@@ -16,7 +16,6 @@ const Proto = lfunc.Proto;
const R = llex.RESERVED;
const TValue = lobject.TValue;
const UnOpr = lcode.UnOpr;
-const UpVal = lfunc.UpVal;
const char = defs.char;
const MAXVARS = 200;
@@ -284,10 +283,11 @@ const searchupvalue = function(fs, name) {
const newupvalue = function(fs, name, v) {
let f = fs.f;
checklimit(fs, fs.nups + 1, lfunc.MAXUPVAL, defs.to_luastring("upvalues", true));
- f.upvalues[fs.nups] = new UpVal(fs.ls.L);
- f.upvalues[fs.nups].instack = v.k === expkind.VLOCAL;
- f.upvalues[fs.nups].idx = v.u.info;
- f.upvalues[fs.nups].name = name;
+ f.upvalues[fs.nups] = {
+ instack: v.k === expkind.VLOCAL,
+ idx: v.u.info,
+ name: name
+ };
return fs.nups++;
};