Mihai Bazon
1940fb682c
Fix tests
2015-10-12 10:27:00 +03:00
kzc
9f1f21b810
Output -- > instead of --> in expressions. Escape <!-- and --> within string literals.
2015-10-12 10:19:17 +03:00
Richard van Velzen
b14496c742
Merge branch 'master' into harmony
...
Conflicts:
lib/compress.js
2015-10-12 08:54:44 +02:00
kzc
0d952ae43d
add asm.js test
2015-10-07 10:00:28 +02:00
Mihai Bazon
6637c267a5
Fix mozilla-ast after module loading changes
...
Need to explicitly qualify stuff now, since it's not evaluated in some
global scope.
Ref #636
2015-09-24 18:13:21 +03:00
Ville Lautanala
5fd12451f9
Control keeping function arguments with a single option
2015-09-14 19:38:45 +02:00
Richard van Velzen
991fa99655
Merge branch 'master' into harmony
2015-09-13 14:17:45 +02:00
Fábio Santos
3d7f73114d
Add a test to make sure future generations don't hoist lets
2015-09-13 14:15:53 +02:00
Fábio Santos
dde9e293df
parse, output the let statement
2015-09-13 14:15:53 +02:00
Richard van Velzen
34685a6f55
Merge pull request #794 from fabiosantoscode/feature/harmony-template-strings-2
...
Harmony: template strings
2015-09-08 21:23:41 +02:00
Fábio Santos
2fac2bbfe4
Remove unused state variable in_parameters, and also remove unreachable code (try_an_object always returned an object!)
2015-09-05 23:01:29 +01:00
Fábio Santos
242c61be94
prefixed template strings, like "String.rawfoo\nbar".
2015-09-05 22:48:38 +01:00
Fábio Santos
e1cb1a0e3c
Parse and output ES6 template strings. Yikes!
2015-09-05 22:32:57 +01:00
Richard van Velzen
fcde6109b0
Fix bad parsing of new new x()() constructs
...
Fixes #739
2015-08-27 12:29:36 +03:00
Fábio Santos
adee5023c0
What about --mangle-props being on and --mangle being off?
2015-08-25 17:52:51 +01:00
Fábio Santos
dc5db9b6ca
Starting destructuring expressions
2015-08-25 17:49:27 +01:00
Richard van Velzen
e3bd223dac
Don't change sequences that influence lexical binding in calls
...
Fixes #782
2015-08-25 10:53:35 +02:00
Fábio Santos
079aaa0d48
Tolerate expansions in vardefs, too!
2015-08-21 12:04:26 +02:00
Fábio Santos
d4f17f29ae
Destructuring vardef in for..of and for..in
2015-08-21 12:04:26 +02:00
Fábio Santos
025d34bfa2
Add holes in destructuring defs, also make them nestable
2015-08-21 12:04:26 +02:00
Fábio Santos
c44c2d6c21
Parse and compress destructuring VarDefs
2015-08-21 12:04:26 +02:00
Richard van Velzen
35b31bdd4e
Merge branch 'master' into harmony
2015-08-21 11:58:35 +02:00
Richard van Velzen
c8b82583d2
Merge pull request #773 from fabiosantoscode/harmony-typeof-arrows
...
Fix evaluating the typeof an arrow function.
2015-08-21 11:51:42 +02:00
Richard van Velzen
872231a0ca
Merge pull request #775 from fabiosantoscode/feature/binary-literals
...
Parse ES6 number literals, round 2
2015-08-21 11:50:39 +02:00
Fábio Santos
36420183fd
s/binary/number/g
2015-08-17 16:23:43 +01:00
Fábio Santos
a8f8aa518b
Add new-style octal literals and make the B and the O case insensitive.
2015-08-17 11:50:56 +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
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
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
ddd30eeaaa
Uglifyjs already supports super as an implicit global! Just adding a test to indicate that.
2015-08-05 11:49:37 +01: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
f8684f418a
Replace util.puts in run-tests with console.log
...
See d2dda34b2a
2015-07-29 15:24:45 +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
32f76f7ff8
Starting destructuring.
2015-07-29 14:54:45 +02:00
Mihai Bazon
905b601178
Don't attempt to negate non-boolean AST_Binary
...
Fix #751
2015-07-22 16:55:55 +03:00
kzc
9d398d999c
spacing
2015-06-14 17:45:19 -04:00
kzc
fedb6191a1
optimizations for && and || where left side is constant expression
2015-06-11 23:22:38 -04: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
3b14582d6b
Fix tests
2015-04-17 11:28:59 +03:00
Fábio Santos
de58b0289d
Added expect_exact for testing the OutputStream
...
This works almost exactly like `expect`, except that you pass a literal string
of which the result is compared with the generated output.
2015-04-14 20:26:47 +02: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
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
Richard van Velzen
61e850ceb5
Clean up unit test breakage
...
In 992b6b9fcc unit test broke (which I missed). This was due to undeclared variables not being side-effects free.
However, since they're really not side-effect free, just declare them in the test cases.
2015-02-11 21:27:21 +01:00
Richard van Velzen
992b6b9fcc
Fix invalid removal of left side in && and || compression
...
See #637 . This does not produce the optimal result, but it does prevent the removal of non-side-effect-free code.
2015-02-11 21:08:41 +01:00
Richard van Velzen
605362f89d
Drop all console statements properly
...
Because the base reference can be an member expression as well, we have to dig a bit deeper to find the leftmost base reference.
Fixes #451
2015-01-31 13:24:44 +01:00