[Pkg-javascript-commits] [uglifyjs] 158/491: minimise `reduce_vars` cloning overhead (#2148)

Jonas Smedegaard dr at jones.dk
Wed Feb 14 19:51:31 UTC 2018


This is an automated email from the git hooks/post-receive script.

js pushed a commit to annotated tag debian/3.3.10-1
in repository uglifyjs.

commit b3a57ff019bf5c64783f55e581aa4270a52d9d13
Author: Alex Lam S.L <alexlamsl at gmail.com>
Date:   Fri Jun 23 06:59:53 2017 +0800

    minimise `reduce_vars` cloning overhead (#2148)
---
 lib/compress.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/compress.js b/lib/compress.js
index c332282..8890759 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -3887,7 +3887,7 @@ merge(Compressor.prototype, {
             var d = self.definition();
             var fixed = self.fixed_value();
             if (fixed instanceof AST_Defun) {
-                d.fixed = fixed = make_node(AST_Function, fixed, fixed).clone(true);
+                d.fixed = fixed = make_node(AST_Function, fixed, fixed);
             }
             if (compressor.option("unused")
                 && fixed instanceof AST_Function
@@ -3895,7 +3895,7 @@ merge(Compressor.prototype, {
                 && !(d.scope.uses_arguments && d.orig[0] instanceof AST_SymbolFunarg)
                 && !d.scope.uses_eval
                 && compressor.find_parent(AST_Scope) === fixed.parent_scope) {
-                return fixed;
+                return fixed.clone(true);
             }
             if (compressor.option("evaluate") && fixed) {
                 if (d.should_replace === undefined) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/uglifyjs.git



More information about the Pkg-javascript-commits mailing list