From 904ea6c9e44a276a43462b591f2be43dfe6d2658 Mon Sep 17 00:00:00 2001 From: Mofei Zhang Date: Mon, 14 Aug 2023 19:26:02 -0400 Subject: [PATCH] [sprout] codemod for tests that can be run out of the box --- .../compiler/alias-nested-member-path.expect.md | 10 ++++++++++ .../fixtures/compiler/alias-nested-member-path.js | 5 +++++ ...ssignment-variations-complex-lvalue-array.expect.md | 10 ++++++++++ .../assignment-variations-complex-lvalue-array.js | 5 +++++ .../assignment-variations-complex-lvalue.expect.md | 10 ++++++++++ .../compiler/assignment-variations-complex-lvalue.js | 5 +++++ .../fixtures/compiler/assignment-variations.expect.md | 10 ++++++++++ .../fixtures/compiler/assignment-variations.js | 5 +++++ .../compiler/chained-assignment-expressions.expect.md | 10 ++++++++++ .../compiler/chained-assignment-expressions.js | 5 +++++ .../compiler/computed-call-evaluation-order.expect.md | 10 ++++++++++ .../compiler/computed-call-evaluation-order.js | 5 +++++ ...gation-into-function-expression-primitive.expect.md | 10 ++++++++++ ...t-propagation-into-function-expression-primitive.js | 5 +++++ .../compiler/constant-propagation-for.expect.md | 10 ++++++++++ .../fixtures/compiler/constant-propagation-for.js | 5 +++++ .../compiler/constant-propagation-while.expect.md | 10 ++++++++++ .../fixtures/compiler/constant-propagation-while.js | 5 +++++ .../fixtures/compiler/constant-propagation.expect.md | 10 ++++++++++ .../fixtures/compiler/constant-propagation.js | 5 +++++ .../fixtures/compiler/do-while-continue.expect.md | 10 ++++++++++ .../__tests__/fixtures/compiler/do-while-continue.js | 5 +++++ .../fixtures/compiler/do-while-simple.expect.md | 10 ++++++++++ .../src/__tests__/fixtures/compiler/do-while-simple.js | 5 +++++ .../compiler/expression-with-assignment.expect.md | 10 ++++++++++ .../fixtures/compiler/expression-with-assignment.js | 5 +++++ .../__tests__/fixtures/compiler/for-of-break.expect.md | 10 ++++++++++ .../src/__tests__/fixtures/compiler/for-of-break.js | 5 +++++ .../compiler/for-of-conditional-break.expect.md | 10 ++++++++++ .../fixtures/compiler/for-of-conditional-break.js | 5 +++++ .../fixtures/compiler/for-of-continue.expect.md | 10 ++++++++++ .../src/__tests__/fixtures/compiler/for-of-continue.js | 5 +++++ .../fixtures/compiler/for-of-destructure.expect.md | 10 ++++++++++ .../__tests__/fixtures/compiler/for-of-destructure.js | 5 +++++ .../fixtures/compiler/for-of-simple.expect.md | 10 ++++++++++ .../src/__tests__/fixtures/compiler/for-of-simple.js | 5 +++++ .../compiler/function-declaration-reassign.expect.md | 10 ++++++++++ .../fixtures/compiler/function-declaration-reassign.js | 5 +++++ .../compiler/function-declaration-redeclare.expect.md | 10 ++++++++++ .../compiler/function-declaration-redeclare.js | 5 +++++ .../compiler/lambda-reassign-primitive.expect.md | 10 ++++++++++ .../fixtures/compiler/lambda-reassign-primitive.js | 5 +++++ .../lambda-reassign-shadowed-primitive.expect.md | 10 ++++++++++ .../compiler/lambda-reassign-shadowed-primitive.js | 5 +++++ .../compiler/property-call-evaluation-order.expect.md | 10 ++++++++++ .../compiler/property-call-evaluation-order.js | 5 +++++ .../compiler/reactive-scope-grouping.expect.md | 10 ++++++++++ .../fixtures/compiler/reactive-scope-grouping.js | 5 +++++ ...-constant-progagatable-if-test-conditions.expect.md | 10 ++++++++++ ...ntially-constant-progagatable-if-test-conditions.js | 5 +++++ .../fixtures/compiler/simple-function-1.expect.md | 10 ++++++++++ .../__tests__/fixtures/compiler/simple-function-1.js | 5 +++++ .../compiler/sketchy-code-rules-of-hooks.expect.md | 10 ++++++++++ .../fixtures/compiler/sketchy-code-rules-of-hooks.js | 5 +++++ .../compiler/ssa-complex-multiple-if.expect.md | 10 ++++++++++ .../fixtures/compiler/ssa-complex-multiple-if.js | 5 +++++ .../fixtures/compiler/ssa-complex-single-if.expect.md | 10 ++++++++++ .../fixtures/compiler/ssa-complex-single-if.js | 5 +++++ .../fixtures/compiler/ssa-for-trivial-update.expect.md | 10 ++++++++++ .../fixtures/compiler/ssa-for-trivial-update.js | 5 +++++ .../src/__tests__/fixtures/compiler/ssa-for.expect.md | 10 ++++++++++ .../src/__tests__/fixtures/compiler/ssa-for.js | 5 +++++ .../__tests__/fixtures/compiler/ssa-if-else.expect.md | 10 ++++++++++ .../src/__tests__/fixtures/compiler/ssa-if-else.js | 5 +++++ .../compiler/ssa-objectexpression-phi.expect.md | 10 ++++++++++ .../fixtures/compiler/ssa-objectexpression-phi.js | 5 +++++ .../fixtures/compiler/ssa-property-call.expect.md | 10 ++++++++++ .../__tests__/fixtures/compiler/ssa-property-call.js | 5 +++++ .../__tests__/fixtures/compiler/ssa-property.expect.md | 10 ++++++++++ .../src/__tests__/fixtures/compiler/ssa-property.js | 5 +++++ .../__tests__/fixtures/compiler/ssa-return.expect.md | 10 ++++++++++ .../src/__tests__/fixtures/compiler/ssa-return.js | 5 +++++ .../fixtures/compiler/ssa-simple-phi.expect.md | 10 ++++++++++ .../src/__tests__/fixtures/compiler/ssa-simple-phi.js | 5 +++++ .../__tests__/fixtures/compiler/ssa-simple.expect.md | 10 ++++++++++ .../src/__tests__/fixtures/compiler/ssa-simple.js | 5 +++++ .../fixtures/compiler/ssa-single-if.expect.md | 10 ++++++++++ .../src/__tests__/fixtures/compiler/ssa-single-if.js | 5 +++++ .../__tests__/fixtures/compiler/ssa-switch.expect.md | 10 ++++++++++ .../src/__tests__/fixtures/compiler/ssa-switch.js | 5 +++++ .../__tests__/fixtures/compiler/ssa-throw.expect.md | 10 ++++++++++ .../src/__tests__/fixtures/compiler/ssa-throw.js | 5 +++++ .../fixtures/compiler/ssa-while-no-reassign.expect.md | 10 ++++++++++ .../fixtures/compiler/ssa-while-no-reassign.js | 5 +++++ .../__tests__/fixtures/compiler/ssa-while.expect.md | 10 ++++++++++ .../src/__tests__/fixtures/compiler/ssa-while.js | 5 +++++ .../fixtures/compiler/type-field-load.expect.md | 10 ++++++++++ .../src/__tests__/fixtures/compiler/type-field-load.js | 5 +++++ .../fixtures/compiler/type-test-field-store.expect.md | 10 ++++++++++ .../fixtures/compiler/type-test-field-store.js | 5 +++++ .../fixtures/compiler/type-test-primitive.expect.md | 10 ++++++++++ .../__tests__/fixtures/compiler/type-test-primitive.js | 5 +++++ .../update-expression-constant-propagation.expect.md | 10 ++++++++++ .../compiler/update-expression-constant-propagation.js | 5 +++++ 94 files changed, 705 insertions(+) diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/alias-nested-member-path.expect.md b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/alias-nested-member-path.expect.md index a0f51955f3..dfecd408e3 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/alias-nested-member-path.expect.md +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/alias-nested-member-path.expect.md @@ -11,6 +11,11 @@ function component() { return x; } +export const FIXTURE_ENTRYPOINT = { + fn: component, + params: [], +}; + ``` ## Code @@ -46,5 +51,10 @@ function component() { return x; } +export const FIXTURE_ENTRYPOINT = { + fn: component, + params: [], +}; + ``` \ No newline at end of file diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/alias-nested-member-path.js b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/alias-nested-member-path.js index 11ab613cb7..49477f0934 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/alias-nested-member-path.js +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/alias-nested-member-path.js @@ -6,3 +6,8 @@ function component() { x.y = y; return x; } + +export const FIXTURE_ENTRYPOINT = { + fn: component, + params: [], +}; diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/assignment-variations-complex-lvalue-array.expect.md b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/assignment-variations-complex-lvalue-array.expect.md index b527577e96..1085985008 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/assignment-variations-complex-lvalue-array.expect.md +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/assignment-variations-complex-lvalue-array.expect.md @@ -9,6 +9,11 @@ function foo() { return a; } +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; + ``` ## Code @@ -37,5 +42,10 @@ function foo() { return a; } +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; + ``` \ No newline at end of file diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/assignment-variations-complex-lvalue-array.js b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/assignment-variations-complex-lvalue-array.js index c396f86547..893c573bf5 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/assignment-variations-complex-lvalue-array.js +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/assignment-variations-complex-lvalue-array.js @@ -4,3 +4,8 @@ function foo() { first.set(0, 2); return a; } + +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/assignment-variations-complex-lvalue.expect.md b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/assignment-variations-complex-lvalue.expect.md index 54bf703d34..40f9b3000c 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/assignment-variations-complex-lvalue.expect.md +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/assignment-variations-complex-lvalue.expect.md @@ -9,6 +9,11 @@ function g() { return x; } +export const FIXTURE_ENTRYPOINT = { + fn: g, + params: [], +}; + ``` ## Code @@ -29,5 +34,10 @@ function g() { return x; } +export const FIXTURE_ENTRYPOINT = { + fn: g, + params: [], +}; + ``` \ No newline at end of file diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/assignment-variations-complex-lvalue.js b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/assignment-variations-complex-lvalue.js index 44db6c38f5..2def4218c0 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/assignment-variations-complex-lvalue.js +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/assignment-variations-complex-lvalue.js @@ -4,3 +4,8 @@ function g() { x.y.z *= 2; return x; } + +export const FIXTURE_ENTRYPOINT = { + fn: g, + params: [], +}; diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/assignment-variations.expect.md b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/assignment-variations.expect.md index 466df3ea3b..4c3e3b1e87 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/assignment-variations.expect.md +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/assignment-variations.expect.md @@ -10,6 +10,11 @@ function f() { return x; } +export const FIXTURE_ENTRYPOINT = { + fn: f, + params: [], +}; + ``` ## Code @@ -20,5 +25,10 @@ function f() { return x; } +export const FIXTURE_ENTRYPOINT = { + fn: f, + params: [], +}; + ``` \ No newline at end of file diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/assignment-variations.js b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/assignment-variations.js index af39d33a9b..9a3050a030 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/assignment-variations.js +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/assignment-variations.js @@ -5,3 +5,8 @@ function f() { x >>>= 1; return x; } + +export const FIXTURE_ENTRYPOINT = { + fn: f, + params: [], +}; diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/chained-assignment-expressions.expect.md b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/chained-assignment-expressions.expect.md index 25514aafb1..186f3325f4 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/chained-assignment-expressions.expect.md +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/chained-assignment-expressions.expect.md @@ -11,6 +11,11 @@ function foo() { return z; } +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; + ``` ## Code @@ -33,5 +38,10 @@ function foo() { return z; } +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; + ``` \ No newline at end of file diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/chained-assignment-expressions.js b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/chained-assignment-expressions.js index fb4f27844c..2f5940a6dc 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/chained-assignment-expressions.js +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/chained-assignment-expressions.js @@ -6,3 +6,8 @@ function foo() { z.z += y.y *= x.x &= 3; return z; } + +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/computed-call-evaluation-order.expect.md b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/computed-call-evaluation-order.expect.md index 57e297c305..8eda4bb959 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/computed-call-evaluation-order.expect.md +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/computed-call-evaluation-order.expect.md @@ -17,6 +17,11 @@ function Component() { return x; } +export const FIXTURE_ENTRYPOINT = { + fn: Component, + params: [], +}; + ``` ## Code @@ -56,5 +61,10 @@ function Component() { return x; } +export const FIXTURE_ENTRYPOINT = { + fn: Component, + params: [], +}; + ``` \ No newline at end of file diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/computed-call-evaluation-order.js b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/computed-call-evaluation-order.js index 1d0a31b46c..a1fb4c5114 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/computed-call-evaluation-order.js +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/computed-call-evaluation-order.js @@ -12,3 +12,8 @@ function Component() { ); return x; } + +export const FIXTURE_ENTRYPOINT = { + fn: Component, + params: [], +}; diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/const-propagation-into-function-expression-primitive.expect.md b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/const-propagation-into-function-expression-primitive.expect.md index 3d9988a401..a1820fdf26 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/const-propagation-into-function-expression-primitive.expect.md +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/const-propagation-into-function-expression-primitive.expect.md @@ -11,6 +11,11 @@ function foo() { return x; } +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; + ``` ## Code @@ -25,5 +30,10 @@ function foo() { return 42; } +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; + ``` \ No newline at end of file diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/const-propagation-into-function-expression-primitive.js b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/const-propagation-into-function-expression-primitive.js index c50ddfc6fb..598d90bbbe 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/const-propagation-into-function-expression-primitive.js +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/const-propagation-into-function-expression-primitive.js @@ -6,3 +6,8 @@ function foo() { f(); return x; } + +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/constant-propagation-for.expect.md b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/constant-propagation-for.expect.md index 8da0c3f1e8..d202cc3187 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/constant-propagation-for.expect.md +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/constant-propagation-for.expect.md @@ -10,6 +10,11 @@ function foo() { return y; } +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; + ``` ## Code @@ -23,5 +28,10 @@ function foo() { return y; } +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; + ``` \ No newline at end of file diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/constant-propagation-for.js b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/constant-propagation-for.js index e7822c5c43..70de3520ff 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/constant-propagation-for.js +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/constant-propagation-for.js @@ -5,3 +5,8 @@ function foo() { } return y; } + +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/constant-propagation-while.expect.md b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/constant-propagation-while.expect.md index 38668aa3db..788541ff94 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/constant-propagation-while.expect.md +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/constant-propagation-while.expect.md @@ -11,6 +11,11 @@ function foo() { return y; } +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; + ``` ## Code @@ -24,5 +29,10 @@ function foo() { return y; } +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; + ``` \ No newline at end of file diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/constant-propagation-while.js b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/constant-propagation-while.js index 1a4d3bf6ec..12e0b559f2 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/constant-propagation-while.js +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/constant-propagation-while.js @@ -6,3 +6,8 @@ function foo() { } return y; } + +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/constant-propagation.expect.md b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/constant-propagation.expect.md index e53300ae3a..c71ce9e33a 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/constant-propagation.expect.md +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/constant-propagation.expect.md @@ -21,6 +21,11 @@ function foo() { return j; } +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; + ``` ## Code @@ -31,5 +36,10 @@ function foo() { return -6; } +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; + ``` \ No newline at end of file diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/constant-propagation.js b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/constant-propagation.js index ff370584bd..8dd1726f73 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/constant-propagation.js +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/constant-propagation.js @@ -16,3 +16,8 @@ function foo() { const j = i; return j; } + +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/do-while-continue.expect.md b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/do-while-continue.expect.md index b307020c4d..28b93e915f 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/do-while-continue.expect.md +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/do-while-continue.expect.md @@ -16,6 +16,11 @@ function Component() { return ret; } +export const FIXTURE_ENTRYPOINT = { + fn: Component, + params: [], +}; + ``` ## Code @@ -43,5 +48,10 @@ function Component() { return ret; } +export const FIXTURE_ENTRYPOINT = { + fn: Component, + params: [], +}; + ``` \ No newline at end of file diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/do-while-continue.js b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/do-while-continue.js index a4792f7891..fdf352a7eb 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/do-while-continue.js +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/do-while-continue.js @@ -11,3 +11,8 @@ function Component() { return ret; } + +export const FIXTURE_ENTRYPOINT = { + fn: Component, + params: [], +}; diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/do-while-simple.expect.md b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/do-while-simple.expect.md index 402a072e4b..ef1d8b6247 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/do-while-simple.expect.md +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/do-while-simple.expect.md @@ -12,6 +12,11 @@ function Component() { return ret; } +export const FIXTURE_ENTRYPOINT = { + fn: Component, + params: [], +}; + ``` ## Code @@ -35,5 +40,10 @@ function Component() { return ret; } +export const FIXTURE_ENTRYPOINT = { + fn: Component, + params: [], +}; + ``` \ No newline at end of file diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/do-while-simple.js b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/do-while-simple.js index b1d79aaaf5..9885b92329 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/do-while-simple.js +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/do-while-simple.js @@ -7,3 +7,8 @@ function Component() { } while (x.length); return ret; } + +export const FIXTURE_ENTRYPOINT = { + fn: Component, + params: [], +}; diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/expression-with-assignment.expect.md b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/expression-with-assignment.expect.md index 0f4e095dd0..dc84ec9e60 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/expression-with-assignment.expect.md +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/expression-with-assignment.expect.md @@ -7,6 +7,11 @@ function f() { return x + (x = 2) + x; } +export const FIXTURE_ENTRYPOINT = { + fn: f, + params: [], +}; + ``` ## Code @@ -16,5 +21,10 @@ function f() { return 5; } +export const FIXTURE_ENTRYPOINT = { + fn: f, + params: [], +}; + ``` \ No newline at end of file diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/expression-with-assignment.js b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/expression-with-assignment.js index 5d4ec4c51b..be8eaa1e31 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/expression-with-assignment.js +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/expression-with-assignment.js @@ -2,3 +2,8 @@ function f() { let x = 1; return x + (x = 2) + x; } + +export const FIXTURE_ENTRYPOINT = { + fn: f, + params: [], +}; diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-of-break.expect.md b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-of-break.expect.md index 780bff7a89..e394fe8cac 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-of-break.expect.md +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-of-break.expect.md @@ -10,6 +10,11 @@ function Component() { return x; } +export const FIXTURE_ENTRYPOINT = { + fn: Component, + params: [], +}; + ``` ## Code @@ -32,5 +37,10 @@ function Component() { return x; } +export const FIXTURE_ENTRYPOINT = { + fn: Component, + params: [], +}; + ``` \ No newline at end of file diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-of-break.js b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-of-break.js index 1248bc8306..c681059b66 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-of-break.js +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-of-break.js @@ -5,3 +5,8 @@ function Component() { } return x; } + +export const FIXTURE_ENTRYPOINT = { + fn: Component, + params: [], +}; diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-of-conditional-break.expect.md b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-of-conditional-break.expect.md index 12d43b90e0..1799cc10ec 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-of-conditional-break.expect.md +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-of-conditional-break.expect.md @@ -13,6 +13,11 @@ function Component() { return x; } +export const FIXTURE_ENTRYPOINT = { + fn: Component, + params: [], +}; + ``` ## Code @@ -45,5 +50,10 @@ function Component() { return x; } +export const FIXTURE_ENTRYPOINT = { + fn: Component, + params: [], +}; + ``` \ No newline at end of file diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-of-conditional-break.js b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-of-conditional-break.js index 23ebd337a8..59762fddf7 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-of-conditional-break.js +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-of-conditional-break.js @@ -8,3 +8,8 @@ function Component() { } return x; } + +export const FIXTURE_ENTRYPOINT = { + fn: Component, + params: [], +}; diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-of-continue.expect.md b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-of-continue.expect.md index b8dde87579..cbd2942a23 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-of-continue.expect.md +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-of-continue.expect.md @@ -14,6 +14,11 @@ function Component() { return ret; } +export const FIXTURE_ENTRYPOINT = { + fn: Component, + params: [], +}; + ``` ## Code @@ -47,5 +52,10 @@ function Component() { return ret; } +export const FIXTURE_ENTRYPOINT = { + fn: Component, + params: [], +}; + ``` \ No newline at end of file diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-of-continue.js b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-of-continue.js index 4f5e878ba3..ac8367be32 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-of-continue.js +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-of-continue.js @@ -9,3 +9,8 @@ function Component() { } return ret; } + +export const FIXTURE_ENTRYPOINT = { + fn: Component, + params: [], +}; diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-of-destructure.expect.md b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-of-destructure.expect.md index 4ce2e30843..72d237532d 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-of-destructure.expect.md +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-of-destructure.expect.md @@ -11,6 +11,11 @@ function Component() { return x; } +export const FIXTURE_ENTRYPOINT = { + fn: Component, + params: [], +}; + ``` ## Code @@ -33,5 +38,10 @@ function Component() { return x; } +export const FIXTURE_ENTRYPOINT = { + fn: Component, + params: [], +}; + ``` \ No newline at end of file diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-of-destructure.js b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-of-destructure.js index 480bb662dd..fc9bd8a7ff 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-of-destructure.js +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-of-destructure.js @@ -6,3 +6,8 @@ function Component() { } return x; } + +export const FIXTURE_ENTRYPOINT = { + fn: Component, + params: [], +}; diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-of-simple.expect.md b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-of-simple.expect.md index 65b917f291..d890d2b98c 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-of-simple.expect.md +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-of-simple.expect.md @@ -11,6 +11,11 @@ function Component() { return x; } +export const FIXTURE_ENTRYPOINT = { + fn: Component, + params: [], +}; + ``` ## Code @@ -33,5 +38,10 @@ function Component() { return x; } +export const FIXTURE_ENTRYPOINT = { + fn: Component, + params: [], +}; + ``` \ No newline at end of file diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-of-simple.js b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-of-simple.js index b708b1b3b9..4c8be282d4 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-of-simple.js +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-of-simple.js @@ -6,3 +6,8 @@ function Component() { } return x; } + +export const FIXTURE_ENTRYPOINT = { + fn: Component, + params: [], +}; diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/function-declaration-reassign.expect.md b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/function-declaration-reassign.expect.md index d831c481d0..ccd8937e4f 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/function-declaration-reassign.expect.md +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/function-declaration-reassign.expect.md @@ -10,6 +10,11 @@ function component() { return x; } +export const FIXTURE_ENTRYPOINT = { + fn: component, + params: [], +}; + ``` ## Code @@ -39,5 +44,10 @@ function component() { return x; } +export const FIXTURE_ENTRYPOINT = { + fn: component, + params: [], +}; + ``` \ No newline at end of file diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/function-declaration-reassign.js b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/function-declaration-reassign.js index 92ee854664..d0337328bb 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/function-declaration-reassign.js +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/function-declaration-reassign.js @@ -5,3 +5,8 @@ function component() { x = {}; return x; } + +export const FIXTURE_ENTRYPOINT = { + fn: component, + params: [], +}; diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/function-declaration-redeclare.expect.md b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/function-declaration-redeclare.expect.md index e565bd0cb2..dbd67649fc 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/function-declaration-redeclare.expect.md +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/function-declaration-redeclare.expect.md @@ -10,6 +10,11 @@ function component() { return x; } +export const FIXTURE_ENTRYPOINT = { + fn: component, + params: [], +}; + ``` ## Code @@ -29,5 +34,10 @@ function component() { return x; } +export const FIXTURE_ENTRYPOINT = { + fn: component, + params: [], +}; + ``` \ No newline at end of file diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/function-declaration-redeclare.js b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/function-declaration-redeclare.js index 03ba36473d..e49e795782 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/function-declaration-redeclare.js +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/function-declaration-redeclare.js @@ -5,3 +5,8 @@ function component() { function x() {} return x; } + +export const FIXTURE_ENTRYPOINT = { + fn: component, + params: [], +}; diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/lambda-reassign-primitive.expect.md b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/lambda-reassign-primitive.expect.md index 74b42c7341..60e61d0c06 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/lambda-reassign-primitive.expect.md +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/lambda-reassign-primitive.expect.md @@ -17,6 +17,11 @@ function Component() { return x; } +export const FIXTURE_ENTRYPOINT = { + fn: Component, + params: [], +}; + ``` ## Code @@ -45,5 +50,10 @@ function Component() { return x; } +export const FIXTURE_ENTRYPOINT = { + fn: Component, + params: [], +}; + ``` \ No newline at end of file diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/lambda-reassign-primitive.js b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/lambda-reassign-primitive.js index 824b269bd5..9b96439144 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/lambda-reassign-primitive.js +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/lambda-reassign-primitive.js @@ -12,3 +12,8 @@ function Component() { fn(); return x; } + +export const FIXTURE_ENTRYPOINT = { + fn: Component, + params: [], +}; diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/lambda-reassign-shadowed-primitive.expect.md b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/lambda-reassign-shadowed-primitive.expect.md index a86984ebb3..b18de867b8 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/lambda-reassign-shadowed-primitive.expect.md +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/lambda-reassign-shadowed-primitive.expect.md @@ -14,6 +14,11 @@ function Component() { return x; // should return {} } +export const FIXTURE_ENTRYPOINT = { + fn: Component, + params: [], +}; + ``` ## Code @@ -41,5 +46,10 @@ function Component() { return x; } +export const FIXTURE_ENTRYPOINT = { + fn: Component, + params: [], +}; + ``` \ No newline at end of file diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/lambda-reassign-shadowed-primitive.js b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/lambda-reassign-shadowed-primitive.js index 66edf6b9f3..2113638ae6 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/lambda-reassign-shadowed-primitive.js +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/lambda-reassign-shadowed-primitive.js @@ -9,3 +9,8 @@ function Component() { } return x; // should return {} } + +export const FIXTURE_ENTRYPOINT = { + fn: Component, + params: [], +}; diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/property-call-evaluation-order.expect.md b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/property-call-evaluation-order.expect.md index 7dc1bab2f3..8f3b0ef750 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/property-call-evaluation-order.expect.md +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/property-call-evaluation-order.expect.md @@ -16,6 +16,11 @@ function Component() { return x; } +export const FIXTURE_ENTRYPOINT = { + fn: Component, + params: [], +}; + ``` ## Code @@ -54,5 +59,10 @@ function Component() { return x; } +export const FIXTURE_ENTRYPOINT = { + fn: Component, + params: [], +}; + ``` \ No newline at end of file diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/property-call-evaluation-order.js b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/property-call-evaluation-order.js index 06ac2ee9c9..29b7252c6f 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/property-call-evaluation-order.js +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/property-call-evaluation-order.js @@ -11,3 +11,8 @@ function Component() { (console.log("A"), x).f((changeF(x), console.log("arg"), 1)); return x; } + +export const FIXTURE_ENTRYPOINT = { + fn: Component, + params: [], +}; diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reactive-scope-grouping.expect.md b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reactive-scope-grouping.expect.md index 87a95882dc..0ceab49608 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reactive-scope-grouping.expect.md +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reactive-scope-grouping.expect.md @@ -12,6 +12,11 @@ function foo() { return x; } +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; + ``` ## Code @@ -47,5 +52,10 @@ function foo() { return x; } +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; + ``` \ No newline at end of file diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reactive-scope-grouping.js b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reactive-scope-grouping.js index c87c5f26ff..007880f8f6 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reactive-scope-grouping.js +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reactive-scope-grouping.js @@ -7,3 +7,8 @@ function foo() { return x; } + +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/sequentially-constant-progagatable-if-test-conditions.expect.md b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/sequentially-constant-progagatable-if-test-conditions.expect.md index 1745dbc380..ba65c8c54e 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/sequentially-constant-progagatable-if-test-conditions.expect.md +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/sequentially-constant-progagatable-if-test-conditions.expect.md @@ -37,6 +37,11 @@ function Component() { return e; } +export const FIXTURE_ENTRYPOINT = { + fn: Component, + params: [], +}; + ``` ## Code @@ -46,5 +51,10 @@ function Component() { return "ok"; } +export const FIXTURE_ENTRYPOINT = { + fn: Component, + params: [], +}; + ``` \ No newline at end of file diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/sequentially-constant-progagatable-if-test-conditions.js b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/sequentially-constant-progagatable-if-test-conditions.js index 8b293b8ee5..eb212986ae 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/sequentially-constant-progagatable-if-test-conditions.js +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/sequentially-constant-progagatable-if-test-conditions.js @@ -32,3 +32,8 @@ function Component() { // should constant-propagate to "ok" return e; } + +export const FIXTURE_ENTRYPOINT = { + fn: Component, + params: [], +}; diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/simple-function-1.expect.md b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/simple-function-1.expect.md index ae557115da..851aef74a3 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/simple-function-1.expect.md +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/simple-function-1.expect.md @@ -9,6 +9,11 @@ function component() { return x; } +export const FIXTURE_ENTRYPOINT = { + fn: component, + params: [], +}; + ``` ## Code @@ -30,5 +35,10 @@ function component() { return x; } +export const FIXTURE_ENTRYPOINT = { + fn: component, + params: [], +}; + ``` \ No newline at end of file diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/simple-function-1.js b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/simple-function-1.js index 0bc8c500b0..d9da324938 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/simple-function-1.js +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/simple-function-1.js @@ -4,3 +4,8 @@ function component() { }; return x; } + +export const FIXTURE_ENTRYPOINT = { + fn: component, + params: [], +}; diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/sketchy-code-rules-of-hooks.expect.md b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/sketchy-code-rules-of-hooks.expect.md index 95a5040378..519c715379 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/sketchy-code-rules-of-hooks.expect.md +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/sketchy-code-rules-of-hooks.expect.md @@ -9,6 +9,11 @@ function lowercasecomponent() { } /* eslint-enable react-hooks/rules-of-hooks */ +export const FIXTURE_ENTRYPOINT = { + fn: lowercasecomponent, + params: [], +}; + ``` ## Code @@ -21,5 +26,10 @@ function lowercasecomponent() { } /* eslint-enable react-hooks/rules-of-hooks */ +export const FIXTURE_ENTRYPOINT = { + fn: lowercasecomponent, + params: [], +}; + ``` \ No newline at end of file diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/sketchy-code-rules-of-hooks.js b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/sketchy-code-rules-of-hooks.js index 365284b7b8..06f05f814f 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/sketchy-code-rules-of-hooks.js +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/sketchy-code-rules-of-hooks.js @@ -4,3 +4,8 @@ function lowercasecomponent() { return
{x}
; } /* eslint-enable react-hooks/rules-of-hooks */ + +export const FIXTURE_ENTRYPOINT = { + fn: lowercasecomponent, + params: [], +}; diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-complex-multiple-if.expect.md b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-complex-multiple-if.expect.md index f55c93b742..82262dffae 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-complex-multiple-if.expect.md +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-complex-multiple-if.expect.md @@ -15,6 +15,11 @@ function foo() { y = x; } +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; + ``` ## Code @@ -22,5 +27,10 @@ function foo() { ```javascript function foo() {} +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; + ``` \ No newline at end of file diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-complex-multiple-if.js b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-complex-multiple-if.js index dd6b6753a3..f89b60ea3d 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-complex-multiple-if.js +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-complex-multiple-if.js @@ -10,3 +10,8 @@ function foo() { } y = x; } + +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-complex-single-if.expect.md b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-complex-single-if.expect.md index 8a47245f31..a10d5e2695 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-complex-single-if.expect.md +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-complex-single-if.expect.md @@ -12,6 +12,11 @@ function foo() { y = x; } +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; + ``` ## Code @@ -19,5 +24,10 @@ function foo() { ```javascript function foo() {} +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; + ``` \ No newline at end of file diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-complex-single-if.js b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-complex-single-if.js index 139a937d14..221060a235 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-complex-single-if.js +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-complex-single-if.js @@ -7,3 +7,8 @@ function foo() { y = x; } + +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-for-trivial-update.expect.md b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-for-trivial-update.expect.md index add2bb00dd..f8d29f1073 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-for-trivial-update.expect.md +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-for-trivial-update.expect.md @@ -10,6 +10,11 @@ function foo() { return x; } +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; + ``` ## Code @@ -23,5 +28,10 @@ function foo() { return x; } +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; + ``` \ No newline at end of file diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-for-trivial-update.js b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-for-trivial-update.js index ec6ed5cc75..1bb42b3d6e 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-for-trivial-update.js +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-for-trivial-update.js @@ -5,3 +5,8 @@ function foo() { } return x; } + +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-for.expect.md b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-for.expect.md index 1d26a18fdc..68a4055c4c 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-for.expect.md +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-for.expect.md @@ -10,6 +10,11 @@ function foo() { return x; } +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; + ``` ## Code @@ -23,5 +28,10 @@ function foo() { return x; } +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; + ``` \ No newline at end of file diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-for.js b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-for.js index 14978ef645..c4a4ad0296 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-for.js +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-for.js @@ -5,3 +5,8 @@ function foo() { } return x; } + +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-if-else.expect.md b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-if-else.expect.md index ef6a01f316..d2a198f59f 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-if-else.expect.md +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-if-else.expect.md @@ -13,6 +13,11 @@ function foo() { } } +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; + ``` ## Code @@ -20,5 +25,10 @@ function foo() { ```javascript function foo() {} +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; + ``` \ No newline at end of file diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-if-else.js b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-if-else.js index d5b7bb02ed..87df02956d 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-if-else.js +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-if-else.js @@ -8,3 +8,8 @@ function foo() { let z = x; } } + +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-objectexpression-phi.expect.md b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-objectexpression-phi.expect.md index 42d16b7311..2f8629fadd 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-objectexpression-phi.expect.md +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-objectexpression-phi.expect.md @@ -16,6 +16,11 @@ function foo() { return t; } +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; + ``` ## Code @@ -35,5 +40,10 @@ function foo() { return t; } +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; + ``` \ No newline at end of file diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-objectexpression-phi.js b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-objectexpression-phi.js index a0a481fabd..f5ce3fe344 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-objectexpression-phi.js +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-objectexpression-phi.js @@ -11,3 +11,8 @@ function foo() { let t = { x: x, y: y }; return t; } + +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-property-call.expect.md b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-property-call.expect.md index ef3d869bde..f46ab67551 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-property-call.expect.md +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-property-call.expect.md @@ -9,6 +9,11 @@ function foo() { return y; } +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; + ``` ## Code @@ -29,5 +34,10 @@ function foo() { return y; } +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; + ``` \ No newline at end of file diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-property-call.js b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-property-call.js index d6e956ba32..28e5b769c0 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-property-call.js +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-property-call.js @@ -4,3 +4,8 @@ function foo() { y.x.push([]); return y; } + +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-property.expect.md b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-property.expect.md index 27f8da6d40..7c608196cf 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-property.expect.md +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-property.expect.md @@ -9,6 +9,11 @@ function foo() { return y; } +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; + ``` ## Code @@ -36,5 +41,10 @@ function foo() { return y; } +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; + ``` \ No newline at end of file diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-property.js b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-property.js index 248c6a423e..39d7b2560d 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-property.js +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-property.js @@ -4,3 +4,8 @@ function foo() { y.x = x; return y; } + +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-return.expect.md b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-return.expect.md index d34d459d10..1a223fad8c 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-return.expect.md +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-return.expect.md @@ -11,6 +11,11 @@ function foo() { return x; } +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; + ``` ## Code @@ -20,5 +25,10 @@ function foo() { return 2; } +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; + ``` \ No newline at end of file diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-return.js b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-return.js index 289f0315ac..d9d15b183e 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-return.js +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-return.js @@ -6,3 +6,8 @@ function foo() { return x; } + +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-simple-phi.expect.md b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-simple-phi.expect.md index aee2c34aef..8e4967afe7 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-simple-phi.expect.md +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-simple-phi.expect.md @@ -14,6 +14,11 @@ function foo() { let x = y; } +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; + ``` ## Code @@ -21,5 +26,10 @@ function foo() { ```javascript function foo() {} +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; + ``` \ No newline at end of file diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-simple-phi.js b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-simple-phi.js index 20a8956907..e26ec8f262 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-simple-phi.js +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-simple-phi.js @@ -9,3 +9,8 @@ function foo() { let x = y; } + +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-simple.expect.md b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-simple.expect.md index ac778eaf49..7224f35e54 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-simple.expect.md +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-simple.expect.md @@ -7,6 +7,11 @@ function foo() { let y = 2; } +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; + ``` ## Code @@ -14,5 +19,10 @@ function foo() { ```javascript function foo() {} +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; + ``` \ No newline at end of file diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-simple.js b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-simple.js index 93006f8a8c..445600456c 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-simple.js +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-simple.js @@ -2,3 +2,8 @@ function foo() { let x = 1; let y = 2; } + +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-single-if.expect.md b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-single-if.expect.md index 7e6ec830ec..c47e690a56 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-single-if.expect.md +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-single-if.expect.md @@ -11,6 +11,11 @@ function foo() { } } +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; + ``` ## Code @@ -18,5 +23,10 @@ function foo() { ```javascript function foo() {} +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; + ``` \ No newline at end of file diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-single-if.js b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-single-if.js index 338e04b08c..f97f1d7fe3 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-single-if.js +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-single-if.js @@ -6,3 +6,8 @@ function foo() { let z = x + y; } } + +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-switch.expect.md b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-switch.expect.md index 77c8a658e9..15736d539b 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-switch.expect.md +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-switch.expect.md @@ -22,6 +22,11 @@ function foo() { let y = x; } +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; + ``` ## Code @@ -40,5 +45,10 @@ function foo() { } } +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; + ``` \ No newline at end of file diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-switch.js b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-switch.js index 8c2c030496..a5836d9be4 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-switch.js +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-switch.js @@ -17,3 +17,8 @@ function foo() { let y = x; } + +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-throw.expect.md b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-throw.expect.md index 5698d8ecd8..80b9559aee 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-throw.expect.md +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-throw.expect.md @@ -10,6 +10,11 @@ function foo() { throw x; } +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; + ``` ## Code @@ -19,5 +24,10 @@ function foo() { throw 2; } +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; + ``` \ No newline at end of file diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-throw.js b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-throw.js index c2a382f990..a1d6a885a9 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-throw.js +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-throw.js @@ -5,3 +5,8 @@ function foo() { } throw x; } + +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-while-no-reassign.expect.md b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-while-no-reassign.expect.md index 8a7807a4a5..e6f9e7225b 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-while-no-reassign.expect.md +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-while-no-reassign.expect.md @@ -11,6 +11,11 @@ function foo() { return x; } +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; + ``` ## Code @@ -21,5 +26,10 @@ function foo() { return 1; } +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; + ``` \ No newline at end of file diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-while-no-reassign.js b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-while-no-reassign.js index e0bd40a21e..32990b0d15 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-while-no-reassign.js +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-while-no-reassign.js @@ -6,3 +6,8 @@ function foo() { return x; } + +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-while.expect.md b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-while.expect.md index 8b6a3ca0ed..cea4f0d72a 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-while.expect.md +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-while.expect.md @@ -11,6 +11,11 @@ function foo() { return x; } +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; + ``` ## Code @@ -24,5 +29,10 @@ function foo() { return x; } +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; + ``` \ No newline at end of file diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-while.js b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-while.js index 47397ae648..9b1333a7d1 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-while.js +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/ssa-while.js @@ -6,3 +6,8 @@ function foo() { return x; } + +export const FIXTURE_ENTRYPOINT = { + fn: foo, + params: [], +}; diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/type-field-load.expect.md b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/type-field-load.expect.md index 4099f127f8..fd409da6d2 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/type-field-load.expect.md +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/type-field-load.expect.md @@ -8,6 +8,11 @@ function component() { return p; } +export const FIXTURE_ENTRYPOINT = { + fn: component, + params: [], +}; + ``` ## Code @@ -28,5 +33,10 @@ function component() { return p; } +export const FIXTURE_ENTRYPOINT = { + fn: component, + params: [], +}; + ``` \ No newline at end of file diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/type-field-load.js b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/type-field-load.js index 673f8846fb..b5c56c76dd 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/type-field-load.js +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/type-field-load.js @@ -3,3 +3,8 @@ function component() { let p = x.t; return p; } + +export const FIXTURE_ENTRYPOINT = { + fn: component, + params: [], +}; diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/type-test-field-store.expect.md b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/type-test-field-store.expect.md index 0f9602226f..925d6a5675 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/type-test-field-store.expect.md +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/type-test-field-store.expect.md @@ -10,6 +10,11 @@ function component() { return z; } +export const FIXTURE_ENTRYPOINT = { + fn: component, + params: [], +}; + ``` ## Code @@ -38,5 +43,10 @@ function component() { return z; } +export const FIXTURE_ENTRYPOINT = { + fn: component, + params: [], +}; + ``` \ No newline at end of file diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/type-test-field-store.js b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/type-test-field-store.js index f406104c41..f5381c03ee 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/type-test-field-store.js +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/type-test-field-store.js @@ -5,3 +5,8 @@ function component() { let z = x.t; return z; } + +export const FIXTURE_ENTRYPOINT = { + fn: component, + params: [], +}; diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/type-test-primitive.expect.md b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/type-test-primitive.expect.md index 9b0cb3b544..f0efdfdb13 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/type-test-primitive.expect.md +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/type-test-primitive.expect.md @@ -9,6 +9,11 @@ function component() { return y; } +export const FIXTURE_ENTRYPOINT = { + fn: component, + params: [], +}; + ``` ## Code @@ -18,5 +23,10 @@ function component() { return 2; } +export const FIXTURE_ENTRYPOINT = { + fn: component, + params: [], +}; + ``` \ No newline at end of file diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/type-test-primitive.js b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/type-test-primitive.js index fca923b255..c996440a3d 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/type-test-primitive.js +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/type-test-primitive.js @@ -4,3 +4,8 @@ function component() { return y; } + +export const FIXTURE_ENTRYPOINT = { + fn: component, + params: [], +}; diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/update-expression-constant-propagation.expect.md b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/update-expression-constant-propagation.expect.md index 30a5205fff..0c71d55e2a 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/update-expression-constant-propagation.expect.md +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/update-expression-constant-propagation.expect.md @@ -11,6 +11,11 @@ function Component() { return { a, b, c, d, e }; } +export const FIXTURE_ENTRYPOINT = { + fn: Component, + params: [], +}; + ``` ## Code @@ -29,5 +34,10 @@ function Component() { return t0; } +export const FIXTURE_ENTRYPOINT = { + fn: Component, + params: [], +}; + ``` \ No newline at end of file diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/update-expression-constant-propagation.js b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/update-expression-constant-propagation.js index d863f95f2d..14eab31fe9 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/update-expression-constant-propagation.js +++ b/compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/update-expression-constant-propagation.js @@ -6,3 +6,8 @@ function Component() { const e = --a; return { a, b, c, d, e }; } + +export const FIXTURE_ENTRYPOINT = { + fn: Component, + params: [], +};