aboutsummaryrefslogtreecommitdiff
path: root/lib/compress.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2017-02-26 05:58:26 +0800
committerGitHub <noreply@github.com>2017-02-26 05:58:26 +0800
commit13be50a4a9e34d65fef834625f44545e849fed02 (patch)
tree2b4be9da6a6d7ded94d97b14b78274293865f76b /lib/compress.js
parent16cd5d57a5cf7f5750104df0e5af246708fd493f (diff)
downloadtracifyjs-13be50a4a9e34d65fef834625f44545e849fed02.tar.gz
tracifyjs-13be50a4a9e34d65fef834625f44545e849fed02.zip
faster tree transversal (#1462)
- convert `[].forEach()` to for-loops
Diffstat (limited to 'lib/compress.js')
-rw-r--r--lib/compress.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/compress.js b/lib/compress.js
index ccd6e23c..53833115 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -1911,7 +1911,7 @@ merge(Compressor.prototype, {
// returned if nothing changed.
function trim(nodes, compressor, first_in_statement) {
var ret = [], changed = false;
- for (var i = 0, ii = nodes.length; i < ii; i++) {
+ for (var i = 0, len = nodes.length; i < len; i++) {
var node = nodes[i].drop_side_effect_free(compressor, first_in_statement);
changed |= node !== nodes[i];
if (node) {