Alex Lam S.L
bf1d47180c
fix join_vars on property accessors ( #2895 )
...
fixes #2893
2018-02-09 01:52:39 +08:00
Alex Lam S.L
d66d86f20b
account for exceptions in AST_Assign.left ( #2892 )
...
fixes #2891
2018-02-08 03:31:51 +08:00
Alex Lam S.L
d69d8007d6
evaluate to{Low,Upp}erCase() under unsafe ( #2886 )
2018-02-06 15:57:15 +08:00
Dan
9637f51b68
change undefined == x to null == x ( #2882 )
...
fixes #2871
2018-02-05 15:00:23 +08:00
Alex Lam S.L
3026bd8975
improve exceptional flow compression by collapse_vars ( #2880 )
2018-02-04 04:18:22 +08:00
Alex Lam S.L
78a44d5ab0
maintain order between side-effects and externally observable assignments ( #2879 )
...
fixes #2878
2018-02-04 03:58:49 +08:00
Alex Lam S.L
7e13c0db40
handle break & continue in collapse_vars ( #2875 )
...
fixes #2873
2018-02-03 07:58:43 +08:00
Alex Lam S.L
e6a2e9e4d0
allow collapse_vars across conditional branches ( #2867 )
2018-02-03 02:44:40 +08:00
Alex Lam S.L
e773f03927
fix assignment logic in reduce_vars ( #2872 )
...
fixes #2869
2018-02-03 01:33:09 +08:00
Alex Lam S.L
b16380d669
fix missing corner case in #2855 ( #2868 )
2018-02-02 18:08:56 +08:00
Alex Lam S.L
525a61fb55
better fix for #2858 ( #2864 )
2018-02-01 20:06:36 +08:00
Alex Lam S.L
c3a002ff97
account for side-effects in comparisons of null & undefined ( #2863 )
2018-02-01 19:15:17 +08:00
Alex Lam S.L
fad6766a90
simplify comparisons with undefined & null ( #2862 )
...
fixes #2857
2018-02-01 16:50:54 +08:00
Alex Lam S.L
aa664dea0a
avoid evaluate of compound assignment after dead_code transform ( #2861 )
...
fixes #2860
2018-02-01 16:18:29 +08:00
Alex Lam S.L
102f994b9d
account for declaration assignment in collapse_vars ( #2859 )
...
fixes #2858
2018-02-01 15:09:53 +08:00
Alex Lam S.L
2a4c68be4f
relax collapse_vars on AST_Exit ( #2855 )
...
First introduced in #1862 to stop assignments to migrate beyond `return` or `throw`. Since then `collapse_vars` has been improved to handle various side-effect-related corner cases.
2018-01-31 23:49:59 +08:00
Alex Lam S.L
541e6011af
improve symbol replacement heuristic ( #2851 )
2018-01-29 17:41:15 +08:00
Alex Lam S.L
6fa3fbeae8
compress chained compound assignments ( #2850 )
2018-01-29 15:13:25 +08:00
Alex Lam S.L
193612ac67
fix accounting after conversion to assignment ( #2847 )
...
Missing reference to `AST_SymbolRef` created by `unused` causes `collapse_vars` to misbehave.
fixes #2846
2018-01-26 14:21:11 +08:00
Alex Lam S.L
95cfce68ea
backport of #2835 ( #2841 )
2018-01-23 05:45:45 +08:00
Alex Lam S.L
ec4202590d
drop assignments to constant expressions only ( #2839 )
...
fixes #2838
2018-01-23 02:49:54 +08:00
Alex Lam S.L
e2dc9cf091
fix unsafe evaluate of AST_Array ( #2825 )
...
fixes #2822
2018-01-21 01:39:44 +08:00
Alex Lam S.L
069df27bf1
enable unsafe for test/ufuzz.js ( #2819 )
...
- introduce `unsafe_undefined`
- safer `.toString()` compression
Miscellaneous
- rename `unsafe_Function`
2018-01-19 23:47:42 +08:00
Alex Lam S.L
3e7873217c
improve unused on built-in functions ( #2817 )
2018-01-19 20:41:57 +08:00
Alex Lam S.L
e21bab7ce6
avoid duplicate property names in object literals under "use strict" ( #2818 )
...
fixes #2816
2018-01-19 20:13:50 +08:00
Alex Lam S.L
082e004b87
compress undefined property names ( #2811 )
...
- enforce property names as string
- handle `void 0` as `undefined` in `hoist_props` & `reduce_vars`
2018-01-19 00:36:30 +08:00
kzc
983e69128b
fix join_vars property assignment for negative array index ( #2810 )
...
fixes #2790
2018-01-18 21:52:54 +08:00
Alex Lam S.L
d3ce2bc9e7
suppress unsafe_proto for LHS expressions ( #2804 )
2018-01-17 20:41:51 +08:00
Alex Lam S.L
79cfac77bd
extend join_vars & sequences ( #2798 )
2018-01-17 13:58:27 +08:00
Alex Lam S.L
b4aef753e7
general improvements around AST_ForIn ( #2796 )
...
- compress using `collapse_vars`
- remove unused `name`
- simplify `loop_body`
2018-01-16 17:03:12 +08:00
Alex Lam S.L
10f961c27b
enhance collapse_vars ( #2788 )
2018-01-15 18:47:23 +08:00
Alex Lam S.L
b483678ca7
avoid suboptimal termination in passes ( #2787 )
2018-01-15 16:42:31 +08:00
Alex Lam S.L
cbbe6fad60
avoid double counting within single-use functions ( #2785 )
...
fixes #2783
2018-01-15 16:42:15 +08:00
Alex Lam S.L
62a66dfff4
fix & extend join_vars for object assigments ( #2781 )
2018-01-14 17:11:31 +08:00
Alex Lam S.L
e49416e4aa
fix reduce_vars on AST_Accessor ( #2776 )
...
fixes #2774
2018-01-13 02:46:14 +08:00
Alex Lam S.L
b757450cd8
fix nested unused assignments ( #2769 )
...
fixes #2768
2018-01-11 23:13:44 +08:00
Alex Lam S.L
23ec484806
fix corner case in #2763 ( #2766 )
2018-01-11 21:18:08 +08:00
Alex Lam S.L
f1e1bb419a
join object assignments ( #2763 )
2018-01-11 17:08:21 +08:00
Alex Lam S.L
6a0af85c8b
skip only vars in if_return ( #2759 )
...
fixes #2747
2018-01-10 19:08:46 +08:00
Alex Lam S.L
09269be974
enhance conditionals ( #2758 )
...
`x ? y || z : z` --> `x && y || z`
2018-01-10 16:59:57 +08:00
Alex Lam S.L
2972d58dbb
patch variable declaractions extracted within catch ( #2753 )
...
fixes #2749
2018-01-09 13:54:35 +08:00
Alex Lam S.L
ce27bcd69a
compress loops with immediate break ( #2746 )
...
fixes #2740
2018-01-08 14:30:18 +08:00
Alex Lam S.L
1ee8be8d91
fix recursive function inline ( #2738 )
...
fixes #2737
2018-01-07 15:31:24 +08:00
Alex Lam S.L
3564b4f20d
compress RegExp() in unsafe ( #2735 )
2018-01-06 21:04:47 +08:00
Alex Lam S.L
3505a3604a
enhance unsafe_proto ( #2733 )
2018-01-06 06:16:51 +08:00
Alex Lam S.L
b82feb9302
improve if_return ( #2727 )
2018-01-05 20:24:30 +08:00
Alex Lam S.L
7f2a591c7e
warn on deprecated features ( #2726 )
...
- `function.arguments`
- `function.callers`
fixes #2719
2018-01-05 19:36:02 +08:00
Alex Lam S.L
484e484571
fix corner case in inline ( #2720 )
2018-01-04 23:38:37 +08:00
Alex Lam S.L
a6873a3859
forbid block-scoped AST_Defun in strict mode ( #2718 )
2018-01-04 18:45:51 +08:00
Alex Lam S.L
7a6d452b54
preserve constant modification under strict mode ( #2717 )
2018-01-04 15:53:53 +08:00