[Pkg-javascript-commits] [uglifyjs] 04/190: Advanced way to specify if a function call might have side effects. #400

Antonio Terceiro terceiro at moszumanska.debian.org
Sun Aug 7 23:17:06 UTC 2016


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

terceiro pushed a commit to annotated tag upstream/2.7.0
in repository uglifyjs.

commit 252fc65558e40e5e0a451f8fe3f2d5ae7a639457
Author: thorn0 <georgii.dolzhykov at stuzo.com>
Date:   Sat Jan 18 15:16:43 2014 +0200

    Advanced way to specify if a function call might have side effects. #400
---
 lib/compress.js | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/compress.js b/lib/compress.js
index 4c4cf97..401a1c7 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -896,6 +896,7 @@ merge(Compressor.prototype, {
         def(AST_Call, function(compressor){
             var pure = compressor.option("pure_funcs");
             if (!pure) return true;
+            if (typeof pure == "function") return pure(this);
             return pure.indexOf(this.expression.print_to_string()) < 0;
         });
 

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