Fábio Santos
5f7cb6939c
Starting ES6 classes
2015-10-27 12:24:37 +00:00
Fábio Santos
34213ea2f8
Create a new symbol for methods' names
2015-10-27 09:31:16 +01:00
Fábio Santos
0d8dea9538
start concise methods
2015-10-27 09:31:16 +01:00
Fábio Santos
b31918bbf0
computed properties
2015-10-12 21:38:20 +01:00
Richard van Velzen
b14496c742
Merge branch 'master' into harmony
...
Conflicts:
lib/compress.js
2015-10-12 08:54:44 +02: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
Mihai Bazon
99233c44cc
No longer use vm to load code.
...
Improves performance 2x on node > 0.10.
Ref #636
2015-09-24 17:58:51 +03:00
Mihai Bazon
33528002b4
Fix wrap_commonjs to include code first
...
(code could have directives, i.e. "use strict")
2015-09-24 17:58:51 +03:00
Fábio Santos
dde9e293df
parse, output the let statement
2015-09-13 14:15:53 +02: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
Fábio Santos
079aaa0d48
Tolerate expansions in vardefs, too!
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
Fábio Santos
824ecfb8a2
A little refactoring. Add a new function to get all symbols in a destructuring.
2015-08-21 12:04:26 +02: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
Fábio Santos
e80ed38772
Super!
2015-08-07 02:44:53 +01:00
Fábio Santos
9863f0efa3
expand parameters
...
Conflicts:
test/compress/harmony.js
2015-08-05 21:15:23 +02: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
Fábio Santos
9d7d365c2b
for...of
2015-07-29 15:10:54 +02:00
Fábio Santos
f7460166dd
remove trace statement
2015-07-29 14:54:45 +02:00
Fábio Santos
32f76f7ff8
Starting destructuring.
2015-07-29 14:54:45 +02:00
Mihai Bazon
fbbaa42ee5
Add option to preserve/enforce string quote style
...
`-q 0` (default) use single or double quotes such as to minimize the number of
bytes (prefers double quotes when both will do); this is the previous
behavior.
`-q 1` -- always use single quotes
`-q 2` -- always use double quotes
`-q 3` or just `-q` -- always use the original quotes.
Related codegen option: `quote_style`.
Close #495
Close #460
Some `yargs` guru please tell me why `uglifyjs --help` doesn't display the
help string for `-q` / `--quotes`, and why it doesn't output the expected
argument types anymore, like good old `optimist` did.
2015-01-27 22:26:27 +02:00
Ingvar Stepanyan
ae5366a31d
Track ending lines/columns; fix end locations in Mozilla AST.
2015-01-06 11:32:41 +01:00
Mihai Bazon
6b23cbc852
AST_Do nodes: walk body before condition
2015-01-06 12:29:07 +02:00
Arnavion
e2e09d5754
Allow colons in the pairs passed to AST_Toplevel.wrap_enclose
2014-03-22 18:02:21 -07: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
Mihai Bazon
c5ed2292bf
Fix parsing setters/getters (allow keywords for name).
...
The "key" property was always "set" or "get", which didn't make much sense.
Now it'll be the actual name of the setter/getter (AST_Node), and the
AST_Accessor object itself, which represents the function, won't store any
name.
Close #319
2013-10-30 11:50:22 +02:00
Mihai Bazon
cb9d16fbe4
minor
2013-09-06 09:52:56 +03:00
Mihai Bazon
5d8da864c5
Fix names.
2013-09-02 19:38:00 +03:00
Mihai Bazon
85b527ba3d
Disallow continue referring to a non-IterationStatement. Fix #287
...
Simplifies handling of labels (their definition/references can be easily
figured out at parse time, no need to do it in `figure_out_scope`).
2013-09-02 19:36:16 +03:00
Mihai Bazon
02a84385a0
Don't swap binary ops when "use asm" is in effect.
...
Refs #167
2013-06-07 12:52:09 +03:00
Jake Harding
478bf4dbdd
Add support for enclose option. Closes #139 .
2013-03-24 11:11:23 +02:00
David Glasser
1529ab965a
Fix output for arrays containing undefined values.
...
1b6bcca7 was a first attempt at this. That commit made Uglify stop replacing
holes with undefined, but instead it started replacing undefined with
holes. This is slightly problematic, because there is a difference between a
hole and an undefined value. More problematically, it changed [1,undefined] to
[1,] which generally doesn't even parse as a hole (just as a trailing comma), so
it didn't even preserve the length of the array!
Instead, parse holes as their own special AST node which prints invisibly.
2013-01-17 11:36:10 +02:00
Mihai Bazon
13c4dfcabd
fix #55
2012-11-24 10:02:08 +02:00
Mihai Bazon
1e5e13ed81
AST_LabelRef no longer inherits from AST_SymbolRef
2012-11-08 15:39:14 +02:00
Mihai Bazon
5276a4a873
add AST_Accessor and AST_SymbolAccessor node types
...
AST_Accessor will represent the function for a setter or getter. Since they
are not mangleable, and they should not introduce a name in scope, we have a
new node for their name (AST_SymbolAccessor) which doesn't inherit from
AST_SymbolDeclaration.
fix #37
2012-11-07 12:43:27 +02:00
Mihai Bazon
30faaf13ed
more sequence optimizations (lift some sequences above binary/unary expressions so that we can avoid parens)
2012-10-22 11:58:06 +03:00
Mihai Bazon
afb7faa6fa
more optimizations for some break/continue cases
2012-10-18 15:14:57 +03:00
Mihai Bazon
1b6f8d463f
remove the $self hack
...
operations are destructive anyway, so there's no point to clone the nodes in
the transformer. speed++
2012-10-12 11:07:35 +03:00
Mihai Bazon
72cb5328ee
fix in_boolean_context() (two tests were broken)
2012-10-12 10:49:41 +03:00
Mihai Bazon
172aa7a93c
cleanup
...
- use prototype-less objects where feasible (minor speed improvement)
- get rid of HOP
2012-10-11 11:07:42 +03:00
Mihai Bazon
9cdaed9860
fix node name
2012-10-10 23:16:40 +03:00
Mihai Bazon
dacce1b1fa
seems cleaner if AST_Label doesn't inherit from AST_SymbolDeclaration
2012-10-10 11:37:51 +03:00
Mihai Bazon
f26f3b44bc
small improvements in wrap_commonjs:
...
- use MAP.splice instead of a BlockStatement to inject code (avoids some
warnings in the linter)
- use the original symbol in exports, so that we get the proper source mapping
2012-10-10 11:28:05 +03:00
Mihai Bazon
a84d07e312
add AST_Infinity node
2012-10-09 18:35:53 +03:00
Mihai Bazon
1b0aab2ce9
added $propdoc to AST nodes and some cleanups
...
hopefully we can make the AST documentation self-generating
2012-10-09 18:20:39 +03:00
Mihai Bazon
9ead49641d
minor AST cleanup (AST_BlockStatement may inherit from AST_Block)
2012-10-09 13:59:17 +03:00
Mihai Bazon
e1862cd36f
add --ast-help
...
displays a rather cruel description of the AST classes, derived
directly from the node definitions.
2012-10-09 13:21:21 +03:00