diff --git a/compiler/packages/babel-plugin-react-compiler/src/HIR/Environment.ts b/compiler/packages/babel-plugin-react-compiler/src/HIR/Environment.ts index e4e537094f..45344e7266 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/HIR/Environment.ts +++ b/compiler/packages/babel-plugin-react-compiler/src/HIR/Environment.ts @@ -269,7 +269,7 @@ const EnvironmentConfigSchema = z.object({ * Enable instruction reordering. See InstructionReordering.ts for the details * of the approach. */ - enableInstructionReordering: z.boolean().default(true), + enableInstructionReordering: z.boolean().default(false), /* * Enables instrumentation codegen. This emits a dev-mode only call to an diff --git a/compiler/packages/babel-plugin-react-compiler/src/HIR/HIR.ts b/compiler/packages/babel-plugin-react-compiler/src/HIR/HIR.ts index c49745fcd7..5d1a14711a 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/HIR/HIR.ts +++ b/compiler/packages/babel-plugin-react-compiler/src/HIR/HIR.ts @@ -350,7 +350,7 @@ export function isStatementBlockKind(kind: BlockKind): boolean { * Returns true for "value", "loop", and "sequence" block kinds which correspond to * expressions in the source, such as ConditionalExpression, LogicalExpression, loop * initializer/test/updaters, etc - + * * Inverse of isStatementBlockKind() */ export function isExpressionBlockKind(kind: BlockKind): boolean { diff --git a/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/align-scopes-within-nested-valueblock-in-array.expect.md b/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/align-scopes-within-nested-valueblock-in-array.expect.md index 62be10a822..0d1a54af35 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/align-scopes-within-nested-valueblock-in-array.expect.md +++ b/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/align-scopes-within-nested-valueblock-in-array.expect.md @@ -52,12 +52,11 @@ import { Stringify, identity, makeArray, mutate } from "shared-runtime"; * handles this correctly. */ function Foo(t0) { - const $ = _c(3); + const $ = _c(4); const { cond1, cond2 } = t0; + const arr = makeArray({ a: 2 }, 2, []); let t1; - if ($[0] !== cond1 || $[1] !== cond2) { - const arr = makeArray({ a: 2 }, 2, []); - + if ($[0] !== cond1 || $[1] !== cond2 || $[2] !== arr) { t1 = cond1 ? ( <>
{identity("foo")}
@@ -66,9 +65,10 @@ function Foo(t0) { ) : null; $[0] = cond1; $[1] = cond2; - $[2] = t1; + $[2] = arr; + $[3] = t1; } else { - t1 = $[2]; + t1 = $[3]; } return t1; } diff --git a/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/allow-global-mutation-in-effect-indirect.expect.md b/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/allow-global-mutation-in-effect-indirect.expect.md index b79635c840..43503170c2 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/allow-global-mutation-in-effect-indirect.expect.md +++ b/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/allow-global-mutation-in-effect-indirect.expect.md @@ -39,51 +39,57 @@ import { useEffect, useState } from "react"; let someGlobal = {}; function Component() { - const $ = _c(6); + const $ = _c(7); const [state, setState] = useState(someGlobal); let t0; - let t1; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { - const setGlobal = () => { + t0 = () => { someGlobal.value = true; }; - - t0 = () => { - setGlobal(); - }; - t1 = []; $[0] = t0; - $[1] = t1; } else { t0 = $[0]; - t1 = $[1]; } - useEffect(t0, t1); + const setGlobal = t0; + let t1; let t2; + if ($[1] === Symbol.for("react.memo_cache_sentinel")) { + t1 = () => { + setGlobal(); + }; + t2 = []; + $[1] = t1; + $[2] = t2; + } else { + t1 = $[1]; + t2 = $[2]; + } + useEffect(t1, t2); let t3; - if ($[2] === Symbol.for("react.memo_cache_sentinel")) { - t2 = () => { + let t4; + if ($[3] === Symbol.for("react.memo_cache_sentinel")) { + t3 = () => { setState(someGlobal.value); }; - t3 = [someGlobal]; - $[2] = t2; + t4 = [someGlobal]; $[3] = t3; - } else { - t2 = $[2]; - t3 = $[3]; - } - useEffect(t2, t3); - - const t4 = String(state); - let t5; - if ($[4] !== t4) { - t5 =
{t4}
; $[4] = t4; - $[5] = t5; } else { - t5 = $[5]; + t3 = $[3]; + t4 = $[4]; } - return t5; + useEffect(t3, t4); + + const t5 = String(state); + let t6; + if ($[5] !== t5) { + t6 =
{t5}
; + $[5] = t5; + $[6] = t6; + } else { + t6 = $[6]; + } + return t6; } export const FIXTURE_ENTRYPOINT = { diff --git a/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/allow-global-reassignment-in-effect-indirect.expect.md b/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/allow-global-reassignment-in-effect-indirect.expect.md index 0a4527a0a4..fec286b265 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/allow-global-reassignment-in-effect-indirect.expect.md +++ b/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/allow-global-reassignment-in-effect-indirect.expect.md @@ -39,51 +39,57 @@ import { useEffect, useState } from "react"; let someGlobal = false; function Component() { - const $ = _c(6); + const $ = _c(7); const [state, setState] = useState(someGlobal); let t0; - let t1; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { - const setGlobal = () => { + t0 = () => { someGlobal = true; }; - - t0 = () => { - setGlobal(); - }; - t1 = []; $[0] = t0; - $[1] = t1; } else { t0 = $[0]; - t1 = $[1]; } - useEffect(t0, t1); + const setGlobal = t0; + let t1; let t2; + if ($[1] === Symbol.for("react.memo_cache_sentinel")) { + t1 = () => { + setGlobal(); + }; + t2 = []; + $[1] = t1; + $[2] = t2; + } else { + t1 = $[1]; + t2 = $[2]; + } + useEffect(t1, t2); let t3; - if ($[2] === Symbol.for("react.memo_cache_sentinel")) { - t2 = () => { + let t4; + if ($[3] === Symbol.for("react.memo_cache_sentinel")) { + t3 = () => { setState(someGlobal); }; - t3 = [someGlobal]; - $[2] = t2; + t4 = [someGlobal]; $[3] = t3; - } else { - t2 = $[2]; - t3 = $[3]; - } - useEffect(t2, t3); - - const t4 = String(state); - let t5; - if ($[4] !== t4) { - t5 =
{t4}
; $[4] = t4; - $[5] = t5; } else { - t5 = $[5]; + t3 = $[3]; + t4 = $[4]; } - return t5; + useEffect(t3, t4); + + const t5 = String(state); + let t6; + if ($[5] !== t5) { + t6 =
{t5}
; + $[5] = t5; + $[6] = t6; + } else { + t6 = $[6]; + } + return t6; } export const FIXTURE_ENTRYPOINT = { diff --git a/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/dont-merge-if-dep-is-inner-declaration-of-previous-scope.expect.md b/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/dont-merge-if-dep-is-inner-declaration-of-previous-scope.expect.md index e8b5b351dd..ad843e230f 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/dont-merge-if-dep-is-inner-declaration-of-previous-scope.expect.md +++ b/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/dont-merge-if-dep-is-inner-declaration-of-previous-scope.expect.md @@ -99,41 +99,41 @@ function Component(t0) { t2 = $[12]; } let t3; - if ($[13] !== a || $[14] !== b) { - t3 = [a, b]; - $[13] = a; - $[14] = b; + if ($[13] !== t2 || $[14] !== x) { + t3 = ; + $[13] = t2; + $[14] = x; $[15] = t3; } else { t3 = $[15]; } let t4; - if ($[16] !== t2 || $[17] !== x) { - t4 = ; - $[16] = t2; - $[17] = x; + if ($[16] !== a || $[17] !== b) { + t4 = [a, b]; + $[16] = a; + $[17] = b; $[18] = t4; } else { t4 = $[18]; } let t5; - if ($[19] !== t3 || $[20] !== z) { - t5 = ; - $[19] = t3; + if ($[19] !== t4 || $[20] !== z) { + t5 = ; + $[19] = t4; $[20] = z; $[21] = t5; } else { t5 = $[21]; } let t6; - if ($[22] !== t4 || $[23] !== t5) { + if ($[22] !== t3 || $[23] !== t5) { t6 = ( <> - {t4} + {t3} {t5} ); - $[22] = t4; + $[22] = t3; $[23] = t5; $[24] = t6; } else { diff --git a/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.bug-repro-trycatch-nested-overlapping-range.expect.md b/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.bug-repro-trycatch-nested-overlapping-range.expect.md index 2390842e78..ca77829e2f 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.bug-repro-trycatch-nested-overlapping-range.expect.md +++ b/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.bug-repro-trycatch-nested-overlapping-range.expect.md @@ -20,7 +20,7 @@ function Foo() { ## Error ``` -Invariant: Invalid nesting in program blocks or scopes. Items overlap but are not nested: 2:23(17:25) +Invariant: Invalid nesting in program blocks or scopes. Items overlap but are not nested: 2:24(18:26) ``` \ No newline at end of file diff --git a/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.repro-bug-ref-mutable-range.expect.md b/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.repro-bug-ref-mutable-range.expect.md index 51b71b3136..7cd2acc9af 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.repro-bug-ref-mutable-range.expect.md +++ b/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.repro-bug-ref-mutable-range.expect.md @@ -21,7 +21,7 @@ function Foo(props, ref) { ## Error ``` -Invariant: Invalid nesting in program blocks or scopes. Items overlap but are not nested: 1:20(16:23) +Invariant: Invalid nesting in program blocks or scopes. Items overlap but are not nested: 1:21(16:23) ``` \ No newline at end of file diff --git a/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.todo-reactive-scope-overlaps-try.expect.md b/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.todo-reactive-scope-overlaps-try.expect.md index e10a451cf3..95cdbe5aee 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.todo-reactive-scope-overlaps-try.expect.md +++ b/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.todo-reactive-scope-overlaps-try.expect.md @@ -30,7 +30,7 @@ export const FIXTURE_ENTRYPOINT = { ## Error ``` -Invariant: Invalid nesting in program blocks or scopes. Items overlap but are not nested: 3:17(4:20) +Invariant: Invalid nesting in program blocks or scopes. Items overlap but are not nested: 4:19(5:22) ``` \ No newline at end of file diff --git a/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/fbt/fbtparam-with-jsx-element-content.expect.md b/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/fbt/fbtparam-with-jsx-element-content.expect.md index df4964f43c..387031fc18 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/fbt/fbtparam-with-jsx-element-content.expect.md +++ b/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/fbt/fbtparam-with-jsx-element-content.expect.md @@ -32,7 +32,7 @@ function Component(t0) { const $ = _c(4); const { name, data, icon } = t0; let t1; - if ($[0] !== name || $[1] !== data || $[2] !== icon) { + if ($[0] !== name || $[1] !== icon || $[2] !== data) { t1 = ( {fbt._( @@ -62,8 +62,8 @@ function Component(t0) { ); $[0] = name; - $[1] = data; - $[2] = icon; + $[1] = icon; + $[2] = data; $[3] = t1; } else { t1 = $[3]; diff --git a/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/fbt/lambda-with-fbt.expect.md b/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/fbt/lambda-with-fbt.expect.md index f7e71f4be7..5ac0ad17a0 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/fbt/lambda-with-fbt.expect.md +++ b/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/fbt/lambda-with-fbt.expect.md @@ -42,10 +42,10 @@ import { c as _c } from "react/compiler-runtime"; import { fbt } from "fbt"; function Component() { - const $ = _c(1); + const $ = _c(2); let t0; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { - const buttonLabel = () => { + t0 = () => { if (!someCondition) { return fbt._("Purchase as a gift", null, { hk: "1gHj4g" }); } else { @@ -66,17 +66,23 @@ function Component() { } } }; - - t0 = ( - - + ); $[3] = state; $[4] = t2; } else { t2 = $[4]; } let t3; - if ($[5] !== t0) { + if ($[5] !== t1 || $[6] !== t2) { t3 = ( - - ); - $[5] = t0; - $[6] = t3; - } else { - t3 = $[6]; - } - let t4; - if ($[7] !== t2 || $[8] !== t3) { - t4 = (
+ {t0} {t1} {t2} - {t3}
); - $[7] = t2; - $[8] = t3; - $[9] = t4; + $[5] = t1; + $[6] = t2; + $[7] = t3; } else { - t4 = $[9]; + t3 = $[7]; } - return t4; + return t3; } export const FIXTURE_ENTRYPOINT = { diff --git a/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/original-reactive-scopes-fork/invalid-align-scopes-within-nested-valueblock-in-array.expect.md b/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/original-reactive-scopes-fork/invalid-align-scopes-within-nested-valueblock-in-array.expect.md index 62be10a822..0d1a54af35 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/original-reactive-scopes-fork/invalid-align-scopes-within-nested-valueblock-in-array.expect.md +++ b/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/original-reactive-scopes-fork/invalid-align-scopes-within-nested-valueblock-in-array.expect.md @@ -52,12 +52,11 @@ import { Stringify, identity, makeArray, mutate } from "shared-runtime"; * handles this correctly. */ function Foo(t0) { - const $ = _c(3); + const $ = _c(4); const { cond1, cond2 } = t0; + const arr = makeArray({ a: 2 }, 2, []); let t1; - if ($[0] !== cond1 || $[1] !== cond2) { - const arr = makeArray({ a: 2 }, 2, []); - + if ($[0] !== cond1 || $[1] !== cond2 || $[2] !== arr) { t1 = cond1 ? ( <>
{identity("foo")}
@@ -66,9 +65,10 @@ function Foo(t0) { ) : null; $[0] = cond1; $[1] = cond2; - $[2] = t1; + $[2] = arr; + $[3] = t1; } else { - t1 = $[2]; + t1 = $[3]; } return t1; } diff --git a/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/repro-duplicate-instruction-from-merge-consecutive-scopes.expect.md b/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/repro-duplicate-instruction-from-merge-consecutive-scopes.expect.md index 0c731395e2..75627f01a7 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/repro-duplicate-instruction-from-merge-consecutive-scopes.expect.md +++ b/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/repro-duplicate-instruction-from-merge-consecutive-scopes.expect.md @@ -29,39 +29,30 @@ import { c as _c } from "react/compiler-runtime"; import { Stringify } from "shared-runtime"; function Component(t0) { - const $ = _c(5); + const $ = _c(3); const { id } = t0; - - const t1 = id ? true : false; - let t2; - if ($[0] !== t1) { - t2 = ; + let t1; + if ($[0] === Symbol.for("react.memo_cache_sentinel")) { + t1 = ; $[0] = t1; - $[1] = t2; } else { - t2 = $[1]; + t1 = $[0]; } + const t2 = id ? true : false; let t3; - if ($[2] === Symbol.for("react.memo_cache_sentinel")) { - t3 = ; + if ($[1] !== t2) { + t3 = ( + <> + {t1} + + + ); + $[1] = t2; $[2] = t3; } else { t3 = $[2]; } - let t4; - if ($[3] !== t2) { - t4 = ( - <> - {t3} - {t2} - - ); - $[3] = t2; - $[4] = t4; - } else { - t4 = $[4]; - } - return t4; + return t3; } export const FIXTURE_ENTRYPOINT = { diff --git a/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/repro-instruction-part-of-already-closed-scope.expect.md b/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/repro-instruction-part-of-already-closed-scope.expect.md index 05e75822ec..f1fc418d92 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/repro-instruction-part-of-already-closed-scope.expect.md +++ b/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/repro-instruction-part-of-already-closed-scope.expect.md @@ -35,9 +35,10 @@ import { c as _c } from "react/compiler-runtime"; // @enableAssumeHooksFollowRul import { Stringify, identity, useHook } from "shared-runtime"; function Component(t0) { - const $ = _c(15); + const $ = _c(17); const { index } = t0; const data = useHook(); + let T0; let t1; let t2; let t3; @@ -46,60 +47,62 @@ function Component(t0) { const b = identity(data, index); const c = identity(data, index); - t1 = identity(b); - t2 = identity(a); - t3 = identity(c); + const t4 = identity(b); + if ($[6] !== t4) { + t2 = ; + $[6] = t4; + $[7] = t2; + } else { + t2 = $[7]; + } + const t5 = identity(a); + if ($[8] !== t5) { + t3 = ; + $[8] = t5; + $[9] = t3; + } else { + t3 = $[9]; + } + T0 = Stringify; + t1 = identity(c); $[0] = data; $[1] = index; - $[2] = t1; - $[3] = t2; - $[4] = t3; + $[2] = T0; + $[3] = t1; + $[4] = t2; + $[5] = t3; } else { - t1 = $[2]; - t2 = $[3]; - t3 = $[4]; + T0 = $[2]; + t1 = $[3]; + t2 = $[4]; + t3 = $[5]; } let t4; - if ($[5] !== t1) { - t4 = ; - $[5] = t1; - $[6] = t4; + if ($[10] !== T0 || $[11] !== t1) { + t4 = ; + $[10] = T0; + $[11] = t1; + $[12] = t4; } else { - t4 = $[6]; + t4 = $[12]; } let t5; - if ($[7] !== t2) { - t5 = ; - $[7] = t2; - $[8] = t5; - } else { - t5 = $[8]; - } - let t6; - if ($[9] !== t3) { - t6 = ; - $[9] = t3; - $[10] = t6; - } else { - t6 = $[10]; - } - let t7; - if ($[11] !== t4 || $[12] !== t5 || $[13] !== t6) { - t7 = ( + if ($[13] !== t2 || $[14] !== t3 || $[15] !== t4) { + t5 = (
+ {t2} + {t3} {t4} - {t5} - {t6}
); - $[11] = t4; - $[12] = t5; - $[13] = t6; - $[14] = t7; + $[13] = t2; + $[14] = t3; + $[15] = t4; + $[16] = t5; } else { - t7 = $[14]; + t5 = $[16]; } - return t7; + return t5; } export const FIXTURE_ENTRYPOINT = { diff --git a/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/repro-no-value-for-temporary.expect.md b/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/repro-no-value-for-temporary.expect.md index 8c6eae7b84..5eff1aa0fe 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/repro-no-value-for-temporary.expect.md +++ b/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/repro-no-value-for-temporary.expect.md @@ -17,30 +17,34 @@ function Component(listItem, thread) { ```javascript import { c as _c } from "react/compiler-runtime"; function Component(listItem, thread) { - const $ = _c(6); + const $ = _c(7); let t0; let t1; + let t2; if ($[0] !== thread.threadType || $[1] !== listItem) { const isFoo = isFooThread(thread.threadType); - t1 = listItem; + t1 = useBar; + t2 = listItem; t0 = getBadgeText(listItem, isFoo); $[0] = thread.threadType; $[1] = listItem; $[2] = t0; $[3] = t1; + $[4] = t2; } else { t0 = $[2]; t1 = $[3]; + t2 = $[4]; } - let t2; - if ($[4] !== t0) { - t2 = [t0]; - $[4] = t0; - $[5] = t2; + let t3; + if ($[5] !== t0) { + t3 = [t0]; + $[5] = t0; + $[6] = t3; } else { - t2 = $[5]; + t3 = $[6]; } - const body = useBar(t1, t2); + const body = t1(t2, t3); return body; } diff --git a/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/repro-separate-scopes-for-divs.expect.md b/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/repro-separate-scopes-for-divs.expect.md index 19d5fbdf8c..0a38e47b34 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/repro-separate-scopes-for-divs.expect.md +++ b/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/repro-separate-scopes-for-divs.expect.md @@ -56,33 +56,33 @@ function Component(t0) { t2 = $[1]; } let t3; - if ($[2] !== cond) { - t3 = cond === false && ( -
- ); - $[2] = cond; + if ($[2] !== t2) { + t3 =
; + $[2] = t2; $[3] = t3; } else { t3 = $[3]; } let t4; - if ($[4] !== t2) { - t4 =
; - $[4] = t2; + if ($[4] !== cond) { + t4 = cond === false && ( +
+ ); + $[4] = cond; $[5] = t4; } else { t4 = $[5]; } let t5; - if ($[6] !== t4 || $[7] !== t3) { + if ($[6] !== t3 || $[7] !== t4) { t5 = ( <> - {t4} {t3} + {t4} ); - $[6] = t4; - $[7] = t3; + $[6] = t3; + $[7] = t4; $[8] = t5; } else { t5 = $[8];