[Pkg-javascript-commits] [uglifyjs] 30/491: rename variables for better readability (#1863)

Jonas Smedegaard dr at jones.dk
Wed Feb 14 19:51:19 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 5a25d24b56067e99ea9e5edc890a66eecbacdd7c
Author: Alex Lam S.L <alexlamsl at gmail.com>
Date:   Tue May 2 20:47:10 2017 +0800

    rename variables for better readability (#1863)
---
 lib/compress.js | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/compress.js b/lib/compress.js
index e5a7af2..931b8d6 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -3703,7 +3703,7 @@ merge(Compressor.prototype, {
                     var init = fixed.evaluate(compressor);
                     if (init !== fixed) {
                         init = make_node_from_constant(init, fixed);
-                        var value = init.optimize(compressor).print_to_string().length;
+                        var value_length = init.optimize(compressor).print_to_string().length;
                         var fn;
                         if (has_symbol_ref(fixed)) {
                             fn = function() {
@@ -3711,18 +3711,18 @@ merge(Compressor.prototype, {
                                 return result === init ? result.clone(true) : result;
                             };
                         } else {
-                            value = Math.min(value, fixed.print_to_string().length);
+                            value_length = Math.min(value_length, fixed.print_to_string().length);
                             fn = function() {
                                 var result = best_of_expression(init.optimize(compressor), fixed);
                                 return result === init || result === fixed ? result.clone(true) : result;
                             };
                         }
-                        var name = d.name.length;
+                        var name_length = d.name.length;
                         var overhead = 0;
                         if (compressor.option("unused") && (!d.global || compressor.toplevel(d))) {
-                            overhead = (name + 2 + value) / d.references.length;
+                            overhead = (name_length + 2 + value_length) / d.references.length;
                         }
-                        d.should_replace = value <= name + overhead ? fn : false;
+                        d.should_replace = value_length <= name_length + overhead ? fn : false;
                     } else {
                         d.should_replace = false;
                     }

-- 
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