UglifyJS.git
6 years agofix corner case in call binding (#3128)
Alex Lam S.L [Wed, 9 May 2018 22:16:35 +0000 (06:16 +0800)]
fix corner case in call binding (#3128)

fixes #3127

6 years agov3.3.24
Alex Lam S.L [Mon, 7 May 2018 20:17:34 +0000 (20:17 +0000)]
v3.3.24

6 years agofix various corner cases (#3126)
Alex Lam S.L [Sun, 6 May 2018 23:36:25 +0000 (07:36 +0800)]
fix various corner cases (#3126)

- augment ufuzz/reminify test options

fixes #3125

6 years agofix corner case in `reduce_vars` (#3124)
Alex Lam S.L [Sun, 6 May 2018 08:42:35 +0000 (16:42 +0800)]
fix corner case in `reduce_vars` (#3124)

6 years agofix various corner cases (#3123)
Alex Lam S.L [Sat, 5 May 2018 05:17:50 +0000 (13:17 +0800)]
fix various corner cases (#3123)

6 years agospeed up `collapse_vars` (#3119)
Alex Lam S.L [Fri, 4 May 2018 10:38:13 +0000 (18:38 +0800)]
speed up `collapse_vars` (#3119)

6 years agofix `reduce_vars` on nested invocations (#3118)
Alex Lam S.L [Thu, 3 May 2018 22:05:38 +0000 (06:05 +0800)]
fix `reduce_vars` on nested invocations (#3118)

6 years agocompress `AST_Sequence` within `AST_Call` (#3117)
Alex Lam S.L [Thu, 3 May 2018 11:14:56 +0000 (19:14 +0800)]
compress `AST_Sequence` within `AST_Call` (#3117)

6 years agobetter fix for #3113 (#3115)
Alex Lam S.L [Thu, 3 May 2018 07:51:51 +0000 (15:51 +0800)]
better fix for #3113 (#3115)

6 years agofix `TreeWalker` scan order (#3114)
Alex Lam S.L [Wed, 2 May 2018 16:27:45 +0000 (00:27 +0800)]
fix `TreeWalker` scan order (#3114)

fixes #3113

6 years agoimprove `reduce_vars` (#3112)
Alex Lam S.L [Wed, 2 May 2018 07:11:45 +0000 (15:11 +0800)]
improve `reduce_vars` (#3112)

fixes #3110

6 years agov3.3.23
Alex Lam S.L [Sat, 28 Apr 2018 17:14:52 +0000 (17:14 +0000)]
v3.3.23

6 years agoimprove numeral compression (#3108)
Alex Lam S.L [Fri, 27 Apr 2018 18:47:49 +0000 (02:47 +0800)]
improve numeral compression (#3108)

6 years agoworkaround `vm` context issue in `node-chakracore` (#3106)
Alex Lam S.L [Thu, 26 Apr 2018 23:40:34 +0000 (07:40 +0800)]
workaround `vm` context issue in `node-chakracore` (#3106)

6 years agoimprove general performance (#3104)
Alex Lam S.L [Thu, 26 Apr 2018 20:30:29 +0000 (04:30 +0800)]
improve general performance (#3104)

6 years agoimprove `collapse_vars` (#3103)
Alex Lam S.L [Thu, 26 Apr 2018 11:26:01 +0000 (19:26 +0800)]
improve `collapse_vars` (#3103)

6 years agoworkaround test failures in Node.js 10 (#3102)
Alex Lam S.L [Thu, 26 Apr 2018 09:44:37 +0000 (17:44 +0800)]
workaround test failures in Node.js 10 (#3102)

6 years agoworkaround stack overflow in ChakraCore (#3101)
Alex Lam S.L [Thu, 26 Apr 2018 07:02:17 +0000 (15:02 +0800)]
workaround stack overflow in ChakraCore (#3101)

6 years agobetter fix for #2506 (#3099)
Alex Lam S.L [Tue, 24 Apr 2018 20:46:07 +0000 (04:46 +0800)]
better fix for #2506 (#3099)

6 years agohandle RHS side-effects in `collapse_vars` (#3097)
Alex Lam S.L [Tue, 24 Apr 2018 12:31:50 +0000 (20:31 +0800)]
handle RHS side-effects in `collapse_vars` (#3097)

fixes #3096

6 years agoimprove `max_line_len` (#3095)
Alex Lam S.L [Tue, 24 Apr 2018 07:19:45 +0000 (15:19 +0800)]
improve `max_line_len` (#3095)

fixes #304

6 years agoupdate `AST` documentation (#3094)
Alex Lam S.L [Tue, 24 Apr 2018 06:39:12 +0000 (14:39 +0800)]
update `AST` documentation (#3094)

fixes #2622

6 years agoremove unsupported platform
alexlamsl [Tue, 24 Apr 2018 05:32:54 +0000 (13:32 +0800)]
remove unsupported platform

6 years agov3.3.22
Alex Lam S.L [Fri, 20 Apr 2018 19:50:16 +0000 (19:50 +0000)]
v3.3.22

6 years agofix corner case in `strip_func_ids()` (#3090)
Alex Lam S.L [Wed, 18 Apr 2018 20:51:42 +0000 (04:51 +0800)]
fix corner case in `strip_func_ids()` (#3090)

6 years agoimprove performance when handling unused variables in `collapse_vars` (#3084)
Alex Lam S.L [Sun, 15 Apr 2018 04:38:31 +0000 (12:38 +0800)]
improve performance when handling unused variables in `collapse_vars` (#3084)

fixes #3082

6 years agov3.3.21
Alex Lam S.L [Thu, 12 Apr 2018 07:08:53 +0000 (07:08 +0000)]
v3.3.21

6 years agofix `inline` of `catch`-scoped variables (#3077)
Alex Lam S.L [Wed, 11 Apr 2018 07:44:43 +0000 (15:44 +0800)]
fix `inline` of `catch`-scoped variables (#3077)

fixes #3076

6 years agosuppress `hoist_props` for embedded assignments (#3074)
Alex Lam S.L [Tue, 10 Apr 2018 21:19:16 +0000 (05:19 +0800)]
suppress `hoist_props` for embedded assignments (#3074)

6 years agoextend `hoist_props` (#3073)
Alex Lam S.L [Tue, 10 Apr 2018 18:48:15 +0000 (02:48 +0800)]
extend `hoist_props` (#3073)

- handle `AST_Assign` the same way as `AST_VarDef`
- inject `AST_Var` as succeeding statement

fixes #3071

6 years agoextend `join_vars` on object assignments (#3072)
Alex Lam S.L [Tue, 10 Apr 2018 17:35:42 +0000 (01:35 +0800)]
extend `join_vars` on object assignments (#3072)

6 years agohandle flow control in loops with `reduce_vars` (#3069)
Alex Lam S.L [Mon, 9 Apr 2018 22:51:03 +0000 (06:51 +0800)]
handle flow control in loops with `reduce_vars` (#3069)

fixes #3068

6 years agohandle `pure_funcs` under `inline` & `reduce_vars` correctly (#3066)
Alex Lam S.L [Mon, 9 Apr 2018 18:46:38 +0000 (02:46 +0800)]
handle `pure_funcs` under `inline` & `reduce_vars` correctly (#3066)

fixes #3065

6 years agov3.3.20
Alex Lam S.L [Sat, 7 Apr 2018 19:06:15 +0000 (03:06 +0800)]
v3.3.20

6 years agofix corner case in reuse of `mangle` options (#3062)
Alex Lam S.L [Sat, 7 Apr 2018 18:29:37 +0000 (02:29 +0800)]
fix corner case in reuse of `mangle` options (#3062)

6 years agov3.3.19
Alex Lam S.L [Sat, 7 Apr 2018 14:27:55 +0000 (22:27 +0800)]
v3.3.19

6 years agomangle `Object.defineProperty()` (#3059)
Alex Lam S.L [Fri, 6 Apr 2018 09:10:36 +0000 (17:10 +0800)]
mangle `Object.defineProperty()` (#3059)

fixes #869

6 years agosupport inline source map from multiple files (#3058)
Alex Lam S.L [Fri, 6 Apr 2018 08:04:15 +0000 (16:04 +0800)]
support inline source map from multiple files (#3058)

fixes #145

6 years agoimprove usability of `includeSources` (#3057)
Alex Lam S.L [Fri, 6 Apr 2018 05:32:26 +0000 (13:32 +0800)]
improve usability of `includeSources` (#3057)

Exclude source contents from input source map if `includeSources=false`

fixes #3041

6 years agofix AST corruption during `inline` of simple `return` (#3056)
Alex Lam S.L [Thu, 5 Apr 2018 21:39:07 +0000 (05:39 +0800)]
fix AST corruption during `inline` of simple `return` (#3056)

fixes #3054

6 years agospeed up `has_parens()` (take 2) (#3052)
Alex Lam S.L [Wed, 4 Apr 2018 20:12:04 +0000 (04:12 +0800)]
speed up `has_parens()` (take 2) (#3052)

fixes #3050

6 years agoimprove performance through `makePredicate()` (#3048)
Alex Lam S.L [Tue, 3 Apr 2018 07:15:01 +0000 (15:15 +0800)]
improve performance through `makePredicate()` (#3048)

6 years agofix tree traversal on `AST_Do` (#3047)
Alex Lam S.L [Mon, 2 Apr 2018 14:31:23 +0000 (22:31 +0800)]
fix tree traversal on `AST_Do` (#3047)

fixes #3046

6 years agov3.3.18
Alex Lam S.L [Mon, 2 Apr 2018 04:26:28 +0000 (04:26 +0000)]
v3.3.18

6 years agoDon't load source map until the JS source is fully received (#3040)
b-fuze [Sat, 31 Mar 2018 11:26:40 +0000 (07:26 -0400)]
Don't load source map until the JS source is fully received (#3040)

6 years agogive sensible error against invalid input source map (#3044)
Alex Lam S.L [Sat, 31 Mar 2018 09:48:20 +0000 (18:48 +0900)]
give sensible error against invalid input source map (#3044)

6 years agofix escape analysis on `AST_New` (#3043)
Alex Lam S.L [Sat, 31 Mar 2018 06:03:46 +0000 (15:03 +0900)]
fix escape analysis on `AST_New` (#3043)

fixes #3042

6 years agov3.3.17
Alex Lam S.L [Sat, 31 Mar 2018 04:13:45 +0000 (04:13 +0000)]
v3.3.17

6 years agomangle unused nested `AST_SymbolCatch` correctly (#3038)
Alex Lam S.L [Fri, 30 Mar 2018 07:23:09 +0000 (16:23 +0900)]
mangle unused nested `AST_SymbolCatch` correctly (#3038)

fixes #3035

6 years agohandle modifications to `this` correctly (#3036)
Alex Lam S.L [Fri, 30 Mar 2018 06:07:36 +0000 (15:07 +0900)]
handle modifications to `this` correctly (#3036)

fixes #3032

6 years agoimprove test for #3023 (#3031)
Alex Lam S.L [Thu, 29 Mar 2018 14:36:40 +0000 (23:36 +0900)]
improve test for #3023 (#3031)

6 years agoimprove source map granularity (#3030)
Alex Lam S.L [Thu, 29 Mar 2018 05:47:55 +0000 (14:47 +0900)]
improve source map granularity (#3030)

fixes #3023

6 years agofix extra regex slash when going through mozilla AST I/O (#3025)
Fábio Santos [Mon, 26 Mar 2018 18:22:01 +0000 (19:22 +0100)]
fix extra regex slash when going through mozilla AST I/O (#3025)

This relates to #1929, but in the context of mozilla AST input/output.

6 years agospeed up `has_parens()` (#3014)
Alex Lam S.L [Fri, 23 Mar 2018 20:05:28 +0000 (04:05 +0800)]
speed up `has_parens()` (#3014)

6 years agofix corner case in `hoist_props` (#3022)
Alex Lam S.L [Thu, 22 Mar 2018 23:27:35 +0000 (07:27 +0800)]
fix corner case in `hoist_props` (#3022)

fixes #3021

6 years agoimprove performance (#3020)
Alex Lam S.L [Thu, 22 Mar 2018 19:43:52 +0000 (03:43 +0800)]
improve performance (#3020)

- replace `find_if()` with `all()` wherever possible
- move ESTree-specific logic out of `figure_out_scope()`

6 years agofix nested `inline` within loop (#3019)
Alex Lam S.L [Thu, 22 Mar 2018 18:31:59 +0000 (02:31 +0800)]
fix nested `inline` within loop (#3019)

fixes #3018

6 years agofix corner case in `inline` (#3017)
Alex Lam S.L [Thu, 22 Mar 2018 15:46:26 +0000 (23:46 +0800)]
fix corner case in `inline` (#3017)

fixes #3016

6 years agov3.3.16
Alex Lam S.L [Mon, 19 Mar 2018 06:53:51 +0000 (06:53 +0000)]
v3.3.16

6 years agoextend fuzzy RHS folding (#3006)
Alex Lam S.L [Fri, 16 Mar 2018 19:10:21 +0000 (03:10 +0800)]
extend fuzzy RHS folding (#3006)

- `a = []; if (1) x();` => `if (a = []) x();`

6 years agoimprove truthy compression (#3009)
Alex Lam S.L [Thu, 15 Mar 2018 22:12:59 +0000 (06:12 +0800)]
improve truthy compression (#3009)

6 years agorefactor brackets to braces (#3005)
Alex Lam S.L [Thu, 15 Mar 2018 07:46:45 +0000 (15:46 +0800)]
refactor brackets to braces (#3005)

6 years agov3.3.15
Alex Lam S.L [Wed, 14 Mar 2018 16:45:38 +0000 (16:45 +0000)]
v3.3.15

6 years agoupdate dependencies (#3002)
Alex Lam S.L [Wed, 14 Mar 2018 07:54:41 +0000 (15:54 +0800)]
update dependencies (#3002)

acorn 5.5.3
commander 2.15.0

Miscellaneous
- drop unmaintained package from README

6 years agoretain comments within brackets (#2999)
Alex Lam S.L [Tue, 13 Mar 2018 10:44:21 +0000 (18:44 +0800)]
retain comments within brackets (#2999)

fixes #2998

6 years agopreserve non-constant value assignments with modifications (#2997)
Alex Lam S.L [Tue, 13 Mar 2018 09:35:34 +0000 (17:35 +0800)]
preserve non-constant value assignments with modifications (#2997)

fixes #2995

6 years agohandle `case` correctly under `reduce_vars` (#2993)
Alex Lam S.L [Sun, 11 Mar 2018 07:54:43 +0000 (15:54 +0800)]
handle `case` correctly under `reduce_vars` (#2993)

fixes #2992

6 years agopreserve case when `inline_script` (#2991)
Alex Lam S.L [Sat, 10 Mar 2018 21:11:12 +0000 (05:11 +0800)]
preserve case when `inline_script` (#2991)

fixes #2989

6 years agov3.3.14
Alex Lam S.L [Sat, 10 Mar 2018 13:20:14 +0000 (13:20 +0000)]
v3.3.14

6 years agofix `mangle` of `AST_SymbolLambda` under `ie8` (#2978)
Alex Lam S.L [Wed, 7 Mar 2018 09:20:38 +0000 (17:20 +0800)]
fix `mangle` of `AST_SymbolLambda` under `ie8` (#2978)

fixes #2976

6 years agohandle negated constants correctly in `collapse_vars` (#2975)
Alex Lam S.L [Mon, 5 Mar 2018 16:45:58 +0000 (00:45 +0800)]
handle negated constants correctly in `collapse_vars` (#2975)

fixes #2974

6 years agov3.3.13
Alex Lam S.L [Sun, 4 Mar 2018 07:38:49 +0000 (07:38 +0000)]
v3.3.13

6 years agoimprove `test/run-test.js` performance (#2971)
Alex Lam S.L [Sat, 3 Mar 2018 20:50:00 +0000 (04:50 +0800)]
improve `test/run-test.js` performance (#2971)

- allow reuse of contextified sandbox
- minimise bottleneck from `vm.createContext()`

6 years agocompress `arguments[index]` (#2967)
Alex Lam S.L [Fri, 2 Mar 2018 03:22:09 +0000 (11:22 +0800)]
compress `arguments[index]` (#2967)

- always replace with existing parameter
- only introduce new parameter if `keep_fargs` is disabled

6 years agofix value reference caching in `evaluate` (#2969)
Alex Lam S.L [Thu, 1 Mar 2018 20:04:29 +0000 (04:04 +0800)]
fix value reference caching in `evaluate` (#2969)

fixes #2968

6 years agoenhance `conditionals` (#2966)
Alex Lam S.L [Wed, 28 Feb 2018 15:34:48 +0000 (23:34 +0800)]
enhance `conditionals` (#2966)

- `x ? (y, w) : (z, w)` => `x ? y : z, w`

6 years agomigrate safe transformations out of `unsafe_comps` (#2962)
Alex Lam S.L [Wed, 28 Feb 2018 14:02:24 +0000 (22:02 +0800)]
migrate safe transformations out of `unsafe_comps` (#2962)

fixes #2959

6 years agodrop `side_effects`-free `return` values (#2965)
Alex Lam S.L [Wed, 28 Feb 2018 11:59:19 +0000 (19:59 +0800)]
drop `side_effects`-free `return` values (#2965)

6 years agoenhance `collapse_vars` (#2952)
Alex Lam S.L [Wed, 28 Feb 2018 07:19:32 +0000 (15:19 +0800)]
enhance `collapse_vars` (#2952)

- `a = b, b` => `a = b`
- `a.b = c, c()` => `(a.b = c)()`

6 years agodrop lone "use strict" in function body (#2963)
Alex Lam S.L [Mon, 26 Feb 2018 07:22:52 +0000 (15:22 +0800)]
drop lone "use strict" in function body (#2963)

fixes #2961

6 years agoshow benchmark subtotal (#2960)
Dan [Mon, 26 Feb 2018 03:46:26 +0000 (04:46 +0100)]
show benchmark subtotal (#2960)

At the end of the benchmark, sums of the input, output and
gzip values are shown, such as:

    Subtotal

    Original: 7785102 bytes
    Uglified: 2283862 bytes
    GZipped:  662354 bytes

6 years agoimprove fix for #2954 (#2958)
Alex Lam S.L [Sun, 25 Feb 2018 19:14:22 +0000 (03:14 +0800)]
improve fix for #2954 (#2958)

6 years agofix `collapse_vars` on nested exception (#2955)
Alex Lam S.L [Sun, 25 Feb 2018 07:39:00 +0000 (15:39 +0800)]
fix `collapse_vars` on nested exception (#2955)

fixes #2954

6 years agodeduplicate parenthesis around object and function literals (#2953)
Alex Lam S.L [Sat, 24 Feb 2018 18:14:33 +0000 (02:14 +0800)]
deduplicate parenthesis around object and function literals (#2953)

6 years agominor clean-ups (#2951)
Alex Lam S.L [Fri, 23 Feb 2018 18:24:47 +0000 (02:24 +0800)]
minor clean-ups (#2951)

6 years agoimprove `mangle` (#2948)
Alex Lam S.L [Fri, 23 Feb 2018 15:51:49 +0000 (23:51 +0800)]
improve `mangle` (#2948)

6 years agov3.3.12
Alex Lam S.L [Thu, 22 Feb 2018 08:14:29 +0000 (08:14 +0000)]
v3.3.12

6 years agomore tests for #2938 (#2940)
Alex Lam S.L [Tue, 20 Feb 2018 20:19:42 +0000 (04:19 +0800)]
more tests for #2938 (#2940)

6 years agoworkaround `pure_getters=true` when dropping unused assignments (#2939)
Alex Lam S.L [Tue, 20 Feb 2018 09:38:40 +0000 (17:38 +0800)]
workaround `pure_getters=true` when dropping unused assignments (#2939)

fixes #2938

6 years agoimprove `unsafe` `evaluate` of `function` (#2936)
Alex Lam S.L [Mon, 19 Feb 2018 10:47:02 +0000 (18:47 +0800)]
improve `unsafe` `evaluate` of `function` (#2936)

Miscellaneous
- simplify `run_code()` hack

6 years agoreduce false positives from object literals (#2935)
Alex Lam S.L [Sun, 18 Feb 2018 22:21:07 +0000 (06:21 +0800)]
reduce false positives from object literals (#2935)

6 years agoreduce false positives from labels (#2934)
Alex Lam S.L [Sun, 18 Feb 2018 19:55:33 +0000 (03:55 +0800)]
reduce false positives from labels (#2934)

6 years agoreduce false positives from noop (#2933)
Alex Lam S.L [Sun, 18 Feb 2018 17:15:05 +0000 (01:15 +0800)]
reduce false positives from noop (#2933)

6 years agofix crash in `may_throw()` (#2932)
Alex Lam S.L [Sun, 18 Feb 2018 13:51:27 +0000 (21:51 +0800)]
fix crash in `may_throw()` (#2932)

fixes #2931

6 years agofix `dead_code` on exceptional `return` (#2930)
Alex Lam S.L [Sat, 17 Feb 2018 20:36:00 +0000 (04:36 +0800)]
fix `dead_code` on exceptional `return` (#2930)

fixes #2929

6 years agoreduce false positives from `function.toString()` (#2928)
Alex Lam S.L [Sat, 17 Feb 2018 18:13:26 +0000 (02:13 +0800)]
reduce false positives from `function.toString()` (#2928)

6 years agofix `unsafe` `evaluate` of `function` property (#2927)
Alex Lam S.L [Sat, 17 Feb 2018 13:33:36 +0000 (21:33 +0800)]
fix `unsafe` `evaluate` of `function` property (#2927)

fixes #2926

6 years agodrop unused "class" definition IIFEs (#2923)
Alex Lam S.L [Fri, 16 Feb 2018 21:11:31 +0000 (05:11 +0800)]
drop unused "class" definition IIFEs (#2923)

fixes #805

6 years agoreduce `function`-related false positives (#2925)
Alex Lam S.L [Fri, 16 Feb 2018 20:35:03 +0000 (04:35 +0800)]
reduce `function`-related false positives (#2925)

6 years agoimprove `inline` efficiency (#2924)
Alex Lam S.L [Fri, 16 Feb 2018 18:37:13 +0000 (02:37 +0800)]
improve `inline` efficiency (#2924)