Fábio Santos
4c12cccff9
remove Symbol's argument when we're unsafe and it's undeclared
2015-08-14 22:44:16 +01:00
Fábio Santos
dcce4e5c66
Fix evaluating the typeof an arrow function. Using evaluate on used to cause a crash.
2015-08-14 22:05:42 +01:00
Richard van Velzen
56c0b834d6
Merge pull request #771 from fabiosantoscode/feature/binary-literals
...
Parse binary number literals
2015-08-14 14:59:55 +02:00
Fábio Santos
6f864402d3
Parse binary number literals
2015-08-14 03:24:54 +01:00
Christopher Chedeau
3ff0b9e0c9
[Fix] --define replaces SymbolRefs in LHS of assignments
...
See #208 for context
2015-08-10 11:22:36 -07:00
Richard van Velzen
8909e9e1cb
Merge pull request #763 from fabiosantoscode/feature/harmony-super
...
Feature/harmony super
2015-08-07 08:54:20 +02:00
Fábio Santos
e80ed38772
Super!
2015-08-07 02:44:53 +01:00
Richard van Velzen
759b3f7d6d
Fix mangling of property names which overwrite unmangleable properties
...
Fixes #747 .
2015-08-05 21:18:39 +02:00
Fábio Santos
9863f0efa3
expand parameters
...
Conflicts:
test/compress/harmony.js
2015-08-05 21:15:23 +02:00
Richard van Velzen
e8664e63ef
Merge branch 'master' into harmony
2015-08-05 21:13:11 +02:00
Fábio Santos
a68953c491
=> with destructuring arguments. Requires a lot of parser changes
2015-08-04 00:57:53 +01:00
Fábio Santos
fa5c4f2d03
Adding arrow functions
2015-08-04 00:57:53 +01:00
Richard van Velzen
66761d7ecf
Fix semicolon printing when restricting max line length
...
Fixes #755
2015-07-30 16:13:32 +02:00
Fábio Santos
9d7d365c2b
for...of
2015-07-29 15:10:54 +02:00
Chris Cowan
9854deb626
Re-use the caught exception's error message in the parse error call.
2015-07-29 15:06:52 +02:00
Chris Cowan
d6814050dd
Give a good error message if an invalid regular expression is found.
2015-07-29 15:05:59 +02:00
Fábio Santos
ad344c5be3
Add a test to verify that destructuring arguments work with #203 code
2015-07-29 14:54:45 +02:00
Fábio Santos
96b89e34a3
test that names used in destructurings don't get hoisted
2015-07-29 14:54:45 +02:00
Fábio Santos
4644becb9b
do not support destructuring arguments and ngInject
2015-07-29 14:54:45 +02:00
Fábio Santos
f7460166dd
remove trace statement
2015-07-29 14:54:45 +02:00
Fábio Santos
32f76f7ff8
Starting destructuring.
2015-07-29 14:54:45 +02:00
thorn0
252fc65558
Advanced way to specify if a function call might have side effects. #400
2015-07-29 14:36:42 +02:00
Mihai Bazon
905b601178
Don't attempt to negate non-boolean AST_Binary
...
Fix #751
2015-07-22 16:55:55 +03:00
Mihai Bazon
63fb2d5a44
Merge pull request #735 from kzc/master
...
optimizations for && and || where left side is constant expression
2015-07-20 09:58:01 +03:00
Mihai Bazon
85a5fc0aeb
Don't drop parens in a * (b * c). Close #744
2015-06-30 10:10:29 +03:00
kzc
f47b2b52a5
operator && and || optimization: add "else" before "if" as intended
2015-06-14 17:44:26 -04:00
kzc
fedb6191a1
optimizations for && and || where left side is constant expression
2015-06-11 23:22:38 -04:00
Joao Carlos
0ac6918a41
Add --mangle-regex option
2015-06-09 14:16:50 +03:00
Mihai Bazon
bce4307e9e
Treat \uFEFF as whitespace.
...
Fix #714
2015-05-20 16:17:46 +03:00
Mihai Bazon
a5b60217ce
Fix compressing conditionals
...
Only transform foo() ? EXP(x) : EXP(y) into EXP(foo() ? x : y) if EXP has no
side effects.
Fix #710
2015-05-18 13:56:04 +03:00
Mihai Bazon
44fd6694eb
fix again reserved props
2015-05-13 22:03:00 +03:00
Mihai Bazon
e48db3a8b6
Make reserved names take priority over the name cache
2015-05-07 15:01:16 +03:00
Mihai Bazon
e637bdaf4e
Only drop the BOM when it's the first character.
...
Close #704
2015-05-05 10:11:38 +03:00
Mihai Bazon
4aed0830e5
Fix blank lines in the output.
...
The issue was more obvious when max_line_len has a small value, rather than
the default 32K characters. A blank line showed up after most statements.
2015-05-04 17:55:42 +03:00
Mihai Bazon
c3a10c135e
Avoid spurious brackets when dropping unused vars
...
Fix #702
2015-05-04 14:49:17 +03:00
Mihai Bazon
92e4340732
Fix parsing strings with literal DOS newlines
...
(should not set newline_before)
Fix #693
2015-04-23 12:08:19 +03:00
Mihai Bazon
7b22f2031f
If name_cache is specified, do rename cached properties
...
(even if --mangle-props is not there)
2015-04-22 17:34:49 +03:00
Mihai Bazon
274e1b3dc7
Drop NaN -> 0/0 transformation.
...
Fix #687
2015-04-17 11:26:36 +03:00
Mihai Bazon
18c63ff3d8
Fix compression of conditionals
...
Don't move the condition on the right side of an assignment when
the left side may have side effects.
Fix #677
2015-04-13 17:29:48 +03:00
Mihai Bazon
e04ef56243
Use the before visitor in mangle props
...
(works around a bug in our tree walker which, while cloning nodes, breaks
references between labeled statements and break/continue labels)
2015-04-10 11:33:29 +03:00
Mihai Bazon
a79ff060d0
Merge branch 'propmangle'
2015-03-29 12:50:43 +03:00
Mihai Bazon
276b9a31cd
Fix compressing ![foo()]; as a statement
...
need to check whether the literal has any side effects before replacing that
with `false`.
2015-03-23 23:27:00 +02:00
Mihai Bazon
5801fa39e9
[sequencesize] Actually even better:
...
do create the sequence even if the stat list is bigger than 2000 statements,
but limit the sequence itself to 2000 expressions.
Ref #414
2015-03-22 13:02:45 +02:00
Mihai Bazon
f0ab1b02e6
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
2015-03-22 12:51:15 +02:00
Mihai Bazon
36c28e02fd
Add start/end nodes for NaN/Infinity transformations
2015-03-22 12:50:36 +02:00
Mihai Bazon
ecfd881ac6
Keep unused function arguments by default
...
Discarding unused function arguments affects function.length, which can lead
to some hard to debug issues. This optimization is now done only in "unsafe
mode".
Fix #121
2015-03-20 10:28:51 +02:00
Mihai Bazon
80d1c8206b
Fix parsing for U+2028 / U+2029
...
(they should be treated as whitespace)
2015-03-18 10:11:37 +02:00
Mihai Bazon
d36faffeca
Fix parsing for U+2028 / U+2029
...
(they should be treated as whitespace)
2015-03-18 10:09:30 +02:00
Mihai Bazon
aa45f6586e
rename --prop-cache to --name-cache
...
... and support storing there variable names as well, to help with multiple
invocations when mangling toplevel.
2015-03-16 13:16:30 +02:00
Mihai Bazon
0c80d21e01
Fix prop mangling
...
Even if not “defined”, do mangle if name exists in the cache.
2015-03-16 10:53:31 +02:00