aboutsummaryrefslogtreecommitdiff
path: root/test/compress/evaluate.js
AgeCommit message (Expand)Author
2017-01-26optimise binary operands with evaluate() (#1427)...- remove call to evaluate() in is_constant() and let nested optimize() does its job instead - reject RegExp in is_constant() and remove special case logic under collapse_vars - operands to conditionals optimisation are now always evaluate()-ed - throw error in constant_value() instead of returning undefined to catch possible bugs, similar to make_node_from_constant() - optimise binary boolean operators under `evaluate` instead of `conditionals`Alex Lam S.L
2017-01-26augment evaluate to extract within objects (#1425)...- gated by `unsafe` - replaces previous optimisation specific to String.length - "123"[0] => 1 - [1, 2, 3][0] => 1 - [1, 2, 3].length => 3 - does not apply to objects with overridden prototype functionsAlex Lam S.L
2016-05-24Completely allow evaluating -0Richard van Velzen
2016-05-17Never produce -0 when evaluating expressions (like -"")...Fix for #1085. The major case was already there, but more expressions can result in -0. Richard van Velzen