while_becomes_for: { options = { loops: true }; input: { while (foo()) bar(); } expect: { for (; foo(); ) bar(); } } drop_if_break_1: { options = { loops: true }; input: { for (;;) if (foo()) break; } expect: { for (; !foo();); } } drop_if_break_2: { options = { loops: true }; input: { for (;bar();) if (foo()) break; } expect: { for (; bar() && !foo();); } } drop_if_break_3: { options = { loops: true }; input: { for (;bar();) { if (foo()) break; stuff1(); stuff2(); } } expect: { for (; bar() && !foo();) { stuff1(); stuff2(); } } } drop_if_break_4: { options = { loops: true, sequences: true }; input: { for (;bar();) { x(); y(); if (foo()) break; z(); k(); } } expect: { for (; bar() && (x(), y(), !foo());) z(), k(); } } drop_if_else_break_1: { options = { loops: true }; input: { for (;;) if (foo()) bar(); else break; } expect: { for (; foo(); ) bar(); } } drop_if_else_break_2: { options = { loops: true }; input: { for (;bar();) { if (foo()) baz(); else break; } } expect: { for (; bar() && foo();) baz(); } } drop_if_else_break_3: { options = { loops: true }; input: { for (;bar();) { if (foo()) baz(); else break; stuff1(); stuff2(); } } expect: { for (; bar() && foo();) { baz(); stuff1(); stuff2(); } } } drop_if_else_break_4: { options = { loops: true, sequences: true }; input: { for (;bar();) { x(); y(); if (foo()) baz(); else break; z(); k(); } } expect: { for (; bar() && (x(), y(), foo());) baz(), z(), k(); } } parse_do_while_with_semicolon: { options = { loops: false }; input: { do { x(); } while (false);y() } expect: { do x(); while (false);y(); } } parse_do_while_without_semicolon: { options = { loops: false }; input: { do { x(); } while (false)y() } expect: { do x(); while (false);y(); } } keep_collapse_const_in_own_block_scope: { options = { join_vars: true, loops: true } input: { var i=2; const c=5; while(i--) console.log(i); console.log(c); } expect: { var i=2; const c=5; for(;i--;) console.log(i); console.log(c); } } keep_collapse_const_in_own_block_scope_2: { options = { join_vars: true, loops: true } input: { const c=5; var i=2; // Moves to loop, while it did not in previous test while(i--) console.log(i); console.log(c); } expect: { const c=5; for(var i=2;i--;) console.log(i); console.log(c); } } evaluate: { options = { loops: true, dead_code: true, evaluate: true, }; input: { while (true) { a(); } while (false) { b(); } do { c(); } while (true); do { d(); } while (false); } expect: { for(;;) a(); for(;;) c(); // rule disabled due to issue_1532 do d(); while (false); } } issue_1532: { options = { evaluate: true, loops: true, } input: { function f(x, y) { do { if (x) break; foo(); } while (false); } } expect: { function f(x, y) { do { if (x) break; foo(); } while (false); } } } : ... here. Change-Id: I1272bfc98b583ab0ab36fcba5a8e19ae018b0b80 Signed-off-by: Efraim Flashner <efraim@flashner.co.il> Jean-Pierre De Jesus DIAZ 2023-10-10gnu: Add lufa....* gnu/packages/avr-xyz.scm (lufa): New variable. Maxim Cournoyer 2023-09-25gnu: avr: Delay all cross compilation packages....Partially addresses <https://issues.guix.gnu.org/65716>. * gnu/packages/avr.scm: Add commentary comment. (avr-binutils): Turn into this... (make-avr-binutils): ... procedure. (avr-gcc): Likewise, into... (make-avr-gcc): ... this. Adjust native-inputs accordingly. (avr-toolchain): Likewise, into... (make-avr-toolchain): ... this. * gnu/packages/avr-xyz.scm (simavr) [propagated-inputs]: replace avr-toolchain with a call to the 'make-avr-toolchain' procedure. Series-changes: 2 - Use mlambda for procedures - Fix ((make-avr-toolchain)) typo Maxim Cournoyer