multiple_functions: { options = { hoist_funs: false, if_return: true, } input: { ( function() { if ( !window ) { return; } function f() {} function g() {} } )(); } expect: { ( function() { // NOTE: other compression steps will reduce this // down to just `window`. if ( !window ); function f() {} function g() {} } )(); } } single_function: { options = { hoist_funs: false, if_return: true, } input: { ( function() { if ( !window ) { return; } function f() {} } )(); } expect: { ( function() { if ( !window ); function f() {} } )(); } } deeply_nested: { options = { hoist_funs: false, if_return: true, } input: { ( function() { if ( !window ) { return; } function f() {} function g() {} if ( !document ) { return; } function h() {} } )(); } expect: { ( function() { // NOTE: other compression steps will reduce this // down to just `window`. if ( window ) if ( !document ); function f() {} function g() {} function h() {} } )(); } } not_hoisted_when_already_nested: { options = { hoist_funs: false, if_return: true, } input: { ( function() { if ( !window ) { return; } if ( foo ) function f() {} } )(); } expect: { ( function() { if ( window ) if ( foo ) function f() {} } )(); } } defun_if_return: { options = { hoist_funs: false, if_return: true, } input: { function e() { function f() {} if (!window) return; else function g() {} function h() {} } } expect: { function e() { function f() {} if (window) function g() {} function h() {} } } } defun_hoist_funs: { options = { hoist_funs: true, if_return: true, } input: { function e() { function f() {} if (!window) return; else function g() {} function h() {} } } expect: { function e() { function f() {} function g() {} function h() {} if (window); } } } defun_else_if_return: { options = { hoist_funs: false, if_return: true, } input: { function e() { function f() {} if (window) function g() {} else return; function h() {} } } expect: { function e() { function f() {} if (window) function g() {} function h() {} } } } igned-off-by: Mathieu Othacehe <othacehe@gnu.org> Mathieu Othacehe 2021-08-29Migrate to the new 'targets' field of bootloader-configuration....The old 'target' field is deprecated; adjust the sources to use the new 'targets' one instead. * doc/guix-cookbook.texi<target>: Replace by 'targets'. * gnu/bootloader/grub.scm: Likewise. * gnu/installer/parted.scm: Likewise. * gnu/machine/digital-ocean.scm: Likewise. * gnu/system/examples/asus-c201.tmpl: Likewise * gnu/system/examples/bare-bones.tmpl: Likewise * gnu/system/examples/bare-hurd.tmpl: Likewise * gnu/system/examples/beaglebone-black.tmpl: Likewise * gnu/system/examples/desktop.tmpl: Likewise * gnu/system/examples/docker-image.tmpl: Likewise * gnu/system/examples/lightweight-desktop.tmpl: Likewise * gnu/system/examples/vm-image.tmpl: Likewise * gnu/system/examples/yggdrasil.tmpl: Likewise * gnu/system/hurd.scm: Likewise * gnu/system/images/hurd.scm: Likewise * gnu/system/images/novena.scm: Likewise * gnu/system/images/pine64.scm: Likewise * gnu/system/images/pinebook-pro.scm: Likewise * gnu/system/images/rock64.scm: Likewise * gnu/system/install.scm: Likewise * gnu/system/vm.scm: Likewise * gnu/tests.scm: Likewise * gnu/tests/ganeti.scm: Likewise * gnu/tests/install.scm: Likewise * gnu/tests/nfs.scm: Likewise * gnu/tests/telephony.scm: Likewise * tests/boot-parameters.scm: Likewise * tests/system.scm: Likewise Maxim Cournoyer