From 195f473cb4dac36a98e87e37de19694f0b1cd5d4 Mon Sep 17 00:00:00 2001 From: Lauren Tan Date: Tue, 7 Feb 2023 11:40:06 -0500 Subject: [PATCH] s/useMemoCache/unstable_useMemoCache uMC is still prefixed with unstable in React (https://github.com/facebook/react/blob/653dd2348ccfd7bfa4e11d814e247ed3ff7c5fa7/packages/react/src/React.js#L143) --- .../forget/src/ReactiveScopes/CodegenReactiveFunction.ts | 2 +- .../__tests__/fixtures/hir/alias-computed-load.expect.md | 2 +- .../hir/alias-nested-member-path-mutate.expect.md | 2 +- .../fixtures/hir/alias-nested-member-path.expect.md | 2 +- .../src/__tests__/fixtures/hir/alias-while.expect.md | 2 +- .../fixtures/hir/array-access-assignment.expect.md | 2 +- .../hir/assignment-expression-nested-path.expect.md | 2 +- .../assignment-variations-complex-lvalue-array.expect.md | 2 +- .../hir/assignment-variations-complex-lvalue.expect.md | 2 +- .../__tests__/fixtures/hir/bug_object-pattern.expect.md | 2 +- compiler/forget/src/__tests__/fixtures/hir/call.expect.md | 2 +- .../fixtures/hir/capture-func-passed-to-jsx.expect.md | 2 +- .../fixtures/hir/capture-indirect-mutate-alias.expect.md | 2 +- .../__tests__/fixtures/hir/capture-param-mutate.expect.md | 2 +- .../fixtures/hir/capture_mutate-across-fns.expect.md | 2 +- .../fixtures/hir/capturing-arrow-function-1.expect.md | 2 +- .../fixtures/hir/capturing-func-mutate-2.expect.md | 2 +- .../fixtures/hir/capturing-func-mutate-3.expect.md | 2 +- .../fixtures/hir/capturing-func-mutate-nested.expect.md | 2 +- .../fixtures/hir/capturing-func-mutate.expect.md | 2 +- .../__tests__/fixtures/hir/capturing-function-1.expect.md | 2 +- .../hir/capturing-function-within-block.expect.md | 2 +- .../fixtures/hir/capturing-member-expr.expect.md | 2 +- .../fixtures/hir/capturing-nested-member-call.expect.md | 2 +- .../capturing-nested-member-expr-in-nested-func.expect.md | 2 +- .../fixtures/hir/capturing-nested-member-expr.expect.md | 2 +- .../hir/capturing-variable-in-nested-block.expect.md | 2 +- .../hir/capturing-variable-in-nested-function.expect.md | 2 +- .../fixtures/hir/chained-assignment-expressions.expect.md | 2 +- .../forget/src/__tests__/fixtures/hir/component.expect.md | 2 +- .../__tests__/fixtures/hir/computed-store-alias.expect.md | 2 +- .../__tests__/fixtures/hir/concise-arrow-expr.expect.md | 2 +- .../__tests__/fixtures/hir/conditional-break.expect.md | 8 ++++---- .../fixtures/hir/conditional-on-mutable.expect.md | 4 ++-- .../fixtures/hir/constant-propagation-for.expect.md | 2 +- .../fixtures/hir/constant-propagation-while.expect.md | 2 +- .../src/__tests__/fixtures/hir/constructor.expect.md | 2 +- .../forget/src/__tests__/fixtures/hir/dce-loop.expect.md | 2 +- .../__tests__/fixtures/hir/dependencies-outputs.expect.md | 2 +- .../src/__tests__/fixtures/hir/dependencies.expect.md | 2 +- .../fixtures/hir/destructuring-assignment.expect.md | 2 +- .../src/__tests__/fixtures/hir/destructuring.expect.md | 2 +- .../src/__tests__/fixtures/hir/extend-scopes-if.expect.md | 2 +- .../src/__tests__/fixtures/hir/for-logical.expect.md | 2 +- .../__tests__/fixtures/hir/frozen-after-alias.expect.md | 2 +- .../forget/src/__tests__/fixtures/hir/hook-call.expect.md | 2 +- .../fixtures/hir/hooks-freeze-arguments.expect.md | 2 +- .../hir/hooks-freeze-possibly-mutable-arguments.expect.md | 2 +- .../fixtures/hir/independent-across-if.expect.md | 2 +- .../src/__tests__/fixtures/hir/independent.expect.md | 2 +- .../hir/independently-memoize-object-property.expect.md | 2 +- .../__tests__/fixtures/hir/infer-phi-primitive.expect.md | 2 +- .../fixtures/hir/interdependent-across-if.expect.md | 2 +- .../src/__tests__/fixtures/hir/interdependent.expect.md | 2 +- .../src/__tests__/fixtures/hir/inverted-if.expect.md | 2 +- .../hir/issue933-disjoint-set-infinite-loop.expect.md | 2 +- .../src/__tests__/fixtures/hir/jsx-fragment.expect.md | 2 +- .../src/__tests__/fixtures/hir/jsx-spread.expect.md | 2 +- .../fixtures/hir/logical-expression-object.expect.md | 2 +- .../__tests__/fixtures/hir/logical-expression.expect.md | 2 +- .../__tests__/fixtures/hir/method-call-computed.expect.md | 2 +- .../__tests__/fixtures/hir/method-call-fn-call.expect.md | 2 +- .../src/__tests__/fixtures/hir/method-call.expect.md | 2 +- .../fixtures/hir/mutable-liverange-loop.expect.md | 2 +- .../fixtures/hir/mutate-captured-arg-separately.expect.md | 2 +- .../fixtures/hir/obj-literal-cached-in-if-else.expect.md | 2 +- .../hir/obj-literal-mutated-after-if-else.expect.md | 2 +- .../fixtures/hir/obj-mutated-after-if-else.expect.md | 2 +- .../fixtures/hir/object-pattern-params.expect.md | 2 +- .../fixtures/hir/optional-member-expression.expect.md | 2 +- .../overlapping-scopes-shadowing-within-block.expect.md | 2 +- .../hir/overlapping-scopes-within-block.expect.md | 2 +- .../fixtures/hir/primitive-alias-mutate.expect.md | 2 +- .../fixtures/hir/prop-capturing-function-1.expect.md | 2 +- .../__tests__/fixtures/hir/property-assignment.expect.md | 2 +- .../fixtures/hir/reactive-scope-grouping.expect.md | 2 +- .../__tests__/fixtures/hir/reactive-scopes-if.expect.md | 2 +- .../src/__tests__/fixtures/hir/reactive-scopes.expect.md | 2 +- .../fixtures/hir/reassignment-conditional.expect.md | 2 +- .../fixtures/hir/reassignment-separate-scopes.expect.md | 2 +- .../src/__tests__/fixtures/hir/reassignment.expect.md | 2 +- .../__tests__/fixtures/hir/sequence-expression.expect.md | 2 +- .../src/__tests__/fixtures/hir/simple-alias.expect.md | 2 +- .../__tests__/fixtures/hir/simple-function-1.expect.md | 2 +- .../src/__tests__/fixtures/hir/simple-scope.expect.md | 2 +- .../forget/src/__tests__/fixtures/hir/simple.expect.md | 2 +- .../__tests__/fixtures/hir/ssa-arrayexpression.expect.md | 2 +- .../src/__tests__/fixtures/hir/ssa-call-jsx-2.expect.md | 2 +- .../src/__tests__/fixtures/hir/ssa-call-jsx.expect.md | 2 +- .../fixtures/hir/ssa-for-trivial-update.expect.md | 2 +- .../forget/src/__tests__/fixtures/hir/ssa-for.expect.md | 2 +- .../fixtures/hir/ssa-nested-partial-phi.expect.md | 2 +- .../hir/ssa-nested-partial-reassignment.expect.md | 2 +- .../__tests__/fixtures/hir/ssa-newexpression.expect.md | 2 +- .../fixtures/hir/ssa-objectexpression-phi.expect.md | 2 +- .../__tests__/fixtures/hir/ssa-objectexpression.expect.md | 2 +- .../hir/ssa-property-alias-alias-mutate-if.expect.md | 2 +- .../fixtures/hir/ssa-property-alias-if.expect.md | 2 +- .../fixtures/hir/ssa-property-alias-mutate-if.expect.md | 2 +- .../hir/ssa-property-alias-mutate-inside-if.expect.md | 2 +- .../fixtures/hir/ssa-property-alias-mutate.expect.md | 2 +- .../__tests__/fixtures/hir/ssa-property-call.expect.md | 2 +- .../fixtures/hir/ssa-property-mutate-2.expect.md | 2 +- .../fixtures/hir/ssa-property-mutate-alias.expect.md | 2 +- .../__tests__/fixtures/hir/ssa-property-mutate.expect.md | 2 +- .../src/__tests__/fixtures/hir/ssa-property.expect.md | 2 +- .../src/__tests__/fixtures/hir/ssa-shadowing.expect.md | 2 +- .../forget/src/__tests__/fixtures/hir/ssa-while.expect.md | 2 +- .../src/__tests__/fixtures/hir/store-via-call.expect.md | 2 +- .../src/__tests__/fixtures/hir/store-via-new.expect.md | 2 +- .../fixtures/hir/switch-non-final-default.expect.md | 2 +- .../forget/src/__tests__/fixtures/hir/switch.expect.md | 2 +- .../fixtures/hir/tagged-template-literal.expect.md | 2 +- .../src/__tests__/fixtures/hir/template-literal.expect.md | 2 +- .../__tests__/fixtures/hir/ternary-expression.expect.md | 2 +- .../__tests__/fixtures/hir/type-binary-operator.expect.md | 2 +- .../fixtures/hir/type-cast-expression.flow.expect.md | 2 +- .../src/__tests__/fixtures/hir/type-field-load.expect.md | 2 +- .../fixtures/hir/type-test-field-load-binary-op.expect.md | 2 +- .../fixtures/hir/type-test-field-store.expect.md | 2 +- .../fixtures/hir/type-test-polymorphic.expect.md | 2 +- .../hir/type-test-return-type-inference.expect.md | 2 +- .../src/__tests__/fixtures/hir/unary-expr.expect.md | 2 +- .../__tests__/fixtures/hir/update-expression.expect.md | 2 +- .../src/__tests__/fixtures/hir/while-property.expect.md | 2 +- 125 files changed, 129 insertions(+), 129 deletions(-) diff --git a/compiler/forget/src/ReactiveScopes/CodegenReactiveFunction.ts b/compiler/forget/src/ReactiveScopes/CodegenReactiveFunction.ts index e51ddc8443..ac71deb6ba 100644 --- a/compiler/forget/src/ReactiveScopes/CodegenReactiveFunction.ts +++ b/compiler/forget/src/ReactiveScopes/CodegenReactiveFunction.ts @@ -49,7 +49,7 @@ export function codegenReactiveFunction( t.callExpression( t.memberExpression( t.identifier("React"), - t.identifier("useMemoCache") + t.identifier("unstable_useMemoCache") ), [] ) diff --git a/compiler/forget/src/__tests__/fixtures/hir/alias-computed-load.expect.md b/compiler/forget/src/__tests__/fixtures/hir/alias-computed-load.expect.md index effbfc2a91..6e081ae540 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/alias-computed-load.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/alias-computed-load.expect.md @@ -17,7 +17,7 @@ function component(a) { ```javascript function component(a) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== a; let x; if (c_0) { diff --git a/compiler/forget/src/__tests__/fixtures/hir/alias-nested-member-path-mutate.expect.md b/compiler/forget/src/__tests__/fixtures/hir/alias-nested-member-path-mutate.expect.md index 5c18c548c3..16671826b4 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/alias-nested-member-path-mutate.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/alias-nested-member-path-mutate.expect.md @@ -18,7 +18,7 @@ function component() { ```javascript function component() { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); let x; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { const z = []; diff --git a/compiler/forget/src/__tests__/fixtures/hir/alias-nested-member-path.expect.md b/compiler/forget/src/__tests__/fixtures/hir/alias-nested-member-path.expect.md index 503fd28b3a..cde6e84542 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/alias-nested-member-path.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/alias-nested-member-path.expect.md @@ -17,7 +17,7 @@ function component() { ```javascript function component() { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); let z; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { z = []; diff --git a/compiler/forget/src/__tests__/fixtures/hir/alias-while.expect.md b/compiler/forget/src/__tests__/fixtures/hir/alias-while.expect.md index fa37177f0c..e7ecef070c 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/alias-while.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/alias-while.expect.md @@ -27,7 +27,7 @@ function mutate(x, y) {} ```javascript function foo(cond) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== cond; let a; if (c_0) { diff --git a/compiler/forget/src/__tests__/fixtures/hir/array-access-assignment.expect.md b/compiler/forget/src/__tests__/fixtures/hir/array-access-assignment.expect.md index f44bcd5636..35bebcc177 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/array-access-assignment.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/array-access-assignment.expect.md @@ -17,7 +17,7 @@ function foo(a, b, c) { ```javascript function foo(a, b, c) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== a; const c_1 = $[1] !== b; const c_2 = $[2] !== c; diff --git a/compiler/forget/src/__tests__/fixtures/hir/assignment-expression-nested-path.expect.md b/compiler/forget/src/__tests__/fixtures/hir/assignment-expression-nested-path.expect.md index db5ea9f733..972165841b 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/assignment-expression-nested-path.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/assignment-expression-nested-path.expect.md @@ -15,7 +15,7 @@ function g(props) { ```javascript function g(props) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== props.c; let a; if (c_0) { diff --git a/compiler/forget/src/__tests__/fixtures/hir/assignment-variations-complex-lvalue-array.expect.md b/compiler/forget/src/__tests__/fixtures/hir/assignment-variations-complex-lvalue-array.expect.md index e28968752c..f53c0e33cb 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/assignment-variations-complex-lvalue-array.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/assignment-variations-complex-lvalue-array.expect.md @@ -15,7 +15,7 @@ function foo() { ```javascript function foo() { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); let a; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { a = [[1]]; diff --git a/compiler/forget/src/__tests__/fixtures/hir/assignment-variations-complex-lvalue.expect.md b/compiler/forget/src/__tests__/fixtures/hir/assignment-variations-complex-lvalue.expect.md index cf1a8dd7f8..19cd18ffe2 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/assignment-variations-complex-lvalue.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/assignment-variations-complex-lvalue.expect.md @@ -15,7 +15,7 @@ function g() { ```javascript function g() { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); let x; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { x = { y: { z: 1 } }; diff --git a/compiler/forget/src/__tests__/fixtures/hir/bug_object-pattern.expect.md b/compiler/forget/src/__tests__/fixtures/hir/bug_object-pattern.expect.md index 9bb8c235f2..d3499b0d61 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/bug_object-pattern.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/bug_object-pattern.expect.md @@ -14,7 +14,7 @@ function component(t) { ```javascript function component(t) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const a = t.a; const c_0 = $[0] !== a; let y; diff --git a/compiler/forget/src/__tests__/fixtures/hir/call.expect.md b/compiler/forget/src/__tests__/fixtures/hir/call.expect.md index bc102238da..d2d4ba6255 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/call.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/call.expect.md @@ -21,7 +21,7 @@ function Component(props) { function foo() {} function Component(props) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); let a; let b; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { diff --git a/compiler/forget/src/__tests__/fixtures/hir/capture-func-passed-to-jsx.expect.md b/compiler/forget/src/__tests__/fixtures/hir/capture-func-passed-to-jsx.expect.md index 5284c0b814..8343497e34 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/capture-func-passed-to-jsx.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/capture-func-passed-to-jsx.expect.md @@ -20,7 +20,7 @@ function component(a, b) { ```javascript function component(a, b) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== b; let y; if (c_0) { diff --git a/compiler/forget/src/__tests__/fixtures/hir/capture-indirect-mutate-alias.expect.md b/compiler/forget/src/__tests__/fixtures/hir/capture-indirect-mutate-alias.expect.md index 8ec975e059..9866ee943a 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/capture-indirect-mutate-alias.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/capture-indirect-mutate-alias.expect.md @@ -20,7 +20,7 @@ function component(a) { ```javascript function component(a) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== a; let x; if (c_0) { diff --git a/compiler/forget/src/__tests__/fixtures/hir/capture-param-mutate.expect.md b/compiler/forget/src/__tests__/fixtures/hir/capture-param-mutate.expect.md index ef532db205..2dca5a9681 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/capture-param-mutate.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/capture-param-mutate.expect.md @@ -46,7 +46,7 @@ function getNativeLogFunction(level) { ```javascript function getNativeLogFunction(level) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== level; let t0; if (c_0) { diff --git a/compiler/forget/src/__tests__/fixtures/hir/capture_mutate-across-fns.expect.md b/compiler/forget/src/__tests__/fixtures/hir/capture_mutate-across-fns.expect.md index 0a5e03c206..6d1c6e5f00 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/capture_mutate-across-fns.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/capture_mutate-across-fns.expect.md @@ -18,7 +18,7 @@ function component(a) { ```javascript function component(a) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== a; let z; if (c_0) { diff --git a/compiler/forget/src/__tests__/fixtures/hir/capturing-arrow-function-1.expect.md b/compiler/forget/src/__tests__/fixtures/hir/capturing-arrow-function-1.expect.md index 8271d8fdae..49501040a0 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/capturing-arrow-function-1.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/capturing-arrow-function-1.expect.md @@ -16,7 +16,7 @@ function component(a) { ```javascript function component(a) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== a; let z; if (c_0) { diff --git a/compiler/forget/src/__tests__/fixtures/hir/capturing-func-mutate-2.expect.md b/compiler/forget/src/__tests__/fixtures/hir/capturing-func-mutate-2.expect.md index 78d77d3417..eae1fd8b38 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/capturing-func-mutate-2.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/capturing-func-mutate-2.expect.md @@ -19,7 +19,7 @@ function component(a, b) { ```javascript function component(a, b) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== b; let y; if (c_0) { diff --git a/compiler/forget/src/__tests__/fixtures/hir/capturing-func-mutate-3.expect.md b/compiler/forget/src/__tests__/fixtures/hir/capturing-func-mutate-3.expect.md index ab9bf89617..3bdce4463a 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/capturing-func-mutate-3.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/capturing-func-mutate-3.expect.md @@ -18,7 +18,7 @@ function component(a, b) { ```javascript function component(a, b) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== b; let y; if (c_0) { diff --git a/compiler/forget/src/__tests__/fixtures/hir/capturing-func-mutate-nested.expect.md b/compiler/forget/src/__tests__/fixtures/hir/capturing-func-mutate-nested.expect.md index 66c380ceec..d7218dc9f1 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/capturing-func-mutate-nested.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/capturing-func-mutate-nested.expect.md @@ -17,7 +17,7 @@ function component(a) { ```javascript function component(a) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== a; let x; if (c_0) { diff --git a/compiler/forget/src/__tests__/fixtures/hir/capturing-func-mutate.expect.md b/compiler/forget/src/__tests__/fixtures/hir/capturing-func-mutate.expect.md index b7996102f7..86643f86d4 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/capturing-func-mutate.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/capturing-func-mutate.expect.md @@ -19,7 +19,7 @@ function component(a, b) { ```javascript function component(a, b) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== a; const c_1 = $[1] !== b; let x; diff --git a/compiler/forget/src/__tests__/fixtures/hir/capturing-function-1.expect.md b/compiler/forget/src/__tests__/fixtures/hir/capturing-function-1.expect.md index 55731a3efc..fa74dfe201 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/capturing-function-1.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/capturing-function-1.expect.md @@ -16,7 +16,7 @@ function component(a) { ```javascript function component(a) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== a; let z; if (c_0) { diff --git a/compiler/forget/src/__tests__/fixtures/hir/capturing-function-within-block.expect.md b/compiler/forget/src/__tests__/fixtures/hir/capturing-function-within-block.expect.md index 23ba341a96..625c4e8850 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/capturing-function-within-block.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/capturing-function-within-block.expect.md @@ -19,7 +19,7 @@ function component(a) { ```javascript function component(a) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== a; let z; if (c_0) { diff --git a/compiler/forget/src/__tests__/fixtures/hir/capturing-member-expr.expect.md b/compiler/forget/src/__tests__/fixtures/hir/capturing-member-expr.expect.md index 7c0f284d27..2d712ebc7d 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/capturing-member-expr.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/capturing-member-expr.expect.md @@ -16,7 +16,7 @@ function component(a) { ```javascript function component(a) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== a; let z; if (c_0) { diff --git a/compiler/forget/src/__tests__/fixtures/hir/capturing-nested-member-call.expect.md b/compiler/forget/src/__tests__/fixtures/hir/capturing-nested-member-call.expect.md index a94432c3a9..676b986ecc 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/capturing-nested-member-call.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/capturing-nested-member-call.expect.md @@ -16,7 +16,7 @@ function component(a) { ```javascript function component(a) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== a; let t0; if (c_0) { diff --git a/compiler/forget/src/__tests__/fixtures/hir/capturing-nested-member-expr-in-nested-func.expect.md b/compiler/forget/src/__tests__/fixtures/hir/capturing-nested-member-expr-in-nested-func.expect.md index c61ce1d035..0cf78abf11 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/capturing-nested-member-expr-in-nested-func.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/capturing-nested-member-expr-in-nested-func.expect.md @@ -18,7 +18,7 @@ function component(a) { ```javascript function component(a) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== a; let t0; if (c_0) { diff --git a/compiler/forget/src/__tests__/fixtures/hir/capturing-nested-member-expr.expect.md b/compiler/forget/src/__tests__/fixtures/hir/capturing-nested-member-expr.expect.md index f8d5a90dc3..45e6a5a7c6 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/capturing-nested-member-expr.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/capturing-nested-member-expr.expect.md @@ -16,7 +16,7 @@ function component(a) { ```javascript function component(a) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== a; let t0; if (c_0) { diff --git a/compiler/forget/src/__tests__/fixtures/hir/capturing-variable-in-nested-block.expect.md b/compiler/forget/src/__tests__/fixtures/hir/capturing-variable-in-nested-block.expect.md index 06ecba3213..7c682a8d1a 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/capturing-variable-in-nested-block.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/capturing-variable-in-nested-block.expect.md @@ -18,7 +18,7 @@ function component(a) { ```javascript function component(a) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== a; let z; if (c_0) { diff --git a/compiler/forget/src/__tests__/fixtures/hir/capturing-variable-in-nested-function.expect.md b/compiler/forget/src/__tests__/fixtures/hir/capturing-variable-in-nested-function.expect.md index 82dd3c4091..6ca7b6cba1 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/capturing-variable-in-nested-function.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/capturing-variable-in-nested-function.expect.md @@ -18,7 +18,7 @@ function component(a) { ```javascript function component(a) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== a; let z; if (c_0) { diff --git a/compiler/forget/src/__tests__/fixtures/hir/chained-assignment-expressions.expect.md b/compiler/forget/src/__tests__/fixtures/hir/chained-assignment-expressions.expect.md index 78b824d246..94d7af20b3 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/chained-assignment-expressions.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/chained-assignment-expressions.expect.md @@ -17,7 +17,7 @@ function foo() { ```javascript function foo() { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); let z; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { const x = { x: 0 }; diff --git a/compiler/forget/src/__tests__/fixtures/hir/component.expect.md b/compiler/forget/src/__tests__/fixtures/hir/component.expect.md index f935af44d7..2f3ed3633e 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/component.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/component.expect.md @@ -35,7 +35,7 @@ function Component(props) { ```javascript function Component(props) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const items = props.items; const maxItems = props.maxItems; const c_0 = $[0] !== maxItems; diff --git a/compiler/forget/src/__tests__/fixtures/hir/computed-store-alias.expect.md b/compiler/forget/src/__tests__/fixtures/hir/computed-store-alias.expect.md index 7290bffd1c..d45d0b81fd 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/computed-store-alias.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/computed-store-alias.expect.md @@ -16,7 +16,7 @@ function component(a, b) { ```javascript function component(a, b) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== a; const c_1 = $[1] !== b; let x; diff --git a/compiler/forget/src/__tests__/fixtures/hir/concise-arrow-expr.expect.md b/compiler/forget/src/__tests__/fixtures/hir/concise-arrow-expr.expect.md index 93a89f101e..18b6421dad 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/concise-arrow-expr.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/concise-arrow-expr.expect.md @@ -14,7 +14,7 @@ function component() { ```javascript function component() { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); let t0; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { t0 = useState(0); diff --git a/compiler/forget/src/__tests__/fixtures/hir/conditional-break.expect.md b/compiler/forget/src/__tests__/fixtures/hir/conditional-break.expect.md index 5207a7054f..d4c062be69 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/conditional-break.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/conditional-break.expect.md @@ -65,7 +65,7 @@ function ComponentD(props) { * props.b does *not* influence `a` */ function ComponentA(props) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== props.a; const c_1 = $[1] !== props.b; const c_2 = $[2] !== props.d; @@ -92,7 +92,7 @@ function ComponentA(props) { * props.b *does* influence `a` */ function ComponentB(props) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== props.a; const c_1 = $[1] !== props.b; const c_2 = $[2] !== props.c; @@ -121,7 +121,7 @@ function ComponentB(props) { * props.b *does* influence `a`, but only in a way that is never observable */ function ComponentC(props) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== props.a; const c_1 = $[1] !== props.b; const c_2 = $[2] !== props.c; @@ -151,7 +151,7 @@ function ComponentC(props) { * props.b *does* influence `a` */ function ComponentD(props) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== props.a; const c_1 = $[1] !== props.b; const c_2 = $[2] !== props.c; diff --git a/compiler/forget/src/__tests__/fixtures/hir/conditional-on-mutable.expect.md b/compiler/forget/src/__tests__/fixtures/hir/conditional-on-mutable.expect.md index 98104268a8..8f466c61c1 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/conditional-on-mutable.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/conditional-on-mutable.expect.md @@ -35,7 +35,7 @@ function mayMutate() {} ```javascript function ComponentA(props) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== props.p0; const c_1 = $[1] !== props.p1; const c_2 = $[2] !== props.p2; @@ -74,7 +74,7 @@ function ComponentA(props) { } function ComponentB(props) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== props.p0; const c_1 = $[1] !== props.p1; const c_2 = $[2] !== props.p2; diff --git a/compiler/forget/src/__tests__/fixtures/hir/constant-propagation-for.expect.md b/compiler/forget/src/__tests__/fixtures/hir/constant-propagation-for.expect.md index f04c6e1a74..2e75c64f8b 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/constant-propagation-for.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/constant-propagation-for.expect.md @@ -16,7 +16,7 @@ function foo() { ```javascript function foo() { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); let y; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { y = 0; diff --git a/compiler/forget/src/__tests__/fixtures/hir/constant-propagation-while.expect.md b/compiler/forget/src/__tests__/fixtures/hir/constant-propagation-while.expect.md index 9c8f154855..d67ab5551c 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/constant-propagation-while.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/constant-propagation-while.expect.md @@ -17,7 +17,7 @@ function foo() { ```javascript function foo() { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); let y; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { y = 0; diff --git a/compiler/forget/src/__tests__/fixtures/hir/constructor.expect.md b/compiler/forget/src/__tests__/fixtures/hir/constructor.expect.md index 920ba5b91a..b19ce8b7b3 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/constructor.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/constructor.expect.md @@ -21,7 +21,7 @@ function Component(props) { function Foo() {} function Component(props) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); let a; let b; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { diff --git a/compiler/forget/src/__tests__/fixtures/hir/dce-loop.expect.md b/compiler/forget/src/__tests__/fixtures/hir/dce-loop.expect.md index c2b7845a28..de3064caac 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/dce-loop.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/dce-loop.expect.md @@ -18,7 +18,7 @@ function foo(props) { ```javascript function foo(props) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== props.max; let y; if (c_0) { diff --git a/compiler/forget/src/__tests__/fixtures/hir/dependencies-outputs.expect.md b/compiler/forget/src/__tests__/fixtures/hir/dependencies-outputs.expect.md index baf81214a5..7a0e24c171 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/dependencies-outputs.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/dependencies-outputs.expect.md @@ -23,7 +23,7 @@ function foo(a, b) { ```javascript function foo(a, b) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== a; let x; if (c_0) { diff --git a/compiler/forget/src/__tests__/fixtures/hir/dependencies.expect.md b/compiler/forget/src/__tests__/fixtures/hir/dependencies.expect.md index 930ad3cb32..b05a67067a 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/dependencies.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/dependencies.expect.md @@ -24,7 +24,7 @@ function foo(x, y, z) { ```javascript function foo(x, y, z) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const items = [z]; items.push(x); const c_0 = $[0] !== x; diff --git a/compiler/forget/src/__tests__/fixtures/hir/destructuring-assignment.expect.md b/compiler/forget/src/__tests__/fixtures/hir/destructuring-assignment.expect.md index a27a8b2c74..f06d00eb65 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/destructuring-assignment.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/destructuring-assignment.expect.md @@ -27,7 +27,7 @@ function foo(a, b, c) { ```javascript function foo(a, b, c) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const g = a[1][0].e.f; diff --git a/compiler/forget/src/__tests__/fixtures/hir/destructuring.expect.md b/compiler/forget/src/__tests__/fixtures/hir/destructuring.expect.md index 1158f59d65..80ac2ac2cf 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/destructuring.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/destructuring.expect.md @@ -26,7 +26,7 @@ function foo(a, b, c) { ```javascript function foo(a, b, c) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const d = a[0]; const f = a[1][0].e.f; diff --git a/compiler/forget/src/__tests__/fixtures/hir/extend-scopes-if.expect.md b/compiler/forget/src/__tests__/fixtures/hir/extend-scopes-if.expect.md index b5bd7c275b..8b3593eca4 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/extend-scopes-if.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/extend-scopes-if.expect.md @@ -23,7 +23,7 @@ function foo(a, b, c) { ```javascript function foo(a, b, c) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== a; const c_1 = $[1] !== b; const c_2 = $[2] !== c; diff --git a/compiler/forget/src/__tests__/fixtures/hir/for-logical.expect.md b/compiler/forget/src/__tests__/fixtures/hir/for-logical.expect.md index c93f3f03ae..49941f139a 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/for-logical.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/for-logical.expect.md @@ -21,7 +21,7 @@ function foo(props) { ```javascript function foo(props) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); let y; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { y = 0; diff --git a/compiler/forget/src/__tests__/fixtures/hir/frozen-after-alias.expect.md b/compiler/forget/src/__tests__/fixtures/hir/frozen-after-alias.expect.md index 46379b12f1..580f542ea4 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/frozen-after-alias.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/frozen-after-alias.expect.md @@ -19,7 +19,7 @@ function foo(x) {} ```javascript function Component() { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); let a; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { a = []; diff --git a/compiler/forget/src/__tests__/fixtures/hir/hook-call.expect.md b/compiler/forget/src/__tests__/fixtures/hir/hook-call.expect.md index dd07baa66c..77510f1cde 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/hook-call.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/hook-call.expect.md @@ -26,7 +26,7 @@ function useFreeze() {} function foo() {} function Component(props) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); let x; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { x = []; diff --git a/compiler/forget/src/__tests__/fixtures/hir/hooks-freeze-arguments.expect.md b/compiler/forget/src/__tests__/fixtures/hir/hooks-freeze-arguments.expect.md index c8b1542e5a..77cd3e3aed 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/hooks-freeze-arguments.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/hooks-freeze-arguments.expect.md @@ -19,7 +19,7 @@ function call(x) {} ```javascript function Component() { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); let a; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { a = []; diff --git a/compiler/forget/src/__tests__/fixtures/hir/hooks-freeze-possibly-mutable-arguments.expect.md b/compiler/forget/src/__tests__/fixtures/hir/hooks-freeze-possibly-mutable-arguments.expect.md index ae379c7747..3e20cfff28 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/hooks-freeze-possibly-mutable-arguments.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/hooks-freeze-possibly-mutable-arguments.expect.md @@ -26,7 +26,7 @@ function call(x) {} ```javascript function Component(props) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const cond = props.cond; const x = props.x; const c_0 = $[0] !== cond; diff --git a/compiler/forget/src/__tests__/fixtures/hir/independent-across-if.expect.md b/compiler/forget/src/__tests__/fixtures/hir/independent-across-if.expect.md index c4c9591424..406c942c1c 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/independent-across-if.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/independent-across-if.expect.md @@ -56,7 +56,7 @@ function Foo() {} * return = */ function Component(props) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== props.a; const c_1 = $[1] !== props.b; const c_2 = $[2] !== props.c; diff --git a/compiler/forget/src/__tests__/fixtures/hir/independent.expect.md b/compiler/forget/src/__tests__/fixtures/hir/independent.expect.md index 4110de0dd7..61fadb05f2 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/independent.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/independent.expect.md @@ -38,7 +38,7 @@ function Foo() {} * return = */ function Component(props) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== props.a; let a; if (c_0) { diff --git a/compiler/forget/src/__tests__/fixtures/hir/independently-memoize-object-property.expect.md b/compiler/forget/src/__tests__/fixtures/hir/independently-memoize-object-property.expect.md index 6d67a3e778..8554ca394d 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/independently-memoize-object-property.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/independently-memoize-object-property.expect.md @@ -16,7 +16,7 @@ function foo(a, b, c) { ```javascript function foo(a, b, c) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== a; const c_1 = $[1] !== b; const c_2 = $[2] !== c; diff --git a/compiler/forget/src/__tests__/fixtures/hir/infer-phi-primitive.expect.md b/compiler/forget/src/__tests__/fixtures/hir/infer-phi-primitive.expect.md index 1a2e72575f..8089a133a3 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/infer-phi-primitive.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/infer-phi-primitive.expect.md @@ -20,7 +20,7 @@ function foo(a, b) { ```javascript function foo(a, b) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== a; let x; if (c_0) { diff --git a/compiler/forget/src/__tests__/fixtures/hir/interdependent-across-if.expect.md b/compiler/forget/src/__tests__/fixtures/hir/interdependent-across-if.expect.md index 8828da6b15..7d72ffe427 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/interdependent-across-if.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/interdependent-across-if.expect.md @@ -45,7 +45,7 @@ function Foo() {} * return = */ function Component(props) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== props.a; const c_1 = $[1] !== props.b; const c_2 = $[2] !== props.c; diff --git a/compiler/forget/src/__tests__/fixtures/hir/interdependent.expect.md b/compiler/forget/src/__tests__/fixtures/hir/interdependent.expect.md index bcf1fcf03b..51d014fc4b 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/interdependent.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/interdependent.expect.md @@ -37,7 +37,7 @@ function Foo() {} * return = */ function Component(props) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== props.a; const c_1 = $[1] !== props.b; let a; diff --git a/compiler/forget/src/__tests__/fixtures/hir/inverted-if.expect.md b/compiler/forget/src/__tests__/fixtures/hir/inverted-if.expect.md index 6aae4f609f..bd8fe0bde1 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/inverted-if.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/inverted-if.expect.md @@ -20,7 +20,7 @@ function foo(a, b, c, d) { ```javascript function foo(a, b, c, d) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== a; const c_1 = $[1] !== b; const c_2 = $[2] !== c; diff --git a/compiler/forget/src/__tests__/fixtures/hir/issue933-disjoint-set-infinite-loop.expect.md b/compiler/forget/src/__tests__/fixtures/hir/issue933-disjoint-set-infinite-loop.expect.md index 092dea78df..d9f285b513 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/issue933-disjoint-set-infinite-loop.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/issue933-disjoint-set-infinite-loop.expect.md @@ -18,7 +18,7 @@ function MyApp(props) { ```javascript // This caused an infinite loop in the compiler function MyApp(props) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); let y; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { y = makeObj(); diff --git a/compiler/forget/src/__tests__/fixtures/hir/jsx-fragment.expect.md b/compiler/forget/src/__tests__/fixtures/hir/jsx-fragment.expect.md index 0b33ac6033..5e1775eb9a 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/jsx-fragment.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/jsx-fragment.expect.md @@ -19,7 +19,7 @@ function Foo(props) { ```javascript function Foo(props) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); let t0; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { t0 = <>Text; diff --git a/compiler/forget/src/__tests__/fixtures/hir/jsx-spread.expect.md b/compiler/forget/src/__tests__/fixtures/hir/jsx-spread.expect.md index 1df2983d79..3eab8b028b 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/jsx-spread.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/jsx-spread.expect.md @@ -14,7 +14,7 @@ function Component(props) { ```javascript function Component(props) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== props; let t0; if (c_0) { diff --git a/compiler/forget/src/__tests__/fixtures/hir/logical-expression-object.expect.md b/compiler/forget/src/__tests__/fixtures/hir/logical-expression-object.expect.md index 39962a6714..0e3b748464 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/logical-expression-object.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/logical-expression-object.expect.md @@ -19,7 +19,7 @@ function component(props) { ```javascript function component(props) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== props; let t0; if (c_0) { diff --git a/compiler/forget/src/__tests__/fixtures/hir/logical-expression.expect.md b/compiler/forget/src/__tests__/fixtures/hir/logical-expression.expect.md index de302a284c..ad815e4975 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/logical-expression.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/logical-expression.expect.md @@ -14,7 +14,7 @@ function component(props) { ```javascript function component(props) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== props; let t0; if (c_0) { diff --git a/compiler/forget/src/__tests__/fixtures/hir/method-call-computed.expect.md b/compiler/forget/src/__tests__/fixtures/hir/method-call-computed.expect.md index 0266b81ac2..e3f08f72e2 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/method-call-computed.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/method-call-computed.expect.md @@ -22,7 +22,7 @@ function foo(a, b, c) { ```javascript function foo(a, b, c) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== a; let x; if (c_0) { diff --git a/compiler/forget/src/__tests__/fixtures/hir/method-call-fn-call.expect.md b/compiler/forget/src/__tests__/fixtures/hir/method-call-fn-call.expect.md index f5b3941181..3bba7c197d 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/method-call-fn-call.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/method-call-fn-call.expect.md @@ -19,7 +19,7 @@ function foo(a, b, c) { ```javascript function foo(a, b, c) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== a; let x; if (c_0) { diff --git a/compiler/forget/src/__tests__/fixtures/hir/method-call.expect.md b/compiler/forget/src/__tests__/fixtures/hir/method-call.expect.md index 4568c41289..c254930d0d 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/method-call.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/method-call.expect.md @@ -18,7 +18,7 @@ function foo(a, b, c) { ```javascript function foo(a, b, c) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== a; let x; if (c_0) { diff --git a/compiler/forget/src/__tests__/fixtures/hir/mutable-liverange-loop.expect.md b/compiler/forget/src/__tests__/fixtures/hir/mutable-liverange-loop.expect.md index fd81cf825d..b03f6bb4fc 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/mutable-liverange-loop.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/mutable-liverange-loop.expect.md @@ -41,7 +41,7 @@ function mutate() {} function cond() {} function Component(props) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const a = {}; const b = {}; let c; diff --git a/compiler/forget/src/__tests__/fixtures/hir/mutate-captured-arg-separately.expect.md b/compiler/forget/src/__tests__/fixtures/hir/mutate-captured-arg-separately.expect.md index 37237ef313..12ce76b2a2 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/mutate-captured-arg-separately.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/mutate-captured-arg-separately.expect.md @@ -18,7 +18,7 @@ function component(a) { ```javascript function component(a) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== a; let y; if (c_0) { diff --git a/compiler/forget/src/__tests__/fixtures/hir/obj-literal-cached-in-if-else.expect.md b/compiler/forget/src/__tests__/fixtures/hir/obj-literal-cached-in-if-else.expect.md index 6d71a7389a..e3f4ed85c8 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/obj-literal-cached-in-if-else.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/obj-literal-cached-in-if-else.expect.md @@ -19,7 +19,7 @@ function foo(a, b, c, d) { ```javascript function foo(a, b, c, d) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== b; const c_1 = $[1] !== c; let x; diff --git a/compiler/forget/src/__tests__/fixtures/hir/obj-literal-mutated-after-if-else.expect.md b/compiler/forget/src/__tests__/fixtures/hir/obj-literal-mutated-after-if-else.expect.md index 9e980329a7..93c70e5629 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/obj-literal-mutated-after-if-else.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/obj-literal-mutated-after-if-else.expect.md @@ -20,7 +20,7 @@ function foo(a, b, c, d) { ```javascript function foo(a, b, c, d) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== b; const c_1 = $[1] !== c; let x; diff --git a/compiler/forget/src/__tests__/fixtures/hir/obj-mutated-after-if-else.expect.md b/compiler/forget/src/__tests__/fixtures/hir/obj-mutated-after-if-else.expect.md index 228e117e1c..a65a733ad5 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/obj-mutated-after-if-else.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/obj-mutated-after-if-else.expect.md @@ -20,7 +20,7 @@ function foo(a, b, c, d) { ```javascript function foo(a, b, c, d) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const x = someObj(); const c_0 = $[0] !== a; let x$0; diff --git a/compiler/forget/src/__tests__/fixtures/hir/object-pattern-params.expect.md b/compiler/forget/src/__tests__/fixtures/hir/object-pattern-params.expect.md index a8b4f10915..5633305885 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/object-pattern-params.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/object-pattern-params.expect.md @@ -14,7 +14,7 @@ function component({ a, b }) { ```javascript function component(t8) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const a = t8.a; const b = t8.b; const c_0 = $[0] !== a; diff --git a/compiler/forget/src/__tests__/fixtures/hir/optional-member-expression.expect.md b/compiler/forget/src/__tests__/fixtures/hir/optional-member-expression.expect.md index d4e063a2df..339c36c7f2 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/optional-member-expression.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/optional-member-expression.expect.md @@ -16,7 +16,7 @@ function Foo(props) { ```javascript function Foo(props) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== props.a; let x; if (c_0) { diff --git a/compiler/forget/src/__tests__/fixtures/hir/overlapping-scopes-shadowing-within-block.expect.md b/compiler/forget/src/__tests__/fixtures/hir/overlapping-scopes-shadowing-within-block.expect.md index 45af7c1ef3..5d48ffdae7 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/overlapping-scopes-shadowing-within-block.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/overlapping-scopes-shadowing-within-block.expect.md @@ -21,7 +21,7 @@ function foo(a, b, c) { ```javascript function foo(a, b, c) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== a; const c_1 = $[1] !== b; const c_2 = $[2] !== c; diff --git a/compiler/forget/src/__tests__/fixtures/hir/overlapping-scopes-within-block.expect.md b/compiler/forget/src/__tests__/fixtures/hir/overlapping-scopes-within-block.expect.md index b03e2a204a..5b30b1dcec 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/overlapping-scopes-within-block.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/overlapping-scopes-within-block.expect.md @@ -21,7 +21,7 @@ function foo(a, b, c) { ```javascript function foo(a, b, c) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== a; const c_1 = $[1] !== b; const c_2 = $[2] !== c; diff --git a/compiler/forget/src/__tests__/fixtures/hir/primitive-alias-mutate.expect.md b/compiler/forget/src/__tests__/fixtures/hir/primitive-alias-mutate.expect.md index 66fb0da09c..448ab5ba68 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/primitive-alias-mutate.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/primitive-alias-mutate.expect.md @@ -20,7 +20,7 @@ function component(a) { ```javascript function component(a) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== a; let x; if (c_0) { diff --git a/compiler/forget/src/__tests__/fixtures/hir/prop-capturing-function-1.expect.md b/compiler/forget/src/__tests__/fixtures/hir/prop-capturing-function-1.expect.md index 01329599b1..0a94c216c7 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/prop-capturing-function-1.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/prop-capturing-function-1.expect.md @@ -16,7 +16,7 @@ function component(a, b) { ```javascript function component(a, b) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== a; const c_1 = $[1] !== b; let z; diff --git a/compiler/forget/src/__tests__/fixtures/hir/property-assignment.expect.md b/compiler/forget/src/__tests__/fixtures/hir/property-assignment.expect.md index 76ea4fdbe7..ae035e1ae8 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/property-assignment.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/property-assignment.expect.md @@ -17,7 +17,7 @@ function Component(props) { ```javascript function Component(props) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== props.p0; let x; let child; diff --git a/compiler/forget/src/__tests__/fixtures/hir/reactive-scope-grouping.expect.md b/compiler/forget/src/__tests__/fixtures/hir/reactive-scope-grouping.expect.md index f69dd9ddd3..83a46ad40d 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/reactive-scope-grouping.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/reactive-scope-grouping.expect.md @@ -18,7 +18,7 @@ function foo() { ```javascript function foo() { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); let x; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { x = {}; diff --git a/compiler/forget/src/__tests__/fixtures/hir/reactive-scopes-if.expect.md b/compiler/forget/src/__tests__/fixtures/hir/reactive-scopes-if.expect.md index 6650e1607e..18830c47fa 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/reactive-scopes-if.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/reactive-scopes-if.expect.md @@ -20,7 +20,7 @@ function foo(a, b, c) { ```javascript function foo(a, b, c) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== a; const c_1 = $[1] !== b; const c_2 = $[2] !== c; diff --git a/compiler/forget/src/__tests__/fixtures/hir/reactive-scopes.expect.md b/compiler/forget/src/__tests__/fixtures/hir/reactive-scopes.expect.md index e655b2d9fe..2bfaab7050 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/reactive-scopes.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/reactive-scopes.expect.md @@ -19,7 +19,7 @@ function f(a, b) { ```javascript function f(a, b) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== a.length; const c_1 = $[1] !== b; let x; diff --git a/compiler/forget/src/__tests__/fixtures/hir/reassignment-conditional.expect.md b/compiler/forget/src/__tests__/fixtures/hir/reassignment-conditional.expect.md index 1ffa40f0b0..5925eeeeca 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/reassignment-conditional.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/reassignment-conditional.expect.md @@ -23,7 +23,7 @@ function Component(props) { ```javascript function Component(props) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== props.p0; let x; if (c_0) { diff --git a/compiler/forget/src/__tests__/fixtures/hir/reassignment-separate-scopes.expect.md b/compiler/forget/src/__tests__/fixtures/hir/reassignment-separate-scopes.expect.md index efdc1fd9aa..3fadaf0fcb 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/reassignment-separate-scopes.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/reassignment-separate-scopes.expect.md @@ -34,7 +34,7 @@ function foo(a, b, c) { ```javascript function foo(a, b, c) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== a; let x; if (c_0) { diff --git a/compiler/forget/src/__tests__/fixtures/hir/reassignment.expect.md b/compiler/forget/src/__tests__/fixtures/hir/reassignment.expect.md index 471b39cc33..bdfbb575f2 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/reassignment.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/reassignment.expect.md @@ -21,7 +21,7 @@ function Component(props) { ```javascript function Component(props) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== props.p0; const c_1 = $[1] !== props.p1; let y; diff --git a/compiler/forget/src/__tests__/fixtures/hir/sequence-expression.expect.md b/compiler/forget/src/__tests__/fixtures/hir/sequence-expression.expect.md index 623c48bc5d..9e7a4d608e 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/sequence-expression.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/sequence-expression.expect.md @@ -18,7 +18,7 @@ function foo() {} ```javascript function sequence(props) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); Math.max(1, 2); let t0; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { diff --git a/compiler/forget/src/__tests__/fixtures/hir/simple-alias.expect.md b/compiler/forget/src/__tests__/fixtures/hir/simple-alias.expect.md index 8496abe0a1..5653804149 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/simple-alias.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/simple-alias.expect.md @@ -21,7 +21,7 @@ function foo() { ```javascript function mutate() {} function foo() { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); let c$1; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { const b = {}; diff --git a/compiler/forget/src/__tests__/fixtures/hir/simple-function-1.expect.md b/compiler/forget/src/__tests__/fixtures/hir/simple-function-1.expect.md index 6459f3e25e..fbb588bb42 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/simple-function-1.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/simple-function-1.expect.md @@ -15,7 +15,7 @@ function component() { ```javascript function component() { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); let x; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { x = function (a) { diff --git a/compiler/forget/src/__tests__/fixtures/hir/simple-scope.expect.md b/compiler/forget/src/__tests__/fixtures/hir/simple-scope.expect.md index dd8692150e..71337fd910 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/simple-scope.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/simple-scope.expect.md @@ -13,7 +13,7 @@ function foo(a) { ```javascript function foo(a) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== a.b; let x; if (c_0) { diff --git a/compiler/forget/src/__tests__/fixtures/hir/simple.expect.md b/compiler/forget/src/__tests__/fixtures/hir/simple.expect.md index fd111438ba..a99e058442 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/simple.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/simple.expect.md @@ -15,7 +15,7 @@ export default function foo(x, y) { ```javascript export default function foo(x, y) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); if (x) { const c_0 = $[0] !== y; let t0; diff --git a/compiler/forget/src/__tests__/fixtures/hir/ssa-arrayexpression.expect.md b/compiler/forget/src/__tests__/fixtures/hir/ssa-arrayexpression.expect.md index 32f1c45619..c41603c2b0 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/ssa-arrayexpression.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/ssa-arrayexpression.expect.md @@ -15,7 +15,7 @@ function Component(props) { ```javascript function Component(props) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const a = 1; const b = 2; let x; diff --git a/compiler/forget/src/__tests__/fixtures/hir/ssa-call-jsx-2.expect.md b/compiler/forget/src/__tests__/fixtures/hir/ssa-call-jsx-2.expect.md index b77594b2f4..c61c3c66cf 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/ssa-call-jsx-2.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/ssa-call-jsx-2.expect.md @@ -25,7 +25,7 @@ function Component(props) { function foo() {} function Component(props) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); let a; let b; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { diff --git a/compiler/forget/src/__tests__/fixtures/hir/ssa-call-jsx.expect.md b/compiler/forget/src/__tests__/fixtures/hir/ssa-call-jsx.expect.md index 53192e7157..0b09d0133f 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/ssa-call-jsx.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/ssa-call-jsx.expect.md @@ -21,7 +21,7 @@ function Component(props) { function foo() {} function Component(props) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); let a; let b; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { diff --git a/compiler/forget/src/__tests__/fixtures/hir/ssa-for-trivial-update.expect.md b/compiler/forget/src/__tests__/fixtures/hir/ssa-for-trivial-update.expect.md index 8fe5dcc42e..ea1050cdb3 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/ssa-for-trivial-update.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/ssa-for-trivial-update.expect.md @@ -16,7 +16,7 @@ function foo() { ```javascript function foo() { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); let x; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { x = 1; diff --git a/compiler/forget/src/__tests__/fixtures/hir/ssa-for.expect.md b/compiler/forget/src/__tests__/fixtures/hir/ssa-for.expect.md index 734d16130d..74b9165895 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/ssa-for.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/ssa-for.expect.md @@ -16,7 +16,7 @@ function foo() { ```javascript function foo() { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); let x; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { x = 1; diff --git a/compiler/forget/src/__tests__/fixtures/hir/ssa-nested-partial-phi.expect.md b/compiler/forget/src/__tests__/fixtures/hir/ssa-nested-partial-phi.expect.md index df11da8dcd..37ffd23bc5 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/ssa-nested-partial-phi.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/ssa-nested-partial-phi.expect.md @@ -19,7 +19,7 @@ function foo(a, b, c) { ```javascript function foo(a, b, c) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const x = a; if (b) { const c_0 = $[0] !== c; diff --git a/compiler/forget/src/__tests__/fixtures/hir/ssa-nested-partial-reassignment.expect.md b/compiler/forget/src/__tests__/fixtures/hir/ssa-nested-partial-reassignment.expect.md index 263f51ae5d..bb07e3f0b2 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/ssa-nested-partial-reassignment.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/ssa-nested-partial-reassignment.expect.md @@ -20,7 +20,7 @@ function foo(a, b, c, d, e) { ```javascript function foo(a, b, c, d, e) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const x = null; const c_0 = $[0] !== a; const c_1 = $[1] !== b; diff --git a/compiler/forget/src/__tests__/fixtures/hir/ssa-newexpression.expect.md b/compiler/forget/src/__tests__/fixtures/hir/ssa-newexpression.expect.md index f59417d9ad..78ce739b99 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/ssa-newexpression.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/ssa-newexpression.expect.md @@ -19,7 +19,7 @@ function Component(props) { function Foo() {} function Component(props) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); let c; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { const a = []; diff --git a/compiler/forget/src/__tests__/fixtures/hir/ssa-objectexpression-phi.expect.md b/compiler/forget/src/__tests__/fixtures/hir/ssa-objectexpression-phi.expect.md index 21b4c48345..25cf2b1f6e 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/ssa-objectexpression-phi.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/ssa-objectexpression-phi.expect.md @@ -22,7 +22,7 @@ function foo() { ```javascript function foo() { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const x = 1; const y = 3; diff --git a/compiler/forget/src/__tests__/fixtures/hir/ssa-objectexpression.expect.md b/compiler/forget/src/__tests__/fixtures/hir/ssa-objectexpression.expect.md index 675c949954..9b9e106004 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/ssa-objectexpression.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/ssa-objectexpression.expect.md @@ -15,7 +15,7 @@ function Component(props) { ```javascript function Component(props) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const a = 1; const b = 2; let x; diff --git a/compiler/forget/src/__tests__/fixtures/hir/ssa-property-alias-alias-mutate-if.expect.md b/compiler/forget/src/__tests__/fixtures/hir/ssa-property-alias-alias-mutate-if.expect.md index ede87c99b2..de3b41b463 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/ssa-property-alias-alias-mutate-if.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/ssa-property-alias-alias-mutate-if.expect.md @@ -22,7 +22,7 @@ function foo(a) { ```javascript function foo(a) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== a; let x; if (c_0) { diff --git a/compiler/forget/src/__tests__/fixtures/hir/ssa-property-alias-if.expect.md b/compiler/forget/src/__tests__/fixtures/hir/ssa-property-alias-if.expect.md index 4cf3e7a0d0..5c260f4ab3 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/ssa-property-alias-if.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/ssa-property-alias-if.expect.md @@ -20,7 +20,7 @@ function foo(a) { ```javascript function foo(a) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== a; let x; if (c_0) { diff --git a/compiler/forget/src/__tests__/fixtures/hir/ssa-property-alias-mutate-if.expect.md b/compiler/forget/src/__tests__/fixtures/hir/ssa-property-alias-mutate-if.expect.md index a2fa814f16..078d22225f 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/ssa-property-alias-mutate-if.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/ssa-property-alias-mutate-if.expect.md @@ -21,7 +21,7 @@ function foo(a) { ```javascript function foo(a) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== a; let x; if (c_0) { diff --git a/compiler/forget/src/__tests__/fixtures/hir/ssa-property-alias-mutate-inside-if.expect.md b/compiler/forget/src/__tests__/fixtures/hir/ssa-property-alias-mutate-inside-if.expect.md index 922fe2c39a..e583167c36 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/ssa-property-alias-mutate-inside-if.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/ssa-property-alias-mutate-inside-if.expect.md @@ -21,7 +21,7 @@ function foo(a) { ```javascript function foo(a) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== a; let x; if (c_0) { diff --git a/compiler/forget/src/__tests__/fixtures/hir/ssa-property-alias-mutate.expect.md b/compiler/forget/src/__tests__/fixtures/hir/ssa-property-alias-mutate.expect.md index 620ef9d95d..5cd018c003 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/ssa-property-alias-mutate.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/ssa-property-alias-mutate.expect.md @@ -19,7 +19,7 @@ function foo() { ```javascript function foo() { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); let y; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { const a = {}; diff --git a/compiler/forget/src/__tests__/fixtures/hir/ssa-property-call.expect.md b/compiler/forget/src/__tests__/fixtures/hir/ssa-property-call.expect.md index 3d3671006d..f6d7714543 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/ssa-property-call.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/ssa-property-call.expect.md @@ -15,7 +15,7 @@ function foo() { ```javascript function foo() { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); let y; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { const x = []; diff --git a/compiler/forget/src/__tests__/fixtures/hir/ssa-property-mutate-2.expect.md b/compiler/forget/src/__tests__/fixtures/hir/ssa-property-mutate-2.expect.md index 8d7e9e3d15..5f36578799 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/ssa-property-mutate-2.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/ssa-property-mutate-2.expect.md @@ -16,7 +16,7 @@ function foo() { ```javascript function foo() { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); let y; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { const x = []; diff --git a/compiler/forget/src/__tests__/fixtures/hir/ssa-property-mutate-alias.expect.md b/compiler/forget/src/__tests__/fixtures/hir/ssa-property-mutate-alias.expect.md index cd7b97b9c5..4ad7a2d948 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/ssa-property-mutate-alias.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/ssa-property-mutate-alias.expect.md @@ -19,7 +19,7 @@ function foo() { ```javascript function foo() { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); let y; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { const a = {}; diff --git a/compiler/forget/src/__tests__/fixtures/hir/ssa-property-mutate.expect.md b/compiler/forget/src/__tests__/fixtures/hir/ssa-property-mutate.expect.md index f1d23244f4..08bdfe48ed 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/ssa-property-mutate.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/ssa-property-mutate.expect.md @@ -16,7 +16,7 @@ function foo() { ```javascript function foo() { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); let y; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { const x = []; diff --git a/compiler/forget/src/__tests__/fixtures/hir/ssa-property.expect.md b/compiler/forget/src/__tests__/fixtures/hir/ssa-property.expect.md index 1a1e9b4cf4..9b812fa110 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/ssa-property.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/ssa-property.expect.md @@ -15,7 +15,7 @@ function foo() { ```javascript function foo() { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); let x; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { x = []; diff --git a/compiler/forget/src/__tests__/fixtures/hir/ssa-shadowing.expect.md b/compiler/forget/src/__tests__/fixtures/hir/ssa-shadowing.expect.md index baf5937428..dc47c50bef 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/ssa-shadowing.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/ssa-shadowing.expect.md @@ -23,7 +23,7 @@ function Foo(cond) { function log() {} function Foo(cond) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const str = ""; const c_0 = $[0] !== cond; let str$0; diff --git a/compiler/forget/src/__tests__/fixtures/hir/ssa-while.expect.md b/compiler/forget/src/__tests__/fixtures/hir/ssa-while.expect.md index 4df32596fb..09fa47953e 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/ssa-while.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/ssa-while.expect.md @@ -17,7 +17,7 @@ function foo() { ```javascript function foo() { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); let x; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { x = 1; diff --git a/compiler/forget/src/__tests__/fixtures/hir/store-via-call.expect.md b/compiler/forget/src/__tests__/fixtures/hir/store-via-call.expect.md index 6fd054bc21..34d27836a6 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/store-via-call.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/store-via-call.expect.md @@ -15,7 +15,7 @@ function foo() { ```javascript function foo() { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); let x; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { x = {}; diff --git a/compiler/forget/src/__tests__/fixtures/hir/store-via-new.expect.md b/compiler/forget/src/__tests__/fixtures/hir/store-via-new.expect.md index 011d021b2e..d3cc3f6ad6 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/store-via-new.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/store-via-new.expect.md @@ -15,7 +15,7 @@ function Foo() { ```javascript function Foo() { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); let x; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { x = {}; diff --git a/compiler/forget/src/__tests__/fixtures/hir/switch-non-final-default.expect.md b/compiler/forget/src/__tests__/fixtures/hir/switch-non-final-default.expect.md index 8731df2ab8..9ddb49f74d 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/switch-non-final-default.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/switch-non-final-default.expect.md @@ -32,7 +32,7 @@ function Component(props) { ```javascript function Component(props) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== props.p0; const c_1 = $[1] !== props.p2; let x; diff --git a/compiler/forget/src/__tests__/fixtures/hir/switch.expect.md b/compiler/forget/src/__tests__/fixtures/hir/switch.expect.md index 1e3006dbf2..fa5f40ea80 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/switch.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/switch.expect.md @@ -27,7 +27,7 @@ function Component(props) { ```javascript function Component(props) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== props.p0; const c_1 = $[1] !== props.p2; const c_2 = $[2] !== props.p3; diff --git a/compiler/forget/src/__tests__/fixtures/hir/tagged-template-literal.expect.md b/compiler/forget/src/__tests__/fixtures/hir/tagged-template-literal.expect.md index e7bc33037c..455bdf784e 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/tagged-template-literal.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/tagged-template-literal.expect.md @@ -25,7 +25,7 @@ function component() { ```javascript function component() { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); let t; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { t = graphql` diff --git a/compiler/forget/src/__tests__/fixtures/hir/template-literal.expect.md b/compiler/forget/src/__tests__/fixtures/hir/template-literal.expect.md index ee74cfccdd..97ee8ca1f4 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/template-literal.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/template-literal.expect.md @@ -25,7 +25,7 @@ function componentA(props) { } function componentB(props) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const t0 = `hello ${props.a}`; const c_0 = $[0] !== t0; let x; diff --git a/compiler/forget/src/__tests__/fixtures/hir/ternary-expression.expect.md b/compiler/forget/src/__tests__/fixtures/hir/ternary-expression.expect.md index f5814bafb9..d8d1853188 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/ternary-expression.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/ternary-expression.expect.md @@ -14,7 +14,7 @@ function ternary(props) { ```javascript function ternary(props) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== props; let t0; if (c_0) { diff --git a/compiler/forget/src/__tests__/fixtures/hir/type-binary-operator.expect.md b/compiler/forget/src/__tests__/fixtures/hir/type-binary-operator.expect.md index 8c07bc201b..ebc64f4305 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/type-binary-operator.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/type-binary-operator.expect.md @@ -16,7 +16,7 @@ function component() { ```javascript function component() { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); let a; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { a = some(); diff --git a/compiler/forget/src/__tests__/fixtures/hir/type-cast-expression.flow.expect.md b/compiler/forget/src/__tests__/fixtures/hir/type-cast-expression.flow.expect.md index 3e69909675..4d5dfa311c 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/type-cast-expression.flow.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/type-cast-expression.flow.expect.md @@ -19,7 +19,7 @@ function Component(props) { // @flow type Foo = { bar: string }; function Component(props) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== props.bar; let y; if (c_0) { diff --git a/compiler/forget/src/__tests__/fixtures/hir/type-field-load.expect.md b/compiler/forget/src/__tests__/fixtures/hir/type-field-load.expect.md index f5fa3a7b5a..336b9a084c 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/type-field-load.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/type-field-load.expect.md @@ -14,7 +14,7 @@ function component() { ```javascript function component() { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); let x; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { x = { t: 1 }; diff --git a/compiler/forget/src/__tests__/fixtures/hir/type-test-field-load-binary-op.expect.md b/compiler/forget/src/__tests__/fixtures/hir/type-test-field-load-binary-op.expect.md index 1c6354d7dd..fee7f84e29 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/type-test-field-load-binary-op.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/type-test-field-load-binary-op.expect.md @@ -20,7 +20,7 @@ function component() { ```javascript function component() { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); let t0; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { t0 = makeSomePrimitive(); diff --git a/compiler/forget/src/__tests__/fixtures/hir/type-test-field-store.expect.md b/compiler/forget/src/__tests__/fixtures/hir/type-test-field-store.expect.md index 70854ce4a1..424395cc32 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/type-test-field-store.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/type-test-field-store.expect.md @@ -16,7 +16,7 @@ function component() { ```javascript function component() { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); let x; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { x = {}; diff --git a/compiler/forget/src/__tests__/fixtures/hir/type-test-polymorphic.expect.md b/compiler/forget/src/__tests__/fixtures/hir/type-test-polymorphic.expect.md index 5e2703a7bc..1203ea2b9d 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/type-test-polymorphic.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/type-test-polymorphic.expect.md @@ -23,7 +23,7 @@ function component() { ```javascript function component() { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); let p; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { p = makePrimitive(); diff --git a/compiler/forget/src/__tests__/fixtures/hir/type-test-return-type-inference.expect.md b/compiler/forget/src/__tests__/fixtures/hir/type-test-return-type-inference.expect.md index 6f193b80d5..ddf76938f4 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/type-test-return-type-inference.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/type-test-return-type-inference.expect.md @@ -19,7 +19,7 @@ function component() { ```javascript function component() { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); let x; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { x = foo(); diff --git a/compiler/forget/src/__tests__/fixtures/hir/unary-expr.expect.md b/compiler/forget/src/__tests__/fixtures/hir/unary-expr.expect.md index 0f26f4d4fa..34092e0f62 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/unary-expr.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/unary-expr.expect.md @@ -20,7 +20,7 @@ function component(a) { ```javascript function component(a) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== a; let t; if (c_0) { diff --git a/compiler/forget/src/__tests__/fixtures/hir/update-expression.expect.md b/compiler/forget/src/__tests__/fixtures/hir/update-expression.expect.md index 5f90acd09d..5e02eb14ff 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/update-expression.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/update-expression.expect.md @@ -15,7 +15,7 @@ function foo(props) { ```javascript function foo(props) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const x = props.x; const x$0 = x + 1; const y = x$0; diff --git a/compiler/forget/src/__tests__/fixtures/hir/while-property.expect.md b/compiler/forget/src/__tests__/fixtures/hir/while-property.expect.md index 5e52a42d7c..2db378b8a1 100644 --- a/compiler/forget/src/__tests__/fixtures/hir/while-property.expect.md +++ b/compiler/forget/src/__tests__/fixtures/hir/while-property.expect.md @@ -16,7 +16,7 @@ function foo(a, b) { ```javascript function foo(a, b) { - const $ = React.useMemoCache(); + const $ = React.unstable_useMemoCache(); const c_0 = $[0] !== a.b.c; const c_1 = $[1] !== b; let x;