Fábio Santos
5efbe1604e
A little refactoring. Add a new function to get all symbols in a destructuring.
2016-03-22 11:40:44 +02:00
Fábio Santos
16e928348b
prepare AST_Destructuring for the Ents
2016-03-22 11:40:44 +02:00
Fábio Santos
046e303669
s/binary/number/g
2016-03-22 11:40:44 +02:00
Fábio Santos
ebd0682376
Add new-style octal literals and make the B and the O case insensitive.
2016-03-22 11:40:44 +02:00
Fábio Santos
ac1d3f0e88
remove Symbol's argument when we're unsafe and it's undeclared
2016-03-22 11:40:44 +02:00
Fábio Santos
6f93a8d4a1
Fix evaluating the typeof an arrow function. Using evaluate on used to cause a crash.
2016-03-22 11:40:44 +02:00
Fábio Santos
a4d6ed076a
Parse binary number literals
2016-03-22 11:40:44 +02:00
Fábio Santos
0a4270b358
Super!
2016-03-22 11:40:26 +02:00
Fábio Santos
7f825c8244
expand parameters
...
Conflicts:
test/compress/harmony.js
2016-03-22 11:40:26 +02:00
Fábio Santos
7112c49c92
Uglifyjs already supports super as an implicit global! Just adding a test to indicate that.
2016-03-22 11:40:26 +02:00
Fábio Santos
df95318e8b
=> with destructuring arguments. Requires a lot of parser changes
2016-03-22 11:40:26 +02:00
Fábio Santos
aa127457d5
Adding arrow functions
2016-03-22 11:40:26 +02:00
Fábio Santos
e4b87bface
for...of
2016-03-22 11:39:49 +02:00
Fábio Santos
8ca033e7f2
Add a test to verify that destructuring arguments work with #203 code
2016-03-22 11:39:49 +02:00
Fábio Santos
3f87afdb2c
test that names used in destructurings don't get hoisted
2016-03-22 11:39:49 +02:00
Fábio Santos
708001d2f5
do not support destructuring arguments and ngInject
2016-03-22 11:39:49 +02:00
Fábio Santos
6645da0ea2
remove trace statement
2016-03-22 11:39:49 +02:00
Fábio Santos
aaa8f25bf0
Starting destructuring.
2016-03-22 11:39:49 +02:00
Fábio Santos
6d2f77c180
fix #1003 by removing AST_ObjectSymbol and using AST_ObjectKeyVal for the same effect
2016-03-14 13:42:50 +01:00
Fábio Santos
accca2445f
fix crash: Import statements don't abort
2016-03-14 12:54:05 +01:00
Fábio Santos
0bc4f6edb4
Don't mangle exported symbols
2016-03-14 12:54:05 +01:00
Fábio Santos
ce84a706a3
Implement the export statement
2016-03-14 12:54:05 +01:00
Fábio Santos
86b5248837
Mangling externally imported names by using aliasing
2016-03-14 12:54:05 +01:00
Fábio Santos
59e1601fb8
importing names in the modules, not just default imports
2016-03-14 12:54:05 +01:00
Fábio Santos
d35a9e7839
Importing names from places
2016-03-14 12:54:05 +01:00
Fábio Santos
0465bd270d
Starting out the import statement
2016-03-14 12:54:05 +01:00
philippsimon
ee6c9fabb7
Fix: Uglified Number.prototype functions on big numbers
2016-03-14 12:41:06 +01:00
viclm
6780d0906c
Fix eager parsing of arrow functions for non-punc tokens
2016-03-10 22:18:48 +01:00
kzc
102d1b9137
#877 Ignore mangle sort option
2016-02-27 15:33:10 -05:00
Mihai Bazon
294861ba96
v2.6.2
2016-02-22 21:39:14 +02:00
kzc
11b0efdf84
boolean_expression ? true : false --> boolean_expression
2016-02-22 17:59:36 +01:00
kzc
5486b68850
Take operator || precendence into account for AST_If optimization.
...
Fixes #979 .
2016-02-21 12:05:02 -05:00
Richard van Velzen
bdd8e34f63
Allow --no-* options to disable their respective parameter
...
Fixes #974 and #972
2016-02-17 20:04:45 +01:00
alexlamsl
6547437725
preserve ThisBinding for side_effects
2016-02-17 19:34:01 +01:00
Richard van Velzen
9662228f6a
Don't compress (0, eval)() to eval()
2016-02-16 19:00:48 +01:00
alexlamsl
31a9b05c96
Preserve ThisBinding in conditionals & collapse_vars
...
Fixes #973
2016-02-16 18:47:49 +01:00
Richard van Velzen
63b01fe8f9
Merge pull request #948 from kzc/collapse_vars_doc
...
collapse_vars: document the compress option in README
2016-02-11 22:13:30 +01:00
sergeyv
7a4ed9d200
Revert "using the original sourcemap as the base"
...
This reverts commit ad18689d92 .
Reason for revert: introduce issue #882
Currently, generated sourcemap contains copy of all existing mappings and adds new mappings from uglified code to original one.
However, previous mapping are no longer valid and shouldn't be added.
2016-02-10 10:19:39 +01:00
Darío Javier Cravero
0b303379c0
fix: don't fail if definition is undefined
...
Running `uglifyjs --verbose --compress --mangle --screw-ie8 class.js`
with
`class.js`:
```
class Foo {
bar() {
}
}
```
Fails with:
```
undefined:4041
return this.definition().unmangleable(options);
TypeError: Cannot read property 'unmangleable' of undefined
...
```
2016-02-10 10:17:32 +01:00
Richard van Velzen
d5c651a5e5
Allow cli options to be specified in separate definitions
...
Fix for #963 . This allows stuff like `--define a=1 --define b=1` besides only `--define a=1,b=1`
2016-02-10 10:14:46 +01:00
Fábio Santos
d7ec2ecc12
Fix #931 : Create arrow functions in maybe_assign so that they can be used in assignments
2016-02-09 00:02:23 +00:00
Martii
cdba43cfa4
Create and map bare-returns into new parse property name
2016-02-08 10:45:42 +01:00
Boris Letocha
a123e232b9
Fixes #951 missing export for SymbolDef
2016-01-31 21:41:38 +01:00
Mihai Bazon
601780acc1
Merge pull request #949 from kzc/collapse_vars_conditions
...
collapse_vars: fix if/else and ternary operator side effects
2016-01-29 18:05:39 +02:00
kzc
7c3fee9e31
collapse_vars: avoid replacement across AST_Case nodes to be on safe side even though no issues seen.
2016-01-29 10:35:07 -05:00
kzc
929de2b0de
collapse_vars: fix if/else and ternary operator side effects
2016-01-28 12:17:06 -05:00
kzc
12e6ad326c
collapse_vars: small change to README
2016-01-28 11:04:30 -05:00
kzc
00c8d1d241
collapse_vars: document option in README
2016-01-28 11:01:17 -05:00
kzc
af2472d85e
collapse_vars: fix bug in repeated var defs of same name
2016-01-28 16:48:50 +01:00
Bryan Rayner
3eb9101918
Add mangleProperties documentation to README
...
Add additional documentation to mangleProperties.
2016-01-27 14:24:32 -06:00