fe1411b | Mihai Bazon | 05 October 2012, 20:10:52 UTC | fix typo | 05 October 2012, 20:10:52 UTC |
455ac54 | Mihai Bazon | 05 October 2012, 19:59:05 UTC | remove unused code | 05 October 2012, 19:59:05 UTC |
4a2b912 | Mihai Bazon | 05 October 2012, 17:24:56 UTC | minor | 05 October 2012, 17:24:56 UTC |
a1e0885 | Mihai Bazon | 05 October 2012, 13:51:16 UTC | replace `(function(){ ...no side effects ... })()` with `undefined`. | 05 October 2012, 13:51:16 UTC |
7ae0912 | Mihai Bazon | 05 October 2012, 13:17:31 UTC | prevent mangling only when eval is *called*, not when it's just referenced | 05 October 2012, 13:17:31 UTC |
42c25d9 | Mihai Bazon | 05 October 2012, 12:31:41 UTC | add note about installation | 05 October 2012, 12:31:55 UTC |
e88dcc3 | Mihai Bazon | 05 October 2012, 12:22:12 UTC | added --acorn and --spidermonkey options | 05 October 2012, 12:22:12 UTC |
ecd9f21 | Mihai Bazon | 05 October 2012, 12:05:06 UTC | fixed import of locations from SpiderMonkey AST | 05 October 2012, 12:05:06 UTC |
a9b6f99 | Mihai Bazon | 04 October 2012, 14:28:35 UTC | use the appropriate constructor for symbols | 04 October 2012, 14:28:35 UTC |
708ec04 | Mihai Bazon | 04 October 2012, 14:28:09 UTC | minor | 04 October 2012, 14:28:09 UTC |
682a58a | Mihai Bazon | 04 October 2012, 05:49:18 UTC | removed some unused variables | 04 October 2012, 05:49:18 UTC |
f20c251 | Mihai Bazon | 03 October 2012, 18:39:47 UTC | moving code around | 03 October 2012, 18:39:47 UTC |
2bd8a11 | Mihai Bazon | 03 October 2012, 17:03:17 UTC | define AST_Node.from_mozilla_ast(ast) returns an UglifyJS2 AST given a Mozilla AST. Still needs some work to do (need to create specific nodes like AST_SymbolRef, AST_SymbolLambda etc. instead of base AST_Symbol, in order for the mangler/compressor to work properly) | 03 October 2012, 17:03:17 UTC |
42ce7ed | Mihai Bazon | 03 October 2012, 17:01:32 UTC | ignore tmp/ | 03 October 2012, 17:01:32 UTC |
11863d6 | Mihai Bazon | 03 October 2012, 12:52:01 UTC | more cleanup (dropped AST_SwitchBlock) | 03 October 2012, 12:52:31 UTC |
3412498 | Mihai Bazon | 03 October 2012, 12:41:11 UTC | AST cleanup (dropped AST_StatementBase) | 03 October 2012, 12:41:11 UTC |
9221ad6 | Mihai Bazon | 03 October 2012, 10:19:00 UTC | added package.json | 03 October 2012, 10:38:39 UTC |
c11de17 | Mihai Bazon | 03 October 2012, 10:08:03 UTC | added option for side-effect-free statements, fix test | 03 October 2012, 10:08:03 UTC |
e0f5075 | Mihai Bazon | 03 October 2012, 09:49:47 UTC | fix endless loop in tests | 03 October 2012, 09:49:47 UTC |
bd94eeb | Mihai Bazon | 03 October 2012, 09:49:33 UTC | drop tmp. files | 03 October 2012, 09:49:33 UTC |
7e8880b | Mihai Bazon | 03 October 2012, 09:22:59 UTC | document the CLI tool | 03 October 2012, 09:22:59 UTC |
0678ae2 | Mihai Bazon | 03 October 2012, 08:34:05 UTC | fix for `a = !b && !c && !d && !e → a=!(b||c||d||e)` | 03 October 2012, 08:34:05 UTC |
378ed17 | Mihai Bazon | 03 October 2012, 08:27:05 UTC | disable `hoist_vars` by default and change `comparations` to `comparisons` | 03 October 2012, 08:27:05 UTC |
5c151f9 | Mihai Bazon | 02 October 2012, 18:08:16 UTC | fixed usage string | 02 October 2012, 18:08:16 UTC |
815abcf | Mihai Bazon | 02 October 2012, 13:40:42 UTC | support for `--comments` option to keep comments containing @license or @preserve | 02 October 2012, 13:40:42 UTC |
cb2e811 | Mihai Bazon | 02 October 2012, 13:40:01 UTC | discard annoying nodejs warning | 02 October 2012, 13:40:01 UTC |
075f93e | Mihai Bazon | 02 October 2012, 13:39:53 UTC | line numbers start at 1 | 02 October 2012, 13:39:53 UTC |
2a54562 | Mihai Bazon | 02 October 2012, 11:32:30 UTC | added option to keep some comments in the output | 02 October 2012, 11:32:30 UTC |
36be211 | Mihai Bazon | 02 October 2012, 11:02:33 UTC | option to exclude certain names from mangling | 02 October 2012, 11:02:33 UTC |
dde5b22 | Mihai Bazon | 02 October 2012, 10:20:07 UTC | support defines | 02 October 2012, 10:20:07 UTC |
e1098b0 | Mihai Bazon | 02 October 2012, 09:45:31 UTC | "use strict"; | 02 October 2012, 09:45:58 UTC |
2117927 | Mihai Bazon | 02 October 2012, 09:45:17 UTC | more constant folding (for names defined with `const`) | 02 October 2012, 09:45:17 UTC |
347160c | Mihai Bazon | 02 October 2012, 09:22:39 UTC | add AST_SymbolConst for names defined with `const` | 02 October 2012, 09:22:39 UTC |
ff696cd | Mihai Bazon | 02 October 2012, 09:02:33 UTC | drop more unused names | 02 October 2012, 09:02:33 UTC |
9e5dd81 | Mihai Bazon | 02 October 2012, 08:00:47 UTC | a shy attempt to obey `width` in the beautifier; added `bracketize` option to always print brackets around if/do/while/for statements; export more options via the CLI | 02 October 2012, 08:22:38 UTC |
8964444 | Mihai Bazon | 28 September 2012, 08:12:47 UTC | minor | 28 September 2012, 08:12:47 UTC |
05e15b1 | Mihai Bazon | 26 September 2012, 20:54:30 UTC | fix mangling (bug in our code prevented the mangler from using a name that was in use prior to mangling but not after it) | 26 September 2012, 21:01:16 UTC |
13278c6 | Mihai Bazon | 26 September 2012, 16:52:32 UTC | removed the "squeeze" method (it's now effectively "transform") | 26 September 2012, 16:52:32 UTC |
15d58f5 | Mihai Bazon | 26 September 2012, 13:43:14 UTC | some speedup and more savings from unused vars that have side effects in initialization | 26 September 2012, 16:05:49 UTC |
78be8f5 | Mihai Bazon | 26 September 2012, 10:04:54 UTC | compressor successfully moved to TreeTransformer | 26 September 2012, 11:27:01 UTC |
a24e7ee | Mihai Bazon | 26 September 2012, 09:16:16 UTC | checkpoint (refactoring, WIP) | 26 September 2012, 09:16:16 UTC |
e979d01 | Mihai Bazon | 26 September 2012, 08:24:04 UTC | minor | 26 September 2012, 08:24:04 UTC |
242dd10 | Mihai Bazon | 25 September 2012, 15:03:31 UTC | more cleanups | 25 September 2012, 17:39:15 UTC |
9321d41 | Mihai Bazon | 25 September 2012, 12:59:27 UTC | moving code around (refactoring, WIP) | 25 September 2012, 12:59:27 UTC |
10c7f52 | Mihai Bazon | 25 September 2012, 12:30:59 UTC | discard all \uFEFF characters (https://github.com/mishoo/UglifyJS/issues/462) | 25 September 2012, 12:30:59 UTC |
4201577 | Mihai Bazon | 25 September 2012, 12:15:47 UTC | started some refactoring (WIP) -- moving squeezer to TreeTransformer | 25 September 2012, 12:15:47 UTC |
e836e2a | Mihai Bazon | 25 September 2012, 09:48:36 UTC | minor | 25 September 2012, 09:48:36 UTC |
ea6d1ea | Mihai Bazon | 25 September 2012, 07:32:14 UTC | it's not safe to assume that property access is side-effect-free (getters/setters + various browser bugs will trigger side effects; also, an exception is thrown when the expression is undefined) | 25 September 2012, 07:32:14 UTC |
368ac8f | Mihai Bazon | 25 September 2012, 07:31:03 UTC | some boolean cleanup | 25 September 2012, 07:31:03 UTC |
42038fd | Mihai Bazon | 24 September 2012, 14:02:18 UTC | Support input source map This is useful while compressing generated code; for example compressing JS compiled by CoffeeScript (assuming you got a source map): uglifyjs2 --in-source-map generated.js.map \ --source-map uglified.js.map \ -o uglified.js The above assumes you have a "generated.js.map" file which is the source mapping between your CoffeeScript and the generated.js (compiled output from CoffeeScript). The name of the input file is not present in this example; it will be fetched from the source map (but it can be passed manually too). The output will be in "uglified.js" and the output map "uglified.js.map" will actually map to the original CoffeeScript code, rather than to generated.js. | 24 September 2012, 14:02:18 UTC |
4f97da9 | Mihai Bazon | 24 September 2012, 07:27:49 UTC | minor tests fix | 24 September 2012, 07:27:49 UTC |
a83b285 | Mihai Bazon | 23 September 2012, 09:47:34 UTC | properly drop mutually-referring declarations that are not otherwise referenced and have no side effects | 23 September 2012, 09:47:34 UTC |
76d88b5 | Mihai Bazon | 22 September 2012, 10:32:32 UTC | tree transformer api (WIP) | 22 September 2012, 16:41:09 UTC |
ec7f895 | Mihai Bazon | 21 September 2012, 11:38:52 UTC | log filename in parse errors / compressor warnings | 21 September 2012, 11:44:25 UTC |
5491e1d | Mihai Bazon | 21 September 2012, 11:19:05 UTC | better support for multiple input files: - use a single AST_Toplevel node for all files - keep original source filename in the tokens | 21 September 2012, 11:19:05 UTC |
c4f8c21 | Mihai Bazon | 21 September 2012, 08:23:44 UTC | more on detecting side effects | 21 September 2012, 08:23:44 UTC |
e8da72d | Mihai Bazon | 19 September 2012, 09:27:38 UTC | drop unused variables | 19 September 2012, 09:27:38 UTC |
d53e1a9 | Mihai Bazon | 19 September 2012, 07:22:36 UTC | support -c with no arguments to disable compression entirely | 19 September 2012, 07:22:36 UTC |
a4d2340 | Mihai Bazon | 18 September 2012, 16:26:46 UTC | fixed label scope/mangling | 18 September 2012, 16:26:46 UTC |
669874d | Mihai Bazon | 18 September 2012, 11:17:23 UTC | minor | 18 September 2012, 11:17:23 UTC |
3da0ac4 | Mihai Bazon | 18 September 2012, 10:21:09 UTC | support for directives | 18 September 2012, 10:21:09 UTC |
2196828 | Mihai Bazon | 18 September 2012, 07:53:46 UTC | added AST_NaN (output as 0/0) | 18 September 2012, 07:53:46 UTC |
d91613b | Mihai Bazon | 17 September 2012, 17:02:14 UTC | only do the typeof x == "undefined" optimization if x is a symbol reference and it's declared in scope, or x is not a symbol reference. | 17 September 2012, 17:02:57 UTC |
ee669ba | Mihai Bazon | 17 September 2012, 15:49:52 UTC | moved `typeof foo == "undefined"` ==> `foo === undefined` under `--unsafe` because https://github.com/mishoo/UglifyJS2/commit/43fd45154bac89b89330e13bd1f167e2a927a23c#commitcomment-1864505 | 17 September 2012, 15:49:52 UTC |
e370e3b | Mihai Bazon | 17 September 2012, 12:06:06 UTC | fix .undeclared (it's now a function) | 17 September 2012, 12:06:06 UTC |
6ad414e | Mihai Bazon | 17 September 2012, 11:33:36 UTC | minor | 17 September 2012, 11:33:36 UTC |
45a3970 | Mihai Bazon | 17 September 2012, 09:53:52 UTC | one more test for sequences | 17 September 2012, 09:53:52 UTC |
92e22c4 | Mihai Bazon | 17 September 2012, 09:24:21 UTC | possible optimization for AST_Undefined if undefined is defined, ;-), we replace AST_Undefined nodes to a reference to the "undefined" variable; in turn the mangler will compress it to a single letter; this helps at least on jQuery. | 17 September 2012, 09:27:32 UTC |
14481de | Mihai Bazon | 17 September 2012, 09:03:02 UTC | empty block to empty statement: {} ==> ; | 17 September 2012, 09:03:02 UTC |
07f1d56 | Mihai Bazon | 17 September 2012, 08:50:35 UTC | more smallish optimizations | 17 September 2012, 08:50:35 UTC |
5e60a60 | Mihai Bazon | 17 September 2012, 08:16:44 UTC | try negating AST_Binary | 17 September 2012, 08:16:44 UTC |
5d781ec | Mihai Bazon | 16 September 2012, 15:05:15 UTC | some cleanup | 16 September 2012, 15:10:54 UTC |
0f418d6 | Mihai Bazon | 16 September 2012, 13:29:17 UTC | more sequencesizing (WIP) | 16 September 2012, 13:29:17 UTC |
21c34a1 | Mihai Bazon | 16 September 2012, 12:46:47 UTC | drop unused function | 16 September 2012, 12:46:47 UTC |
7b6a402 | Mihai Bazon | 16 September 2012, 12:46:20 UTC | rewrite handle_if_return optimizations of if/return/continue seem to be even better now | 16 September 2012, 12:46:20 UTC |
397bf56 | Mihai Bazon | 15 September 2012, 13:06:09 UTC | other small optimization: if (foo) continue; ...body... ==> if (!foo) { ...body ... } Only when the parent block is the target loop of the `continue` statement. | 15 September 2012, 13:10:35 UTC |
4e0262b | Mihai Bazon | 15 September 2012, 13:05:01 UTC | figure out label targets | 15 September 2012, 13:05:17 UTC |
86c14d0 | Mihai Bazon | 15 September 2012, 07:54:59 UTC | join_vars: var XXX; for (var YYY; ...) ==> for (var XXX,YYY; ...) | 15 September 2012, 07:54:59 UTC |
43fd451 | Mihai Bazon | 14 September 2012, 16:56:59 UTC | compress typeof x == "undefined" to x === undefined, which further gets shortened to x === void 0 (or x === [][0] in unsafe mode) | 14 September 2012, 16:56:59 UTC |
50d1670 | Mihai Bazon | 14 September 2012, 16:04:18 UTC | minor when unsafe, compress undefined as [][0] | 14 September 2012, 16:04:18 UTC |
5e83e7e | Mihai Bazon | 14 September 2012, 13:26:30 UTC | adding an imaginary "return undefined" can sometimes help function f() { if (foo) return x(); if (!bar) return y(); } ==> function f() { return foo ? x() : bar ? void 0 : y(); } | 14 September 2012, 13:26:30 UTC |
924aa58 | Mihai Bazon | 14 September 2012, 12:36:38 UTC | more optimizations that v1 does and some cleanups - a = a + x ==> a+=x - joining consecutive var statements (hoisting is not always desirable) - x == false ==> x == 0, x != true ==> x != 1 - x, x ==> x; x = exp(), x ==> x = exp() - discarding useless break-s | 14 September 2012, 12:36:38 UTC |
93b973c | Mihai Bazon | 13 September 2012, 16:45:16 UTC | added -m and -c options | 13 September 2012, 16:45:16 UTC |
d72c1d1 | Mihai Bazon | 13 September 2012, 12:20:57 UTC | few more optimizations: - do multiple passes in tighten_body if it was changed - transform if (foo) return x; return y; ==> return foo?x:y - don't optimize !0 as true (use best_of after evaluation of constant expr) With hoist_vars off we now beat UglifyJS v1 on jQuery-1.8.1 | 13 September 2012, 12:20:57 UTC |
f5027ec | Mihai Bazon | 12 September 2012, 13:29:20 UTC | minor | 12 September 2012, 13:29:20 UTC |
a132841 | Mihai Bazon | 12 September 2012, 13:10:03 UTC | more AST_If optimizations | 12 September 2012, 13:10:03 UTC |
2b1e462 | Mihai Bazon | 12 September 2012, 10:23:24 UTC | side effect fixes and small optimization for gzip prefer to always use > and >= operators (idea from Closure) | 12 September 2012, 10:41:46 UTC |
2b4093b | Mihai Bazon | 12 September 2012, 10:00:13 UTC | fixed run-tests and an issue about reversing the condition in AST_If | 12 September 2012, 10:00:13 UTC |
9a629ab | Mihai Bazon | 11 September 2012, 15:37:08 UTC | minor | 11 September 2012, 15:37:08 UTC |
8e82d8d | Mihai Bazon | 11 September 2012, 12:42:28 UTC | fixed some mess with symbols/scope - all symbols now have a `thedef` property which is a SymbolDef object, instead of the `uniq` that we had before (pointing to the first occurrence of the name as declaration). - for undeclared symbols we still create a SymbolDef object in the toplevel scope but mark it "undeclared" - we can now call figure_out_scope after squeezing, which is useful in order not to mangle names that were dropped by the squeezer | 11 September 2012, 12:42:28 UTC |
da407d4 | Mihai Bazon | 11 September 2012, 10:15:55 UTC | checkpoint - discard statements with no side effects (unsafe? could be) - safer hoist_vars (needs some revamping of scope/mangling) | 11 September 2012, 10:15:55 UTC |
1579c0f | Mihai Bazon | 10 September 2012, 19:40:18 UTC | hoist_vars is pretty bad, it seems. cancelled it for now. | 10 September 2012, 19:40:18 UTC |
6b9aeb5 | Mihai Bazon | 10 September 2012, 15:25:52 UTC | adaptive base54 digits depending on char frequency (WIP) | 10 September 2012, 19:29:18 UTC |
a41e6cf | Mihai Bazon | 10 September 2012, 12:54:17 UTC | more progress on the compressor (WIP) | 10 September 2012, 13:37:05 UTC |
16b12c6 | Mihai Bazon | 10 September 2012, 12:52:53 UTC | fix "file" in the source map | 10 September 2012, 12:52:53 UTC |
1c8ba35 | Mihai Bazon | 08 September 2012, 14:03:09 UTC | minor | 08 September 2012, 19:51:59 UTC |
5a8e6ce | Mihai Bazon | 08 September 2012, 12:38:58 UTC | fix output for division followed by regexp ( v1 report: https://github.com/mishoo/UglifyJS/pull/458 ) | 08 September 2012, 12:38:58 UTC |
43c75c9 | Mihai Bazon | 07 September 2012, 15:55:13 UTC | checkpoint | 07 September 2012, 15:55:13 UTC |
048d690 | Mihai Bazon | 07 September 2012, 13:02:08 UTC | fix bug (forgot arg name) | 07 September 2012, 13:02:08 UTC |
919b273 | Mihai Bazon | 07 September 2012, 12:18:32 UTC | always keep declarations found in unreachable code a few more tests and some cleanups. | 07 September 2012, 12:18:32 UTC |