From ac73c5d4211b9ecff0f9650a032e964ef1cad585 Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Fri, 12 May 2017 12:34:55 +0800 Subject: avoid `arguments` and `eval` in `reduce_vars` (#1924) fixes #1922 --- lib/compress.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/compress.js b/lib/compress.js index aff5c643..1ded032b 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -354,10 +354,14 @@ merge(Compressor.prototype, { // So existing transformation rules can work on them. node.argnames.forEach(function(arg, i) { var d = arg.definition(); - d.fixed = function() { - return iife.args[i] || make_node(AST_Undefined, iife); - }; - mark(d, true); + if (!node.uses_arguments && d.fixed === undefined) { + d.fixed = function() { + return iife.args[i] || make_node(AST_Undefined, iife); + }; + mark(d, true); + } else { + d.fixed = false; + } }); } descend(); @@ -491,7 +495,9 @@ merge(Compressor.prototype, { function reset_def(def) { def.escaped = false; - if (!def.global || def.orig[0] instanceof AST_SymbolConst || compressor.toplevel(def)) { + if (def.scope.uses_eval) { + def.fixed = false; + } else if (!def.global || def.orig[0] instanceof AST_SymbolConst || compressor.toplevel(def)) { def.fixed = undefined; } else { def.fixed = false; -- cgit v1.2.3 nge
path: root/gnu/packages/rdf.scm
AgeCommit message (Expand)Author
2021-01-11gnu: sord: Update to 0.16.8....Tobias Geerinckx-Rice
2021-01-11gnu: serd: Update to 0.30.8....Tobias Geerinckx-Rice
2020-10-02gnu: sord: Update to 0.16.6....Tobias Geerinckx-Rice
2020-10-02gnu: serd: Update to 0.30.6....Tobias Geerinckx-Rice
2020-08-29gnu: Add hdt-cpp....pukkamustard
2020-08-09gnu: Add python-cfgraph....Efraim Flashner
2020-07-12gnu: Remove ".git" from "https://github/…/….git"....Ludovic Courtès