From 9624b3bb70f4d28f468d34503c919c9bc3eee11b Mon Sep 17 00:00:00 2001 From: daurnimator Date: Fri, 5 May 2017 13:25:03 +1000 Subject: src/lparser.js: protos have Upvaldescs not UpVals --- src/lparser.js | 10 +++++----- 1 file 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++; }; -- cgit v1.2.3-70-g09d2