sort by:
Revision Author Date Message Commit Date
5e60a60 try negating AST_Binary 17 September 2012, 08:16:44 UTC
5d781ec some cleanup 16 September 2012, 15:10:54 UTC
0f418d6 more sequencesizing (WIP) 16 September 2012, 13:29:17 UTC
21c34a1 drop unused function 16 September 2012, 12:46:47 UTC
7b6a402 rewrite handle_if_return optimizations of if/return/continue seem to be even better now 16 September 2012, 12:46:20 UTC
397bf56 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 figure out label targets 15 September 2012, 13:05:17 UTC
86c14d0 join_vars: var XXX; for (var YYY; ...) ==> for (var XXX,YYY; ...) 15 September 2012, 07:54:59 UTC
43fd451 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 minor when unsafe, compress undefined as [][0] 14 September 2012, 16:04:18 UTC
5e83e7e 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 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 added -m and -c options 13 September 2012, 16:45:16 UTC
d72c1d1 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 minor 12 September 2012, 13:29:20 UTC
a132841 more AST_If optimizations 12 September 2012, 13:10:03 UTC
2b1e462 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 fixed run-tests and an issue about reversing the condition in AST_If 12 September 2012, 10:00:13 UTC
9a629ab minor 11 September 2012, 15:37:08 UTC
8e82d8d 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 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 hoist_vars is pretty bad, it seems. cancelled it for now. 10 September 2012, 19:40:18 UTC
6b9aeb5 adaptive base54 digits depending on char frequency (WIP) 10 September 2012, 19:29:18 UTC
a41e6cf more progress on the compressor (WIP) 10 September 2012, 13:37:05 UTC
16b12c6 fix "file" in the source map 10 September 2012, 12:52:53 UTC
1c8ba35 minor 08 September 2012, 19:51:59 UTC
5a8e6ce fix output for division followed by regexp ( v1 report: https://github.com/mishoo/UglifyJS/pull/458 ) 08 September 2012, 12:38:58 UTC
43c75c9 checkpoint 07 September 2012, 15:55:13 UTC
048d690 fix bug (forgot arg name) 07 September 2012, 13:02:08 UTC
919b273 always keep declarations found in unreachable code a few more tests and some cleanups. 07 September 2012, 12:18:32 UTC
b77574e fixed tests (need to drop the toplevel block in "expected" if it's a single statement) 07 September 2012, 08:22:01 UTC
9bb1a84 don't duplicate argument names 05 September 2012, 15:19:30 UTC
0afafe6 declared `--stats` as boolean 05 September 2012, 15:19:24 UTC
c7b484b fix for variable names like `toString` 05 September 2012, 11:31:05 UTC
0503513 support for hoisting declarations and finally it seems we beat v1 in terms of compression 05 September 2012, 10:43:34 UTC
8633b00 cleaned up usage of AST_BlockStatement The following nodes were instances of AST_BlockStatement: AST_Scope, AST_SwitchBlock, AST_SwitchBranch. Also, AST_Try, AST_Catch, AST_Finally were having a body instanceof AST_BlockStatement. Overloading the meaning of AST_BlockStatement this way turned out to be a mess; we now have an AST_Block class that is the base class for things having a block of statements (might or might not be bracketed). The `this.body` of AST_Scope, AST_Try, AST_Catch, AST_Finally is now an array of statements (as they inherit from AST_Block). Avoiding calling superclass's _walk function in walkers (turns out we walked a node multiple times). 05 September 2012, 08:39:43 UTC
1b5183d checkpoint 04 September 2012, 12:36:14 UTC
376667a more fiddling with boolean expressions, etc. optimize away while(false), and transform while(true) ==> for(;;). UNSAFE: some expressions are optimized away when we're in boolean context and can determine that the value will always be true or false. For example: x() || true ==> always `true` in boolean context x() && false ==> always `false` in boolean context It's not technically correct to drop these expressions since we drop the function call too (that might have side effects); on the other hand, I can't see any legitimate use for such expressions and they might simply indicate a bug (we do warn about it). 04 September 2012, 10:20:28 UTC
3459c40 if present, the `else` in an `if` should always be forced statement 04 September 2012, 10:17:13 UTC
86cfb5b boolean and if/exit optimizations 03 September 2012, 20:49:57 UTC
e5f1cec minor 03 September 2012, 20:25:30 UTC
37eecc1 more optimizations for ifs/conditionals (XXX: should add tests before anything else) 03 September 2012, 16:38:45 UTC
f03138d resolve constant expressions 03 September 2012, 12:47:15 UTC
f702264 jumps, try and definitions are statements too 03 September 2012, 09:39:02 UTC
6d0db4c an AST_If is too a StatementWithBody 03 September 2012, 09:11:44 UTC
d7c1dc6 a LabeledStatement should be in fact a StatementWithBody This fixes output for: if (foo) { moo: if (bar) { break moo; } } else { baz(); } (the labeled statement must be outputted inside brackets) 03 September 2012, 09:05:10 UTC
d6efa8b declare boolean options 03 September 2012, 09:03:45 UTC
66c869c switch branches must be declared `required` so that the compressor doesn't replace nodes with a single statement. looks stable for now, though mess begins to sink in. need to review the AST hierarchy. 03 September 2012, 08:05:59 UTC
1bf5928 Reverting "minor perf. improvements" Revert "minor perf. improvements" This reverts commit 24bfd55a22afd791d4a97694641831cfbd27fb14. broke the parser somehow; too early to optimize, let's get the other stuff running. 03 September 2012, 07:26:23 UTC
596af60 add -b 03 September 2012, 07:14:15 UTC
f2f370c add source mappings for more node types; started CLI utility 02 September 2012, 11:32:00 UTC
24bfd55 minor perf. improvements 02 September 2012, 08:11:39 UTC
52bcca2 started support for generating source maps (WIP) plugged in @fitzgen's source-map library 29 August 2012, 16:39:19 UTC
48440dc don't mangle names of setters/getters 29 August 2012, 16:26:48 UTC
6569e66 update with link to discussion about Esprima vs. UglifyJS speed 29 August 2012, 08:18:05 UTC
86cff20 docstring for AST_StatementWithBody 28 August 2012, 12:39:53 UTC
1b6bcca fix output for arrays containing undefined values [1,,2,] ==> [1,,2] instead of [1,undefined,2] 28 August 2012, 12:38:35 UTC
7fcb6bc fix code generator for this case: if (foo) { with (bar) if (baz) x(); } else y(); (the compressor removes the brackets since the consequent consists of a single statement, but the codegen must include the brackets because otherwise the `else` would refer to the inner `if`) 28 August 2012, 12:29:58 UTC
ce8e8d5 added README 27 August 2012, 09:29:53 UTC
bf70205 minor 27 August 2012, 08:48:07 UTC
58a3b5e update (c) years 27 August 2012, 08:01:41 UTC
8dfa9fe minor 27 August 2012, 08:00:26 UTC
4437e7a fix compressing `a,b; return c;` into `return a,b,c;` 27 August 2012, 08:00:22 UTC
a8e49f1 added print_to_string helper method 27 August 2012, 07:59:33 UTC
8d233c3 fix current_col and force a newline every 32K (support options.max_line_len) 23 August 2012, 07:39:33 UTC
95b18e5 added license 22 August 2012, 18:28:59 UTC
159a6f0 wrote more of the compressor and added some tests 22 August 2012, 12:21:58 UTC
f53e139 fix output for certain edge cases the statements if, for, do, while and with might have an AST_EmptyStatement as body; if that's the case, we need to make sure that the semicolon gets in the output. 22 August 2012, 10:20:05 UTC
fb8c9e3 declare some properties in the node constructor so that they're copied in clone 21 August 2012, 21:01:55 UTC
1b839eb hint that brackets may be required in AST_BlockStatement 21 August 2012, 16:16:05 UTC
ffe58a9 cleaned up some mess and started the actual compressor 21 August 2012, 13:14:43 UTC
7ae1c60 some reorganization (moved pretty much everything that relates to scope in scope.js, added a module for NodeJS that can be used with require() and exports everything.) 21 August 2012, 10:53:16 UTC
92bd53b handle labels properly (they can't be handled the same way as variables in a scope) 21 August 2012, 09:45:06 UTC
159333f warn about unreferenced symbols 21 August 2012, 09:07:34 UTC
99456c6 more fixes: - added walker for AST_ObjectProperty - handle redefinitions properly (only mangle one symbol, make them all point to a single definition) DynarchLIB seems to run fine after mangling + compressed output. 21 August 2012, 08:38:49 UTC
458e251 added mangler and other stuff 20 August 2012, 14:32:35 UTC
1fe0ff9 doc (WIP) 19 August 2012, 21:35:54 UTC
6c35135 simple visitor API and code to figure out scope and references 19 August 2012, 12:57:50 UTC
4488758 some fixes (need testing) in AST_If codegen 18 August 2012, 09:29:57 UTC
cd8ae5f minor whitespace issues 17 August 2012, 20:08:09 UTC
ef87c9f big speed improvement (observable when beautify = false) who would have thought that str.charAt(str.length - 1) is not a constant, instant operation? seems to get slower and slower as the string grows. 0.6s vs. 3s 17 August 2012, 16:04:23 UTC
901f770 don't output both space and semicolon when beautify=false 17 August 2012, 15:33:26 UTC
07cbc8d added some comments about the rules governing parens 17 August 2012, 15:06:29 UTC
4fb6021 fix one more glitch 17 August 2012, 13:27:43 UTC
13f7b11 code generator finally seems to work properly 17 August 2012, 12:59:42 UTC
c7c163b lots'o'fixes in the output routines; still a looong way to go. 16 August 2012, 18:36:16 UTC
7f273c3 codegen and dropped the useless walker 16 August 2012, 15:11:04 UTC
c0ba9e2 WIP 15 August 2012, 11:50:27 UTC
861e26a WIP 03 June 2012, 20:10:31 UTC
22bb5e8 added small node test script 27 May 2012, 11:36:51 UTC
46e7507 Fixes some gotchas. DynarchLIB (660K) now passes parsing in 440ms (about 30% slower than the parser in UglifyJS v1). 27 May 2012, 11:36:44 UTC
562b12f init repo 27 May 2012, 11:13:26 UTC
back to top