From: Mihai Bazon Date: Sun, 22 Mar 2015 10:51:15 +0000 (+0200) Subject: Avoid sequencesize for more than 2000 statements. X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=f0ab1b02e63bfad1162f77bb8545de34814f44f5;p=UglifyJS.git Avoid sequencesize for more than 2000 statements. It hardly saves any bytes for a sequence so long, and it risks blowing the stack with the recursive Seq functions. Ref #414 --- diff --git a/lib/compress.js b/lib/compress.js index 17bebf77..b50e7cf0 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -479,7 +479,7 @@ merge(Compressor.prototype, { }; function sequencesize(statements, compressor) { - if (statements.length < 2) return statements; + if (statements.length < 2 || statements.length > 2000) return statements; var seq = [], ret = []; function push_seq() { seq = AST_Seq.from_array(seq);