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
viclm
6780d0906c
Fix eager parsing of arrow functions for non-punc tokens
2016-03-10 22:18:48 +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
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
Richard van Velzen
2827fa8699
Merge branch 'harmony' of github.com:mishoo/UglifyJS2 into harmony
2016-01-19 19:22:35 +01:00
Richard van Velzen
c80ec625ec
Add test for bad template string parsing
2016-01-19 19:22:22 +01:00
Fugiman
5e78f20f1c
Remove duplicate error message
2016-01-19 19:22:22 +01:00
Fugiman
1f75232062
Fix template string parsing
2016-01-19 19:22:22 +01:00
Fábio Santos
028ff64e9a
Default values inside destructurings
2016-01-19 19:22:22 +01:00
Fábio Santos
7a8cffd631
Move the idea of a symbol having a default value up the class chain.
2016-01-19 19:22:22 +01:00
Fábio Santos
5b553aafe2
Destructuring parameters with defaults. function x({ foo, bar } = {}) { }
2016-01-19 19:22:22 +01:00
Fábio Santos
084437bc6d
Non-destructuring default parameters
2016-01-19 19:22:22 +01:00
Richard van Velzen
1cd9a2df9a
Merge pull request #872 from fabiosantoscode/feature/harmony-defaults
...
Feature/harmony defaults
2016-01-05 21:39:23 +01:00
Richard van Velzen
7f3dbb6df7
Merge branch 'master' into harmony
2015-12-26 17:59:38 +01:00
Anthony Van de Gejuchte
174404c0f3
Do not allow newlines in string literals
2015-12-26 15:08:37 +01:00
Richard van Velzen
60c4030a4d
Merge pull request #874 from kzc/fix-conditionals
...
#873 Fix `conditionals` optimizations with default compress options
2015-12-26 14:28:33 +01:00
Richard van Velzen
ac810dc07a
Merge pull request #896 from avdg/do-while-semicolon
...
Semicolon after do...while statement is optional
2015-12-26 14:26:22 +01:00
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
Richard van Velzen
e4d73d8b7c
Merge pull request #870 from fabiosantoscode/feature/harmony-class
...
Harmony: classes
2015-12-07 18:59:07 +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
Fábio Santos
8220dbbea0
Default values inside destructurings
2015-11-22 19:04:42 +00:00
Fábio Santos
59e999597e
Move the idea of a symbol having a default value up the class chain.
2015-11-22 19:00:54 +00:00
Fábio Santos
cbcb3ac44e
Destructuring parameters with defaults. function x({ foo, bar } = {}) { }
2015-11-22 18:02:51 +00:00
Fábio Santos
f07ab4666f
Non-destructuring default parameters
2015-11-22 17:40:05 +00:00
Fábio Santos
a800356ad0
Implement new.target
2015-11-21 14:48:23 +00:00
Fábio Santos
e076abdbf2
Mangle class names correctly
2015-11-21 13:59:18 +00:00
Fábio Santos
425613b0d2
mangle class names
2015-11-21 12:20:20 +00:00
Fábio Santos
69da8e53e0
Separate class expressions from class declarations and their symbols like defuns
2015-11-21 09:17:32 +00:00
Fábio Santos
bb6b3a773a
Make AST_Class inherit AST_Scope instead of AST_Object
...
This is one of those days I'd love to use multiple inheritance.
An AST_Class has lots of common with AST_Object, but unfortunately
`instanceof AST_Scope` is used very, very much, and a class has its name
inside its own special pocket scope. This compels me to make AST_Class
inherit Scope instead.
It looks like, although there is much in common with AST_Object,
`instanceof AST_Object` seldom are made, perhaps because it is less
often necessary to traverse an object than a scope.
2015-11-20 19:34:10 +00:00
Fábio Santos
364d20f8fb
Add mangle = { ...mangleopts } option to tests.
2015-11-20 18:11:17 +00: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