aboutsummaryrefslogtreecommitdiff
path: root/test/compress/numbers.js
AgeCommit message (Expand)Author
2018-04-28improve numeral compression (#3108)Alex Lam S.L
2017-04-01improve compression of undefined, NaN & Infinitiy (#1748)...- migrate transformation logic from `OutputStream` to `Compressor` - always turn `undefined` into `void 0` (unless `unsafe`) - always keep `NaN` except when avoiding local variable redefinition - introduce `keep_infinity` to suppress `1/0` transform, except when avoiding local variable redefinition supersedes #1723 fixes #1730Alex Lam S.L
2017-03-30remove paranthesis for `-(x*y)` (#1732)Alex Lam S.L
2017-03-28fix `is_number()` on `+=` (#1714)...fixes #1710Alex Lam S.L
2017-03-03compress 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 #412Alex Lam S.L
2016-03-14Fix: Uglified Number.prototype functions on big numbersphilippsimon