GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [compiler][rewrite] PropagateScopeDeps hir rewrite · react/react@206df66

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • compiler/packages
    • babel-plugin-react-compiler/src
      • Entrypoint
        • Pipeline.ts
      • HIR
        • CollectHoistablePropertyLoads.ts
        • DeriveMinimalDependenciesHIR.ts
        • PropagateScopeDependenciesHIR.ts
        • visitors.ts
      • ReactiveScopes
        • InferReactiveScopeVariables.ts
      • Utils
        • utils.ts
      • __tests__/fixtures/compiler
        • destructure-array-declaration-to-context-var.expect.md
        • destructure-array-declaration-to-context-var.js
        • evaluation-order-mutate-call-after-dependency-load.expect.md
        • evaluation-order-mutate-call-after-dependency-load.ts
        • evaluation-order-mutate-store-after-dependency-load.expect.md
        • evaluation-order-mutate-store-after-dependency-load.ts
        • functionexpr-conditional-access-2.expect.md
        • functionexpr-conditional-access-2.tsx
        • functionexpr–conditional-access.expect.md
        • functionexpr–conditional-access.js
        • propagate-scope-deps-hir-fork
          • error.todo-optional-member-expression-as-memo-dep.expect.md
          • error.todo-optional-member-expression-as-memo-dep.js
          • error.todo-optional-member-expression-single-with-unconditional.expect.md
          • error.todo-optional-member-expression-single-with-unconditional.js
          • error.todo-optional-member-expression-single.expect.md
          • error.todo-optional-member-expression-single.js
          • error.todo-optional-member-expression-with-conditional-optional.expect.md
          • error.todo-optional-member-expression-with-conditional-optional.js
          • error.todo-optional-member-expression-with-conditional.expect.md
          • error.todo-optional-member-expression-with-conditional.js
          • optional-member-expression-as-memo-dep.expect.md
          • optional-member-expression-single-with-unconditional.expect.md
          • optional-member-expression-single.expect.md
          • optional-member-expression-with-conditional-optional.expect.md
          • optional-member-expression-with-conditional.expect.md
          • reduce-reactive-deps
            • conditional-member-expr.expect.md
            • join-uncond-scopes-cond-deps.expect.md
            • memberexpr-join-optional-chain.expect.md
            • memberexpr-join-optional-chain2.expect.md
            • promote-uncond.expect.md
          • repro-scope-missing-mutable-range.expect.md
          • ssa-cascading-eliminated-phis.expect.md
          • ssa-leave-case.expect.md
          • ssa-renaming-ternary-destruction-with-mutation.expect.md
          • ssa-renaming-ternary-destruction.expect.md
          • ssa-renaming-ternary-with-mutation.expect.md
          • ssa-renaming-ternary.expect.md
          • ssa-renaming-unconditional-ternary-with-mutation.expect.md
          • ssa-renaming-unconditional-ternary.expect.md
          • ssa-renaming-via-destructuring-with-mutation.expect.md
          • ssa-renaming-with-mutation.expect.md
          • switch-non-final-default.expect.md
          • switch.expect.md
          • try-catch-mutate-outer-value.expect.md
          • try-catch-try-value-modified-in-catch-escaping.expect.md
          • try-catch-try-value-modified-in-catch.expect.md
          • useMemo-multiple-if-else.expect.md
        • reduce-reactive-deps
          • hoist-deps-diff-ssa-instance.expect.md
          • hoist-deps-diff-ssa-instance.tsx
          • hoist-deps-diff-ssa-instance1.expect.md
          • hoist-deps-diff-ssa-instance1.tsx
          • todo-merge-ssa-phi-access-nodes.expect.md
          • todo-merge-ssa-phi-access-nodes.ts
          • uncond-access-in-mutable-range.expect.md
          • uncond-access-in-mutable-range.js
        • todo-global-load-cached.expect.md
        • todo-global-load-cached.tsx
        • todo-global-property-load-cached.expect.md
        • todo-global-property-load-cached.tsx
    • snap/src/sprout
      • shared-runtime.ts

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Pipeline.ts‎

Copy file name to clipboardExpand all lines: compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Pipeline.ts
+17-6Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ import {propagatePhiTypes} from '../TypeInference/PropagatePhiTypes';
101101
import {lowerContextAccess} from '../Optimization/LowerContextAccess';
102102
import {validateNoSetStateInPassiveEffects} from '../Validation/ValidateNoSetStateInPassiveEffects';
103103
import {validateNoJSXInTryStatement} from '../Validation/ValidateNoJSXInTryStatement';
104+
import {propagateScopeDependenciesHIR} from '../HIR/PropagateScopeDependenciesHIR';
104105

105106
export type CompilerPipelineValue =
106107
| {kind: 'ast'; name: string; value: CodegenFunction}
@@ -341,6 +342,14 @@ function* runWithEnvironment(
341342
});
342343
assertTerminalSuccessorsExist(hir);
343344
assertTerminalPredsExist(hir);
345+
if (env.config.enablePropagateDepsInHIR) {
346+
propagateScopeDependenciesHIR(hir);
347+
yield log({
348+
kind: 'hir',
349+
name: 'PropagateScopeDependenciesHIR',
350+
value: hir,
351+
});
352+
}
344353

345354
const reactiveFunction = buildReactiveFunction(hir);
346355
yield log({
@@ -359,12 +368,14 @@ function* runWithEnvironment(
359368
});
360369
assertScopeInstructionsWithinScopes(reactiveFunction);
361370

362-
propagateScopeDependencies(reactiveFunction);
363-
yield log({
364-
kind: 'reactive',
365-
name: 'PropagateScopeDependencies',
366-
value: reactiveFunction,
367-
});
371+
if (!env.config.enablePropagateDepsInHIR) {
372+
propagateScopeDependencies(reactiveFunction);
373+
yield log({
374+
kind: 'reactive',
375+
name: 'PropagateScopeDependencies',
376+
value: reactiveFunction,
377+
});
378+
}
368379

369380
pruneNonEscapingScopes(reactiveFunction);
370381
yield log({

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.