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 |
b77574e | Mihai Bazon | 07 September 2012, 08:22:01 UTC | fixed tests (need to drop the toplevel block in "expected" if it's a single statement) | 07 September 2012, 08:22:01 UTC |
9bb1a84 | Mihai Bazon | 05 September 2012, 15:19:30 UTC | don't duplicate argument names | 05 September 2012, 15:19:30 UTC |
0afafe6 | Mihai Bazon | 05 September 2012, 15:19:24 UTC | declared `--stats` as boolean | 05 September 2012, 15:19:24 UTC |
c7b484b | Mihai Bazon | 05 September 2012, 11:31:05 UTC | fix for variable names like `toString` | 05 September 2012, 11:31:05 UTC |
0503513 | Mihai Bazon | 05 September 2012, 10:43:34 UTC | support for hoisting declarations and finally it seems we beat v1 in terms of compression | 05 September 2012, 10:43:34 UTC |
8633b00 | Mihai Bazon | 05 September 2012, 08:31:02 UTC | 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 | Mihai Bazon | 04 September 2012, 12:36:14 UTC | checkpoint | 04 September 2012, 12:36:14 UTC |
376667a | Mihai Bazon | 04 September 2012, 10:20:28 UTC | 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 | Mihai Bazon | 04 September 2012, 10:17:13 UTC | if present, the `else` in an `if` should always be forced statement | 04 September 2012, 10:17:13 UTC |
86cfb5b | Mihai Bazon | 03 September 2012, 20:49:57 UTC | boolean and if/exit optimizations | 03 September 2012, 20:49:57 UTC |
e5f1cec | Mihai Bazon | 03 September 2012, 16:43:46 UTC | minor | 03 September 2012, 20:25:30 UTC |
37eecc1 | Mihai Bazon | 03 September 2012, 16:38:45 UTC | more optimizations for ifs/conditionals (XXX: should add tests before anything else) | 03 September 2012, 16:38:45 UTC |
f03138d | Mihai Bazon | 03 September 2012, 12:47:15 UTC | resolve constant expressions | 03 September 2012, 12:47:15 UTC |
f702264 | Mihai Bazon | 03 September 2012, 09:39:02 UTC | jumps, try and definitions are statements too | 03 September 2012, 09:39:02 UTC |
6d0db4c | Mihai Bazon | 03 September 2012, 09:11:44 UTC | an AST_If is too a StatementWithBody | 03 September 2012, 09:11:44 UTC |
d7c1dc6 | Mihai Bazon | 03 September 2012, 09:05:10 UTC | 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 | Mihai Bazon | 03 September 2012, 09:03:45 UTC | declare boolean options | 03 September 2012, 09:03:45 UTC |
66c869c | Mihai Bazon | 03 September 2012, 08:05:59 UTC | 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 | Mihai Bazon | 03 September 2012, 07:26:23 UTC | 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 | Mihai Bazon | 03 September 2012, 07:14:15 UTC | add -b | 03 September 2012, 07:14:15 UTC |
f2f370c | Mihai Bazon | 02 September 2012, 11:32:00 UTC | add source mappings for more node types; started CLI utility | 02 September 2012, 11:32:00 UTC |
24bfd55 | Mihai Bazon | 02 September 2012, 08:11:39 UTC | minor perf. improvements | 02 September 2012, 08:11:39 UTC |
52bcca2 | Mihai Bazon | 29 August 2012, 16:39:19 UTC | started support for generating source maps (WIP) plugged in @fitzgen's source-map library | 29 August 2012, 16:39:19 UTC |
48440dc | Mihai Bazon | 29 August 2012, 16:26:48 UTC | don't mangle names of setters/getters | 29 August 2012, 16:26:48 UTC |
6569e66 | Mihai Bazon | 29 August 2012, 08:18:05 UTC | update with link to discussion about Esprima vs. UglifyJS speed | 29 August 2012, 08:18:05 UTC |
86cff20 | Mihai Bazon | 28 August 2012, 12:39:53 UTC | docstring for AST_StatementWithBody | 28 August 2012, 12:39:53 UTC |
1b6bcca | Mihai Bazon | 28 August 2012, 12:38:35 UTC | fix output for arrays containing undefined values [1,,2,] ==> [1,,2] instead of [1,undefined,2] | 28 August 2012, 12:38:35 UTC |
7fcb6bc | Mihai Bazon | 28 August 2012, 12:29:58 UTC | 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 | Mihai Bazon | 27 August 2012, 09:29:53 UTC | added README | 27 August 2012, 09:29:53 UTC |
bf70205 | Mihai Bazon | 27 August 2012, 08:48:07 UTC | minor | 27 August 2012, 08:48:07 UTC |
58a3b5e | Mihai Bazon | 27 August 2012, 08:01:27 UTC | update (c) years | 27 August 2012, 08:01:41 UTC |
8dfa9fe | Mihai Bazon | 27 August 2012, 08:00:26 UTC | minor | 27 August 2012, 08:00:26 UTC |
4437e7a | Mihai Bazon | 27 August 2012, 08:00:22 UTC | fix compressing `a,b; return c;` into `return a,b,c;` | 27 August 2012, 08:00:22 UTC |
a8e49f1 | Mihai Bazon | 27 August 2012, 07:59:33 UTC | added print_to_string helper method | 27 August 2012, 07:59:33 UTC |
8d233c3 | Mihai Bazon | 23 August 2012, 07:39:33 UTC | fix current_col and force a newline every 32K (support options.max_line_len) | 23 August 2012, 07:39:33 UTC |
95b18e5 | Mihai Bazon | 22 August 2012, 18:28:59 UTC | added license | 22 August 2012, 18:28:59 UTC |
159a6f0 | Mihai Bazon | 22 August 2012, 12:21:58 UTC | wrote more of the compressor and added some tests | 22 August 2012, 12:21:58 UTC |
f53e139 | Mihai Bazon | 22 August 2012, 10:20:05 UTC | 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 | Mihai Bazon | 21 August 2012, 17:06:57 UTC | declare some properties in the node constructor so that they're copied in clone | 21 August 2012, 21:01:55 UTC |
1b839eb | Mihai Bazon | 21 August 2012, 13:27:57 UTC | hint that brackets may be required in AST_BlockStatement | 21 August 2012, 16:16:05 UTC |
ffe58a9 | Mihai Bazon | 21 August 2012, 12:45:05 UTC | cleaned up some mess and started the actual compressor | 21 August 2012, 13:14:43 UTC |
7ae1c60 | Mihai Bazon | 21 August 2012, 09:55:56 UTC | 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 | Mihai Bazon | 21 August 2012, 09:37:05 UTC | handle labels properly (they can't be handled the same way as variables in a scope) | 21 August 2012, 09:45:06 UTC |
159333f | Mihai Bazon | 21 August 2012, 08:53:19 UTC | warn about unreferenced symbols | 21 August 2012, 09:07:34 UTC |
99456c6 | Mihai Bazon | 21 August 2012, 08:38:49 UTC | 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 | Mihai Bazon | 20 August 2012, 14:19:30 UTC | added mangler and other stuff | 20 August 2012, 14:32:35 UTC |
1fe0ff9 | Mihai Bazon | 19 August 2012, 19:46:00 UTC | doc (WIP) | 19 August 2012, 21:35:54 UTC |
6c35135 | Mihai Bazon | 19 August 2012, 12:57:50 UTC | simple visitor API and code to figure out scope and references | 19 August 2012, 12:57:50 UTC |
4488758 | Mihai Bazon | 18 August 2012, 09:29:57 UTC | some fixes (need testing) in AST_If codegen | 18 August 2012, 09:29:57 UTC |
cd8ae5f | Mihai Bazon | 17 August 2012, 20:08:09 UTC | minor whitespace issues | 17 August 2012, 20:08:09 UTC |
ef87c9f | Mihai Bazon | 17 August 2012, 16:04:23 UTC | 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 | Mihai Bazon | 17 August 2012, 15:33:26 UTC | don't output both space and semicolon when beautify=false | 17 August 2012, 15:33:26 UTC |
07cbc8d | Mihai Bazon | 17 August 2012, 14:56:16 UTC | added some comments about the rules governing parens | 17 August 2012, 15:06:29 UTC |
4fb6021 | Mihai Bazon | 17 August 2012, 13:27:43 UTC | fix one more glitch | 17 August 2012, 13:27:43 UTC |
13f7b11 | Mihai Bazon | 17 August 2012, 12:59:42 UTC | code generator finally seems to work properly | 17 August 2012, 12:59:42 UTC |
c7c163b | Mihai Bazon | 16 August 2012, 16:54:37 UTC | lots'o'fixes in the output routines; still a looong way to go. | 16 August 2012, 18:36:16 UTC |
7f273c3 | Mihai Bazon | 16 August 2012, 15:11:04 UTC | codegen and dropped the useless walker | 16 August 2012, 15:11:04 UTC |
c0ba9e2 | Mihai Bazon | 15 August 2012, 10:32:37 UTC | WIP | 15 August 2012, 11:50:27 UTC |
861e26a | Mihai Bazon | 27 May 2012, 14:25:31 UTC | WIP | 03 June 2012, 20:10:31 UTC |
22bb5e8 | Mihai Bazon | 27 May 2012, 11:36:51 UTC | added small node test script | 27 May 2012, 11:36:51 UTC |
46e7507 | Mihai Bazon | 27 May 2012, 11:36:44 UTC | 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 | Mihai Bazon | 27 May 2012, 11:09:01 UTC | init repo | 27 May 2012, 11:13:26 UTC |