diff options
Diffstat (limited to 'test/compress/reduce_vars.js')
-rw-r--r-- | test/compress/reduce_vars.js | 215 |
1 files changed, 215 insertions, 0 deletions
diff --git a/test/compress/reduce_vars.js b/test/compress/reduce_vars.js index e84ac6cb..76ed4601 100644 --- a/test/compress/reduce_vars.js +++ b/test/compress/reduce_vars.js @@ -6,6 +6,7 @@ reduce_vars: { global_defs : { C : 0 }, + reduce_funcs : true, reduce_vars : true, toplevel : true, unused : true @@ -64,6 +65,7 @@ modified: { options = { conditionals : true, evaluate : true, + reduce_funcs : true, reduce_vars : true, unused : true, } @@ -171,6 +173,7 @@ modified: { unsafe_evaluate: { options = { evaluate : true, + reduce_funcs : true, reduce_vars : true, side_effects : true, unsafe : true, @@ -214,6 +217,7 @@ unsafe_evaluate: { unsafe_evaluate_side_effect_free_1: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, unsafe: true, unused: true, @@ -237,6 +241,7 @@ unsafe_evaluate_side_effect_free_2: { evaluate: true, passes: 2, pure_getters: "strict", + reduce_funcs: true, reduce_vars: true, unsafe: true, unused: true, @@ -253,6 +258,7 @@ unsafe_evaluate_side_effect_free_2: { unsafe_evaluate_escaped: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, unsafe: true, unused: true, @@ -273,6 +279,7 @@ unsafe_evaluate_escaped: { unsafe_evaluate_modified: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, unsafe: true, unused: true, @@ -305,6 +312,7 @@ unsafe_evaluate_modified: { unsafe_evaluate_unknown: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, unsafe: true, unused: true, @@ -325,6 +333,7 @@ unsafe_evaluate_unknown: { unsafe_evaluate_object_1: { options = { evaluate : true, + reduce_funcs : true, reduce_vars : true, unsafe : true } @@ -365,6 +374,7 @@ unsafe_evaluate_object_1: { unsafe_evaluate_object_2: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, toplevel: true, unsafe: true, @@ -401,6 +411,7 @@ unsafe_evaluate_object_2: { unsafe_evaluate_object_3: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, toplevel: true, unsafe: true, @@ -441,6 +452,7 @@ unsafe_evaluate_object_3: { unsafe_evaluate_array_1: { options = { evaluate : true, + reduce_funcs : true, reduce_vars : true, unsafe : true } @@ -489,6 +501,7 @@ unsafe_evaluate_array_1: { unsafe_evaluate_array_2: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, toplevel: true, unsafe: true, @@ -525,6 +538,7 @@ unsafe_evaluate_array_2: { unsafe_evaluate_array_3: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, toplevel: true, unsafe: true, @@ -555,6 +569,7 @@ unsafe_evaluate_array_3: { unsafe_evaluate_array_4: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, toplevel: true, unsafe: true, @@ -585,6 +600,7 @@ unsafe_evaluate_array_4: { unsafe_evaluate_array_5: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, toplevel: true, unsafe: true, @@ -615,6 +631,7 @@ unsafe_evaluate_array_5: { unsafe_evaluate_equality_1: { options = { evaluate : true, + reduce_funcs : true, reduce_vars : true, unsafe : true, unused : true @@ -647,6 +664,7 @@ unsafe_evaluate_equality_2: { collapse_vars: true, evaluate : true, passes : 2, + reduce_funcs : true, reduce_vars : true, unsafe : true, unused : true @@ -683,6 +701,7 @@ passes: { conditionals: true, evaluate: true, passes: 2, + reduce_funcs: true, reduce_vars: true, unused: true, } @@ -714,6 +733,7 @@ passes: { iife: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, } input: { @@ -734,6 +754,7 @@ iife: { iife_new: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, } input: { @@ -754,6 +775,7 @@ iife_new: { multi_def_1: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, } input: { @@ -779,6 +801,7 @@ multi_def_1: { multi_def_2: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, } input: { @@ -808,6 +831,7 @@ multi_def_2: { multi_def_3: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, } input: { @@ -835,6 +859,7 @@ multi_def_3: { use_before_var: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, } input: { @@ -854,6 +879,7 @@ use_before_var: { inner_var_if: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, } input: { @@ -877,6 +903,7 @@ inner_var_if: { inner_var_label: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, } input: { @@ -902,6 +929,7 @@ inner_var_label: { inner_var_for_1: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, } input: { @@ -931,6 +959,7 @@ inner_var_for_1: { inner_var_for_2: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, unused: true, } @@ -954,6 +983,7 @@ inner_var_for_2: { inner_var_for_in_1: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, } input: { @@ -985,6 +1015,7 @@ inner_var_for_in_1: { inner_var_for_in_2: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, } input: { @@ -1004,6 +1035,7 @@ inner_var_for_in_2: { inner_var_catch: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, } input: { @@ -1031,6 +1063,7 @@ inner_var_catch: { issue_1533_1: { options = { collapse_vars: true, + reduce_funcs: true, reduce_vars: true, } input: { @@ -1052,6 +1085,7 @@ issue_1533_1: { issue_1533_2: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, } input: { @@ -1075,6 +1109,7 @@ issue_1533_2: { toplevel_on: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, toplevel:true, unused: true, @@ -1092,6 +1127,7 @@ toplevel_on: { toplevel_off: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, toplevel:false, unused: true, @@ -1111,6 +1147,7 @@ toplevel_on_loops_1: { options = { evaluate: true, loops: true, + reduce_funcs: true, reduce_vars: true, toplevel:true, unused: true, @@ -1140,6 +1177,7 @@ toplevel_off_loops_1: { options = { evaluate: true, loops: true, + reduce_funcs: true, reduce_vars: true, toplevel:false, unused: true, @@ -1169,6 +1207,7 @@ toplevel_on_loops_2: { options = { evaluate: true, loops: true, + reduce_funcs: true, reduce_vars: true, toplevel:true, unused: true, @@ -1194,6 +1233,7 @@ toplevel_off_loops_2: { options = { evaluate: true, loops: true, + reduce_funcs: true, reduce_vars: true, toplevel:false, unused: true, @@ -1222,6 +1262,7 @@ toplevel_on_loops_3: { options = { evaluate: true, loops: true, + reduce_funcs: true, reduce_vars: true, toplevel:true, unused: true, @@ -1239,6 +1280,7 @@ toplevel_off_loops_3: { options = { evaluate: true, loops: true, + reduce_funcs: true, reduce_vars: true, toplevel:false, unused: true, @@ -1256,6 +1298,7 @@ toplevel_off_loops_3: { defun_reference: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, } input: { @@ -1292,6 +1335,7 @@ defun_reference: { defun_inline_1: { options = { + reduce_funcs: true, reduce_vars: true, unused: true, } @@ -1320,6 +1364,7 @@ defun_inline_1: { defun_inline_2: { options = { + reduce_funcs: true, reduce_vars: true, unused: true, } @@ -1351,6 +1396,7 @@ defun_inline_3: { evaluate: true, inline: true, passes: 2, + reduce_funcs: true, reduce_vars: true, side_effects: true, unused: true, @@ -1373,6 +1419,7 @@ defun_inline_3: { defun_call: { options = { inline: true, + reduce_funcs: true, reduce_vars: true, unused: true, } @@ -1400,6 +1447,7 @@ defun_call: { defun_redefine: { options = { inline: true, + reduce_funcs: true, reduce_vars: true, unused: true, } @@ -1433,6 +1481,7 @@ defun_redefine: { func_inline: { options = { inline: true, + reduce_funcs: true, reduce_vars: true, unused: true, } @@ -1460,6 +1509,7 @@ func_inline: { func_modified: { options = { inline: true, + reduce_funcs: true, reduce_vars: true, unused: true, } @@ -1487,6 +1537,7 @@ func_modified: { defun_label: { options = { passes: 2, + reduce_funcs: true, reduce_vars: true, unused: true, } @@ -1516,6 +1567,7 @@ defun_label: { double_reference: { options = { + reduce_funcs: true, reduce_vars: true, unused: true, } @@ -1538,6 +1590,7 @@ double_reference: { iife_arguments_1: { options = { + reduce_funcs: true, reduce_vars: true, unused: true, } @@ -1560,6 +1613,7 @@ iife_arguments_1: { iife_arguments_2: { options = { + reduce_funcs: true, reduce_vars: true, unused: true, } @@ -1583,6 +1637,7 @@ iife_arguments_2: { iife_eval_1: { options = { + reduce_funcs: true, reduce_vars: true, unused: true, } @@ -1605,6 +1660,7 @@ iife_eval_1: { iife_eval_2: { options = { + reduce_funcs: true, reduce_vars: true, unused: true, } @@ -1629,6 +1685,7 @@ iife_eval_2: { iife_func_side_effects: { options = { + reduce_funcs: true, reduce_vars: true, unused: true, } @@ -1679,6 +1736,7 @@ iife_func_side_effects: { issue_1595_1: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, unused: true, } @@ -1697,6 +1755,7 @@ issue_1595_1: { issue_1595_2: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, unused: true, } @@ -1716,6 +1775,7 @@ issue_1595_3: { options = { evaluate: true, passes: 2, + reduce_funcs: true, reduce_vars: true, unused: true, } @@ -1734,6 +1794,7 @@ issue_1595_3: { issue_1595_4: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, unused: true, } @@ -1756,6 +1817,7 @@ issue_1606: { options = { evaluate: true, hoist_vars: true, + reduce_funcs: true, reduce_vars: true, } input: { @@ -1782,6 +1844,7 @@ issue_1670_1: { conditionals: true, evaluate: true, dead_code: true, + reduce_funcs: true, reduce_vars: true, side_effects: true, switches: true, @@ -1815,6 +1878,7 @@ issue_1670_2: { evaluate: true, dead_code: true, passes: 2, + reduce_funcs: true, reduce_vars: true, side_effects: true, switches: true, @@ -1846,6 +1910,7 @@ issue_1670_3: { conditionals: true, evaluate: true, dead_code: true, + reduce_funcs: true, reduce_vars: true, side_effects: true, switches: true, @@ -1879,6 +1944,7 @@ issue_1670_4: { evaluate: true, dead_code: true, passes: 2, + reduce_funcs: true, reduce_vars: true, side_effects: true, switches: true, @@ -1909,6 +1975,7 @@ issue_1670_5: { dead_code: true, evaluate: true, keep_fargs: false, + reduce_funcs: true, reduce_vars: true, side_effects: true, switches: true, @@ -1939,6 +2006,7 @@ issue_1670_6: { dead_code: true, evaluate: true, keep_fargs: false, + reduce_funcs: true, reduce_vars: true, side_effects: true, switches: true, @@ -1973,6 +2041,7 @@ issue_1670_6: { unary_delete: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, unused: true, } @@ -2001,6 +2070,7 @@ redefine_arguments_1: { options = { evaluate: true, keep_fargs: false, + reduce_funcs: true, reduce_vars: true, unused: true, } @@ -2041,6 +2111,7 @@ redefine_arguments_2: { evaluate: true, inline: true, keep_fargs: false, + reduce_funcs: true, reduce_vars: true, side_effects: true, toplevel: true, @@ -2079,6 +2150,7 @@ redefine_arguments_3: { inline: true, keep_fargs: false, passes: 3, + reduce_funcs: true, reduce_vars: true, side_effects: true, toplevel: true, @@ -2115,6 +2187,7 @@ redefine_farg_1: { options = { evaluate: true, keep_fargs: false, + reduce_funcs: true, reduce_vars: true, unused: true, } @@ -2154,6 +2227,7 @@ redefine_farg_2: { evaluate: true, inline: true, keep_fargs: false, + reduce_funcs: true, reduce_vars: true, side_effects: true, toplevel: true, @@ -2192,6 +2266,7 @@ redefine_farg_3: { inline: true, keep_fargs: false, passes: 2, + reduce_funcs: true, reduce_vars: true, sequences: true, side_effects: true, @@ -2222,6 +2297,7 @@ redefine_farg_3: { delay_def: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, unused: true, } @@ -2254,6 +2330,7 @@ booleans: { options = { booleans: true, evaluate: true, + reduce_funcs: true, reduce_vars: true, } input: { @@ -2284,6 +2361,7 @@ booleans: { side_effects_assign: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, sequences: true, side_effects: true, @@ -2303,6 +2381,7 @@ side_effects_assign: { pure_getters_1: { options = { pure_getters: "strict", + reduce_funcs: true, reduce_vars: true, side_effects: true, toplevel: true, @@ -2325,6 +2404,7 @@ pure_getters_1: { pure_getters_2: { options = { pure_getters: "strict", + reduce_funcs: true, reduce_vars: true, toplevel: true, unused: true, @@ -2341,6 +2421,7 @@ pure_getters_2: { pure_getters_3: { options = { pure_getters: true, + reduce_funcs: true, reduce_vars: true, toplevel: true, unused: true, @@ -2357,6 +2438,7 @@ catch_var: { options = { booleans: true, evaluate: true, + reduce_funcs: true, reduce_vars: true, } input: { @@ -2381,6 +2463,7 @@ catch_var: { var_assign_1: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, sequences: true, side_effects: true, @@ -2404,6 +2487,7 @@ var_assign_1: { var_assign_2: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, sequences: true, side_effects: true, @@ -2426,6 +2510,7 @@ var_assign_2: { var_assign_3: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, sequences: true, side_effects: true, @@ -2450,6 +2535,7 @@ var_assign_3: { var_assign_4: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, sequences: true, side_effects: true, @@ -2472,6 +2558,7 @@ var_assign_4: { var_assign_5: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, sequences: true, side_effects: true, @@ -2501,6 +2588,7 @@ var_assign_5: { var_assign_6: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, unused: true, } @@ -2522,6 +2610,7 @@ var_assign_6: { immutable: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, unused: true, } @@ -2542,6 +2631,7 @@ immutable: { issue_1814_1: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, toplevel: true, unused: true, @@ -2568,6 +2658,7 @@ issue_1814_1: { issue_1814_2: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, toplevel: true, unused: true, @@ -2594,6 +2685,7 @@ issue_1814_2: { try_abort: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, unused: true, } @@ -2625,6 +2717,7 @@ try_abort: { boolean_binary_assign: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, unused: true, } @@ -2648,6 +2741,7 @@ boolean_binary_assign: { cond_assign: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, unused: true, } @@ -2671,6 +2765,7 @@ cond_assign: { iife_assign: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, unused: true, } @@ -2701,6 +2796,7 @@ iife_assign: { issue_1850_1: { options = { + reduce_funcs: true, reduce_vars: true, toplevel: false, unused: true, @@ -2724,6 +2820,7 @@ issue_1850_1: { issue_1850_2: { options = { + reduce_funcs: true, reduce_vars: true, toplevel: "funcs", unused: true, @@ -2746,6 +2843,7 @@ issue_1850_2: { issue_1850_3: { options = { + reduce_funcs: true, reduce_vars: true, toplevel: "vars", unused: true, @@ -2769,6 +2867,7 @@ issue_1850_3: { issue_1850_4: { options = { + reduce_funcs: true, reduce_vars: true, toplevel: true, unused: true, @@ -2792,6 +2891,7 @@ issue_1850_4: { issue_1865: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, unsafe: true, } @@ -2821,6 +2921,7 @@ issue_1865: { issue_1922_1: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, unused: true, } @@ -2842,6 +2943,7 @@ issue_1922_1: { issue_1922_2: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, unused: true, } @@ -2865,6 +2967,7 @@ issue_1922_2: { accessor_1: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, toplevel: true, } @@ -2895,6 +2998,7 @@ accessor_2: { options = { collapse_vars: true, evaluate: true, + reduce_funcs: true, reduce_vars: true, toplevel: true, unused: true, @@ -2920,6 +3024,7 @@ accessor_2: { for_in_prop: { options = { + reduce_funcs: true, reduce_vars: true, } input: { @@ -2947,6 +3052,7 @@ obj_var_1: { options = { evaluate: true, passes: 2, + reduce_funcs: true, reduce_vars: true, toplevel: true, unused: true, @@ -2976,6 +3082,7 @@ obj_var_2: { inline: true, passes: 2, properties: true, + reduce_funcs: true, reduce_vars: true, side_effects: true, toplevel: true, @@ -3002,6 +3109,7 @@ obj_arg_1: { evaluate: true, inline: true, passes: 2, + reduce_funcs: true, reduce_vars: true, toplevel: true, unused: true, @@ -3033,6 +3141,7 @@ obj_arg_2: { inline: true, passes: 2, properties: true, + reduce_funcs: true, reduce_vars: true, side_effects: true, toplevel: true, @@ -3060,6 +3169,7 @@ func_arg_1: { evaluate: true, inline: true, passes: 2, + reduce_funcs: true, reduce_vars: true, side_effects: true, toplevel: true, @@ -3084,6 +3194,7 @@ func_arg_2: { evaluate: true, inline: true, passes: 2, + reduce_funcs: true, reduce_vars: true, side_effects: true, toplevel: true, @@ -3105,6 +3216,7 @@ func_arg_2: { regex_loop: { options = { + reduce_funcs: true, reduce_vars: true, toplevel: true, unused: true, @@ -3133,6 +3245,7 @@ regex_loop: { obj_for_1: { options = { + reduce_funcs: true, reduce_vars: true, toplevel: true, unused: true, @@ -3151,6 +3264,7 @@ obj_for_1: { obj_for_2: { options = { + reduce_funcs: true, reduce_vars: true, toplevel: true, unused: true, @@ -3170,6 +3284,7 @@ obj_for_2: { array_forin_1: { options = { + reduce_funcs: true, reduce_vars: true, toplevel: true, unused: true, @@ -3192,6 +3307,7 @@ array_forin_1: { array_forin_2: { options = { + reduce_funcs: true, reduce_vars: true, toplevel: true, unused: true, @@ -3214,6 +3330,7 @@ array_forin_2: { const_expr_1: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, toplevel: true, unsafe: true, @@ -3241,6 +3358,7 @@ const_expr_1: { const_expr_2: { options = { evaluate: true, + reduce_funcs: true, reduce_vars: true, toplevel: true, unsafe: true, @@ -3277,6 +3395,7 @@ escaped_prop_1: { evaluate: true, inline: true, pure_getters: "strict", + reduce_funcs: true, reduce_vars: true, side_effects: true, toplevel: true, @@ -3302,6 +3421,7 @@ escaped_prop_1: { escaped_prop_2: { options = { + reduce_funcs: true, reduce_vars: true, toplevel: true, unused: true, @@ -3336,6 +3456,7 @@ escaped_prop_2: { issue_2420_1: { options = { + reduce_funcs: true, reduce_vars: true, unused: true, } @@ -3378,6 +3499,7 @@ issue_2420_1: { issue_2420_2: { options = { + reduce_funcs: true, reduce_vars: true, unused: true, } @@ -3420,6 +3542,7 @@ issue_2420_2: { issue_2423_1: { options = { + reduce_funcs: true, reduce_vars: true, toplevel: true, unused: true, @@ -3444,6 +3567,7 @@ issue_2423_1: { issue_2423_2: { options = { inline: true, + reduce_funcs: true, reduce_vars: true, toplevel: true, unused: true, @@ -3467,6 +3591,7 @@ issue_2423_2: { issue_2423_3: { options = { + reduce_funcs: true, reduce_vars: true, toplevel: true, unused: true, @@ -3485,6 +3610,7 @@ issue_2423_3: { issue_2423_4: { options = { inline: true, + reduce_funcs: true, reduce_vars: true, side_effects: true, toplevel: true, @@ -3505,6 +3631,7 @@ issue_2423_5: { options = { inline: true, passes: 2, + reduce_funcs: true, reduce_vars: true, side_effects: true, toplevel: true, @@ -3543,6 +3670,7 @@ issue_2423_6: { options = { inline: true, passes: 2, + reduce_funcs: true, reduce_vars: true, side_effects: true, toplevel: true, @@ -3583,6 +3711,7 @@ issue_2423_6: { issue_2440_eval_1: { options = { + reduce_funcs: true, reduce_vars: true, toplevel: true, unused: true, @@ -3613,6 +3742,7 @@ issue_2440_eval_1: { issue_2440_eval_2: { options = { + reduce_funcs: true, reduce_vars: true, toplevel: true, unused: true, @@ -3643,6 +3773,7 @@ issue_2440_eval_2: { issue_2440_with_1: { options = { + reduce_funcs: true, reduce_vars: true, toplevel: true, unused: true, @@ -3669,6 +3800,7 @@ issue_2440_with_1: { issue_2440_with_2: { options = { + reduce_funcs: true, reduce_vars: true, toplevel: true, unused: true, @@ -3695,6 +3827,7 @@ issue_2440_with_2: { issue_2442: { options = { + reduce_funcs: true, reduce_vars: true, toplevel: true, unused: true, @@ -3709,6 +3842,7 @@ issue_2442: { recursive_inlining_1: { options = { + reduce_funcs: true, reduce_vars: true, unused: true, } @@ -3729,6 +3863,7 @@ recursive_inlining_1: { recursive_inlining_2: { options = { + reduce_funcs: true, reduce_vars: true, unused: true, } @@ -3751,6 +3886,7 @@ recursive_inlining_2: { recursive_inlining_3: { options = { passes: 2, + reduce_funcs: true, reduce_vars: true, unused: true, } @@ -3788,6 +3924,7 @@ recursive_inlining_3: { recursive_inlining_4: { options = { + reduce_funcs: true, reduce_vars: true, unused: true, } @@ -3834,6 +3971,7 @@ recursive_inlining_4: { recursive_inlining_5: { options = { + reduce_funcs: true, reduce_vars: true, unused: true, } @@ -3887,6 +4025,7 @@ recursive_inlining_5: { issue_2450_1: { options = { + reduce_funcs: true, reduce_vars: true, toplevel: true, unused: true, @@ -3910,6 +4049,7 @@ issue_2450_1: { issue_2450_2: { options = { + reduce_funcs: true, reduce_vars: true, toplevel: true, unused: true, @@ -3932,6 +4072,7 @@ issue_2450_2: { issue_2450_3: { options = { + reduce_funcs: true, reduce_vars: true, unused: true, } @@ -3962,6 +4103,7 @@ issue_2450_3: { issue_2450_4: { options = { + reduce_funcs: true, reduce_vars: true, toplevel: true, unused: true, @@ -3995,6 +4137,7 @@ issue_2450_4: { issue_2450_5: { options = { + reduce_funcs: true, reduce_vars: true, toplevel: true, unused: true, @@ -4030,6 +4173,7 @@ issue_2450_5: { issue_2449: { options = { passes: 10, + reduce_funcs: true, reduce_vars: true, toplevel: true, unused: true, @@ -4061,3 +4205,74 @@ issue_2449: { } expect_stdout: "PASS" } + +perf_1: { + options = { + passes: 10, + reduce_funcs: true, + reduce_vars: true, + toplevel: true, + unused: true, + } + input: { + function foo(x, y, z) { + return x < y ? x * y + z : x * z - y; + } + function indirect_foo(x, y, z) { + return foo(x, y, z); + } + var sum = 0; + for (var i = 0; i < 100; ++i) { + sum += indirect_foo(i, i+1, i*3); + } + console.log(sum); + } + expect: { + function indirect_foo(x, y, z) { + return function(x, y, z) { + return x < y ? x * y + z : x * z - y; + }(x, y, z); + } + var sum = 0; + for (var i = 0; i < 100; ++i) + sum += indirect_foo(i, i + 1, 3 * i); + console.log(sum); + } + expect_stdout: "348150" +} + +perf_2: { + options = { + passes: 10, + reduce_funcs: false, + reduce_vars: true, + toplevel: true, + unused: true, + } + input: { + function foo(x, y, z) { + return x < y ? x * y + z : x * z - y; + } + function indirect_foo(x, y, z) { + return foo(x, y, z); + } + var sum = 0; + for (var i = 0; i < 100; ++i) { + sum += indirect_foo(i, i+1, i*3); + } + console.log(sum); + } + expect: { + function foo(x, y, z) { + return x < y ? x * y + z : x * z - y; + } + function indirect_foo(x, y, z) { + return foo(x, y, z); + } + var sum = 0; + for (var i = 0; i < 100; ++i) + sum += indirect_foo(i, i + 1, 3 * i); + console.log(sum); + } + expect_stdout: "348150" +} |