Anthony Van de Gejuchte
0cabedc526
Disable loop optimization for parse-only tests
2015-12-18 19:20:56 +01:00
Anthony Van de Gejuchte
5cd26c005b
Add tests
2015-12-18 14:39:48 +01:00
Anthony Van de Gejuchte
bd99b00413
Semicolon after do...while statement is optional
2015-12-17 23:02:35 +01:00
Richard van Velzen
9e2f9f7910
Merge pull request #879 from ReadmeCritic/master
...
Update README URLs based on HTTP redirects
2015-12-07 19:04:56 +01:00
ReadmeCritic
e87c77ed41
Update README URLs based on HTTP redirects
2015-11-27 08:46:55 -08:00
kzc
774bda13cd
#873 Fix conditionals optimizations with default compress options
2015-11-24 13:27:50 -05:00
Mihai Bazon
15b5f70338
v2.6.1
v2.6.1
2015-11-16 12:10:47 +02:00
Mihai Bazon
7f48d5b33c
Fix endless loop
...
Close #866
2015-11-16 12:08:24 +02:00
Mihai Bazon
b6968b6bd2
Limit max iterations for tighten_body
...
Ref #866
2015-11-16 12:08:24 +02:00
Richard van Velzen
08b80302eb
Merge pull request #864 from plievone/patch-1
...
Fix docs for keep_fargs
2015-11-14 12:04:49 +01:00
plievone
645626ebe8
Fix docs for keep_fargs
...
Compression options `keep_fargs` and `unsafe` were decoupled in v.2.5.0 (commit 5fd1245 ), so document actual keep_fargs default.
2015-11-14 11:38:00 +02:00
Mihai Bazon
d895c09c70
v2.6.0
v2.6.0
2015-11-12 12:46:28 +02:00
Mihai Bazon
08623aa6a7
Fix output for "use asm" code from SpiderMonkey AST
...
(will only work properly if the SM tree contains "raw" properties for
Literal number nodes)
2015-11-12 12:18:25 +02:00
Mihai Bazon
c898a26117
Build label def/refs info when figuring out scope
...
Fix #862
2015-11-12 11:48:06 +02:00
Mihai Bazon
619adb0308
Replace util.error with console.log
2015-11-12 11:47:37 +02:00
Mihai Bazon
7691bebea5
Rework has_directive
...
It's now available during tree walking, i.e. walker.has_directive("use
asm"), rather than as part of the scope. It's thus no longer necessary
to call `figure_out_scope` before codegen. Added special bits in the
code generator to overcome the fact that it doesn't inherit from
TreeWalker.
Fix #861
2015-11-11 22:15:25 +02:00
Mihai Bazon
3c4346728e
Merge pull request #854 from kzc/moz-regexp-2
...
Have mozilla AST RegExpLiteral parser use regex.pattern and regex.flags
2015-11-10 10:12:30 +02:00
Mihai Bazon
18d37ac761
Fix parsing invalid input
...
i.e. `x = 1.xe` — because parseFloat("1.xe") returns 1, this parsed as
`x = 1`.
Ref #857
2015-11-09 13:15:20 +02:00
Richard van Velzen
63d35f8f6d
Prevent ReDoS by not using a regexp to verify floating point numbers
...
`parseFloat` will return `NaN` for invalid numbers anyway, which is the check used to throw the parse error.
Fixes #857
2015-11-09 11:28:27 +01:00
kzc
7dbe961b2d
simplify mozilla AST RegExpLiteral token parse and handle corner cases of regex.pattern better
2015-11-02 13:10:37 -05:00
kzc
94c4daaf9e
Have mozilla AST RegExpLiteral parser use regex.pattern and regex.flags rather than non-standard raw property.
2015-11-02 12:24:09 -05:00
kzc
37ee9de902
rename To_Moz_Literal to To_Moz_RegExp
2015-11-01 10:20:42 -05:00
kzc
83db98ad3b
Fixed RegExp literal in mozilla AST generation/output and added a --dump-spidermonkey-ast flag
2015-11-01 01:02:52 -04:00
kzc
bd0ae6569f
return undefined optimization no longer uses return_void_0 option
2015-10-29 08:19:12 +01:00
kzc
841a661071
more tests for return undefined optimization
2015-10-29 08:19:12 +01:00
kzc
7491d07666
optimize return undefined and return void 0
2015-10-29 08:19:12 +01:00
Richard van Velzen
335e349314
Allow specification beautify options in tests
...
Caught an error in #847 as well - `output` wasn't passed anywhere which led to an exception. `options` was available though.
2015-10-28 20:50:01 +01:00
Richard van Velzen
2a88d07b3a
Stop building for io.js
2015-10-28 20:36:03 +01:00
Michael Ficarra
a887cde9f2
fixes #845 : \v escaping should be restricted to "screw_ie8" mode
2015-10-27 09:05:21 -07:00
Fábio Santos
b5623b19d4
Fix #836
2015-10-20 19:48:56 +01:00
startswithaj
6b2861e086
Make_string was missing \v and wasnt reversing vertical tabs even though read_escaped_char coverts them
2015-10-15 17:42:16 +10:00
Damian Krzeminski
d5138f7467
add --pure-funcs option
...
it has the same effect as specifying `pure_funcs` in `--compressor`
option, however it's much easier to use
instead of:
--compressor 'pure_func=["Math.floor","debug","console.logTime"]'
it's now possible:
--compressor --pure-funcs Math.floor debug console.logTime
fixes #684
2015-10-13 21:24:14 -04:00
Damian Krzeminski
eac67b2816
upgrade yargs 3.5.4 -> 3.10.0
...
we need a version with better support for 'array' params
see: https://github.com/bcoe/yargs/pull/164
2015-10-13 21:01:36 -04:00
Mihai Bazon
ce10072824
Merge pull request #829 from kzc/html_comment_ops
...
Fix other operator output producing <!-- or -->
2015-10-13 09:59:40 +03:00
kzc
dff54a6552
Fix other operator output related to <!-- or -->
2015-10-13 01:17:10 -04:00
Mihai Bazon
1940fb682c
Fix tests
2015-10-12 10:27:00 +03:00
Mihai Bazon
17eef5a3c2
Only encode <!-- and --> in strings when inline_script
2015-10-12 10:21:22 +03:00
kzc
9f1f21b810
Output -- > instead of --> in expressions. Escape <!-- and --> within string literals.
2015-10-12 10:19:17 +03:00
Mihai Bazon
a8e67d157e
v2.5.0
v2.5.0
2015-10-11 18:24:38 +03:00
kzc
e870c7db45
have minify() call figure_out_scope() if needed to produce well formed "use asm" code
2015-10-07 16:31:57 -04:00
kzc
6500f8c52c
get rid of SCOPE_IS_NEEDED as it was always true
2015-10-07 15:33:24 -04:00
kzc
4d2f7d83af
Fix handling of "use asm" when no command line flags are passed to uglifyjs. SCOPE_IS_NEEDED is unconditionally true now. Refactored floating point literal parsing to be more in keeping with the AST class design.
2015-10-07 13:10:53 -04:00
SpainTrain
99945fcd04
Pin dependencies with npm shrinkwrap
...
* Use `npm run shrinkwrap` to create a shrinkwrap file with all dependencies pinned
* Update dependency `source-map` to latest (Closes #738 )
2015-10-07 13:52:49 +02:00
kzc
0d952ae43d
add asm.js test
2015-10-07 10:00:28 +02:00
kzc
593677d2ff
Add proper support for "use asm"; blocks. Disable -c optimization within "use asm"; sections and preserve floating point literals in their original form. Non-asm.js sections are optimized as before. Asm.js sections can still be mangled and minified of whitespace. No special command line flags are required.
2015-10-07 10:00:28 +02:00
Anthony Van de Gejuchte
c69294c449
Implement shebang support
2015-10-06 22:35:45 +02:00
Mihai Bazon
2a06c7758e
Merge pull request #808 from avdg/travis
...
Add node 4.x in Travis
2015-09-24 19:27:54 +03:00
Anthony Van de Gejuchte
7ee1ec91a2
Add node 4.x in Travis
2015-09-24 17:41:52 +02:00
Mihai Bazon
233fb62bd8
Disable node 0.8 in Travis
2015-09-24 18:26:23 +03: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