aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2017-12-25 03:07:46 +0800
committerGitHub <noreply@github.com>2017-12-25 03:07:46 +0800
commit1476c78b53e760507a56189dfbdf82f8c07483f8 (patch)
tree0c4a2a00641679cc052dbe29f69f58e4ad1db7aa
parentcb6a92892f9a5d66d36c766213c19e274efb9796 (diff)
downloadtracifyjs-1476c78b53e760507a56189dfbdf82f8c07483f8.tar.gz
tracifyjs-1476c78b53e760507a56189dfbdf82f8c07483f8.zip
add `html-minifier` to benchmarks (#2646)
-rw-r--r--lib/compress.js2
-rw-r--r--test/benchmark.js1
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/compress.js b/lib/compress.js
index cc360950..8cfb56be 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -3948,7 +3948,7 @@ merge(Compressor.prototype, {
&& !fn.contains_this()
&& can_flatten_args(fn)
&& (value = flatten_body(stat))) {
- var expressions = flatten_args(fn, scope);
+ var expressions = flatten_args(fn);
expressions.push(value.clone(true));
return make_sequence(self, expressions).optimize(compressor);
}
diff --git a/test/benchmark.js b/test/benchmark.js
index 8b20ec13..59383606 100644
--- a/test/benchmark.js
+++ b/test/benchmark.js
@@ -21,6 +21,7 @@ var urls = [
"http://builds.emberjs.com/tags/v2.11.0/ember.prod.js",
"https://cdn.jsdelivr.net/lodash/4.17.4/lodash.js",
"https://cdnjs.cloudflare.com/ajax/libs/d3/4.5.0/d3.js",
+ "https://raw.githubusercontent.com/kangax/html-minifier/v3.5.7/dist/htmlminifier.js",
];
var results = {};
var remaining = 2 * urls.length;