Mihai Bazon
4c64554808
Turn foo.new into foo["new"] when not --screw-ie8. Fix #534
2014-08-26 10:11:01 +03:00
Mihai Bazon
548beeb6b1
Prevent error for Function(""). Close #538
2014-08-20 09:16:34 +03:00
Ingvar Stepanyan
b467a3c877
Added generative testing for AST conversions.
2014-08-03 20:48:59 +03:00
Ingvar Stepanyan
5e314bf3e9
SpiderMonkey Identifier nodes should contain mangled names.
2014-08-03 01:28:58 +03:00
Ingvar Stepanyan
05ba26c7c8
Small fixes for AST conversion.
2014-08-02 13:18:27 +03:00
Ingvar Stepanyan
87b72364a4
Fixes and improvements for UglifyJS->SM AST conversion.
...
* Explicitly forbidden multiple catch clauses as SM-specific feature.
* Simplified describing of UglifyJS->Mozilla AST conversion rules.
* Moved alias rules to single place.
* Removed usage of dynamic type bindings in generated code (speed-up).
2014-08-01 23:45:37 +03:00
Ingvar Stepanyan
0e3ff1f970
Improved UglifyJS<->SpiderMonkey AST conversions.
...
* Added directives recognition in SM AST.
* Moved semi-standard SM `Property` type to separate handler.
* Added `const` recognition from SM AST.
* Removed redundant `this`-as-identifier recognition.
* Removed redundant rules for abstract SM types.
* Described `CatchClause` using string syntax.
* Added support for semi-standard `range` tuple as location source.
* Added back-conversion support (to be improved).
2014-08-01 23:42:34 +03:00
Mihai Bazon
62bda71c85
Fix parens for AST_Undefined
...
Do the same as for AST_Unary, since we output undefined as `void 0`.
Reported at https://github.com/mishoo/UglifyJS2/issues/338#issuecomment-48858341
2014-07-18 11:31:41 +03:00
Mihai Bazon
ac2caf1088
Check for the case an AST_For's init is an EmptyStatement
...
(lame fix for #503 )
2014-07-01 23:10:44 +03:00
Dan Wolff
8511e80f48
Evaluate "foo".length ==> 3
2014-07-01 11:06:51 +03:00
Mihai Bazon
7bf59b5bcd
Actually, even better. #475
...
- also handle x = + ++y, x = - --y;
- don't use parens, a space suffices.
2014-04-27 21:42:14 +03:00
Mihai Bazon
025f3e9596
Better fix for #475
2014-04-27 20:54:54 +03:00
Mihai Bazon
8258edd8a5
Fix parens in +(+x). Close #475
2014-04-27 20:51:01 +03:00
Mihai Bazon
71652690b6
Merge pull request #445 from ConradIrwin/try-statement
...
Handle TryStatements trees from acorn >=0.2.0
2014-04-24 10:46:53 +03:00
Mihai Bazon
8fbe200012
Always quote property names that contain non-ASCII characters.
...
Fix #328
2014-04-18 10:48:44 +03:00
Arnavion
e2e09d5754
Allow colons in the pairs passed to AST_Toplevel.wrap_enclose
2014-03-22 18:02:21 -07:00
Conrad Irwin
514936beb8
Handle TryStatements trees from acorn >=0.2.0
2014-03-06 17:07:49 -08:00
Arnavion
014f655c5f
Handle the case when SourceMapConsumer.originalPositionFor returns null source.
...
This happens when SourceMapConsumer does not have a valid position to map the input line and column. This is a change in mozilla/source-map starting from version 0.1.33
Fixes #436
2014-03-02 19:20:19 -08:00
Mihai Bazon
bf30dc3038
Mangle name of exception when --screw-ie8. Fix #430 .
...
The effect of not mangling it was visible only with --screw-ie8 (otherwise
the names would be mangled exactly because they leaked into the parent
scope).
2014-02-14 13:58:14 +02:00
Mihai Bazon
ef2ef07cbd
Add option keep_fargs.
...
By default it's `false`. Pass `true` if you need to keep unused function
arguments.
Close #188 .
2014-02-08 12:33:56 +02:00
Matt Basta
ac0086a745
Simplify nested conditionals if possible
2014-02-06 12:39:13 -08:00
Mihai Bazon
5344b7dab8
Fix if_return dropping the alternative. Close #413
2014-01-31 10:44:13 +02:00
Mihai Bazon
e29048b54a
Merge branch 'master' of github.com:mishoo/UglifyJS2
2014-01-26 10:07:10 +02:00
Mihai Bazon
ceb200fe81
Move unescaping regexps under a codegen option (unescape_regexps)
2014-01-26 10:05:55 +02:00
Daniel Stutzman
f5f8239057
Don't unescape \x00 in regexes (it breaks IE8)
2014-01-25 11:55:39 -07:00
Mihai Bazon
931862e97f
More chars that cannot be unescaped in regexps.
2014-01-21 11:44:00 +02:00
Mihai Bazon
1d0127de21
Fix end token for conditionals. Close #404
2014-01-21 10:38:59 +02:00
Ville Lautanala
1e31011874
Don't unescape byte order marks in regexps
2014-01-19 12:27:03 +02:00
Mihai Bazon
4339bd5cfa
Don't unescape \x2f (slash) in regexps. #54
2014-01-18 12:31:50 +02:00
Mihai Bazon
90a330da16
simplify
2014-01-10 10:36:15 +02:00
Mihai Bazon
cad1f9cbd1
Unescape Unicode sequences in regexps when ascii_only is false. #54
2014-01-10 10:33:58 +02:00
Mihai Bazon
c3087dd179
Better process_for_angular before other statement reductions. #395
2014-01-08 11:39:24 +02:00
Mihai Bazon
2c305af478
Support @ngInject with angular compressor option. Close #395 .
2014-01-08 11:28:32 +02:00
Mihai Bazon
2c88eb6fbe
doh.
2014-01-07 12:54:14 +02:00
Mihai Bazon
27142df4f5
minor: exp["10"] => exp[10]
2014-01-07 12:48:21 +02:00
Mihai Bazon
5e4c7f4245
Fix parens for property access -- (foo, bar)["baz"]
2014-01-05 11:48:01 +02:00
Mihai Bazon
b521b4b926
Conditional/call optimization
...
foo ? bar(x) : bar(y) ==> bar(foo ? x : y)
2013-12-29 10:31:30 +02:00
Mihai Bazon
aa9de76370
Mark yield as reserved word. Close #375 .
2013-12-22 20:52:19 +02:00
Mihai Bazon
5a083a938d
Optimize seq,void 0. Close #377 .
...
(x, void 0) => void x
(x, undefined) => void x
2013-12-22 11:36:45 +02:00
Mihai Bazon
7a30d826b8
Better fix for comments in AST_Exit
...
Close #374
2013-12-18 15:54:12 +02:00
Mihai Bazon
be55a09edf
Take out all comments from an AST_Exit's value
...
Fix #372
2013-12-18 13:30:26 +02:00
Mihai Bazon
428e19fed2
Add option to adjust the src/target line in the source map
2013-12-18 12:10:02 +02:00
Mihai Bazon
f65e55dff4
minor
2013-12-16 20:37:09 +02:00
colorhook
fa3300f314
bugfix #242
2013-12-16 15:53:43 +08:00
Mihai Bazon
bd0886a2c0
semicolons
2013-12-10 20:24:27 +02:00
Mihai Bazon
248f304f02
Merge pull request #245 from ForbesLindesay/patch-1
...
Make `DefaultsError` a real `Error` object
2013-12-10 10:23:29 -08:00
Mihai Bazon
dc5f70eab5
Add drop_console option to the compressor
2013-12-10 19:44:41 +02:00
Mihai Bazon
df8c5623af
minor
2013-12-10 19:39:03 +02:00
Mihai Bazon
8f35a363d9
AST_Catch shouldn't really inherit from AST_Scope. Fix #363
...
I hereby acknowledge that figure_out_scope has become a mess.
2013-12-05 13:30:29 +02:00
Mihai Bazon
d2190c2bf3
Properly scope catch identifier when --screw-ie8
...
Fix #344
2013-11-28 16:43:30 +02:00