diff options
author | Mihai Bazon <mihai.bazon@gmail.com> | 2015-03-22 12:51:15 +0200 |
---|---|---|
committer | Mihai Bazon <mihai.bazon@gmail.com> | 2015-03-22 12:51:15 +0200 |
commit | f0ab1b02e63bfad1162f77bb8545de34814f44f5 (patch) | |
tree | 6a57e83feabe8d1ae86e5ab37e42817e91f9fb25 | |
parent | 36c28e02fda0beb169f5f98377cc09a83446a784 (diff) | |
download | tracifyjs-f0ab1b02e63bfad1162f77bb8545de34814f44f5.tar.gz tracifyjs-f0ab1b02e63bfad1162f77bb8545de34814f44f5.zip |
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
-rw-r--r-- | lib/compress.js | 2 |
1 files changed, 1 insertions, 1 deletions
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); |