aboutsummaryrefslogtreecommitdiff
path: root/test/compress/drop-unused.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2017-03-03 18:04:32 +0800
committerGitHub <noreply@github.com>2017-03-03 18:04:32 +0800
commit18059cc94fdc037e296a1cb1b08143d5e3aae570 (patch)
treed8b787fba1df5fe5c5052354008084c9f74e58d3 /test/compress/drop-unused.js
parentb5e0e8c2038c7c0ea13771891eb84f6e6f7bcbc3 (diff)
downloadtracifyjs-18059cc94fdc037e296a1cb1b08143d5e3aae570.tar.gz
tracifyjs-18059cc94fdc037e296a1cb1b08143d5e3aae570.zip
compress numerical expressions (#1513)
safe operations - `a === b` => `a == b` - `a + -b` => `a - b` - `-a + b` => `b - a` - `a+ +b` => `+b+a` associative operations (bit-wise operations are safe, otherwise `unsafe_math`) - `a + (b + c)` => `(a + b) + c` - `(n + 2) + 3` => `5 + n` - `(2 * n) * 3` => `6 * n` - `(a | 1) | (2 | d)` => `(3 | a) | b` fixes #412
Diffstat (limited to 'test/compress/drop-unused.js')
0 files changed, 0 insertions, 0 deletions