← facebook/react

CODEFOSSIL · react

runWithEnvironment

function in compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Pipeline.ts:148 · Born 2023-10-03 (DERIVED, confidence 1.00)

3years old
113changes
6fixes
13authors
1caller
2024202520262023-10-03 3489055 [be] Improve feature flags setup2023-10-05 80d867d Promote inlineUseMemo to stable (remove flag)2023-10-09 74c6c99 [be] s/DropUseMemo/DropManualMemoization/2023-10-09 444a1ad Reorder InlineUseMemo after type inference2023-10-09 428c475 Generalize InlineUseMemo to inline IIFEs2023-10-09 529568c [be] Rename InlineUseMemo imports2023-10-12 87b1549 Improve MergeConsecutiveScopes2023-11-02 d5c3fb8 HIR-based reactive identifier analysis2023-11-06 0d3f388 Fix for IIFE return values mutated later2023-11-06 35fee31 Handle IIFE with logical mutated later2023-11-06 c424cbb Add validation against instructions not part of their scope2023-11-12 f47685c [be] Flag and test for unexpected exceptions during compilations2023-11-27 d7db416 [RFC] useEffect dependency memoization check2023-12-04 0c0bedd New approach to hook validation2023-12-05 37e1975 [be] Move codegen logic Program.ts -> Codegen2023-12-11 b339129 🌲 Separate pass for lowering reactive scopes2023-12-11 9be2efd 🌲 Create scopes for primitive operations2023-12-12 12de013 [patch] ObjectMethods should have the same scope as their parent ObjectExpressions2023-12-16 af1aa8d Validation that useMemo/useCallback is preserved in the output2023-12-16 c77acb3 Separate mode to validate preserving manual memoization2023-12-20 4c68da2 Todo for early return within reactive scopes2024-01-03 7ca3b00 Early branch with new type inference foundation2024-02-09 6da1912 Validate that all variable references are consistently local/context2024-02-14 6dae958 [be] Extract computeUnconditionalBlocks() helper2024-02-14 5f1b8fd Improve validateNoRefAccessInRender2024-02-14 bde30f0 [be] Remove ValidateFrozenLambdas2024-02-14 6924786 [be] Change validate functions to not return unnecessary Result2024-02-14 a927040 Add an optional validation to bail out on capitalized function calls2024-02-14 09d122a [be] Remove @enableMergeConsecutiveScopes flag, feature is stable2024-02-28 a06ded9 [other] Change instrumentation to use an optional gating identifier; record filepath2024-03-06 f4455ef Prune scopes whose deps always invalidate2024-03-06 8faed2a Avoid conflicting names for reactive scope codegen2024-03-06 ebbada3 MemoizeFbtOperandsInSameScope operates on HIR2024-03-13 79e3fc0 Fix for method call not memoizing in same scope as outer call2024-03-14 1b5ae06 Fix block scoping of declarations with early return2024-03-20 b35779c [logger] Add CompilerDiagnostic category, thread Logger into environment2024-04-01 b00300c Remove disableAllMemoization flag2024-04-02 8b9edaf Support use operator2024-04-08 f4fbeb8 HIR-based AlignReactiveScopesToBlockScopes2024-04-09 f707cb5 HIR-based MergeOverlappingScopes2024-04-23 d87ba1b [be] Stabilize block ids2024-04-23 40474b8 [HIR] Naive implementation of pruneUnusedLabels in HIR2024-04-23 10e11c4 [HIR] Assert program blocks and scopes are properly nested2024-04-26 a44559b [hir] Re-implement mergeOverlappingReactiveScopes (+ bugfix)2024-04-29 2b2d305 [hir] Rewrite buildReactiveBlocks -> buildReactiveScopeTerminalsHIR2024-04-29 18f4a38 [hir-rewrite] Remove breaks to HIR ScopeTerminal after converting to reactiveFunction IR2024-05-31 28fe581 [compiler] Option for preserving calls to useMemo/useCallback2024-05-31 8b01a2e [compiler] Option to always take the non-memo branch2024-05-31 5c420e3 [compiler] Debug tool to emit change detection code rather than memoization2024-05-31 c69211a [compiler] Prune dependencies that are only used by useRef or useState2024-06-11 43c17d1 [compiler] HIR-based FlattenReactiveLoops2024-06-11 b5b9daa [compiler] HIR-based FlattenScopesWithHooksOrUse2024-06-14 59e73d9 [compiler] Instruction reordering2024-06-17 dbc5f36 [compiler] Support method-call version of macro functions2024-06-25 7d9861e [compiler][hir] Correctly remove non-existent terminal preds when pruning labels2024-06-26 4c9a2d2 [compiler] Validate against locals being reassigned after render2024-07-17 9d7f02d [compiler] General-purpose function outlining2024-07-18 b2ec044 [compiler][patch] Don't wrap non-ascii fbt operands in JSXExpressionContainer2024-07-18 fd2b3e1 Compiler: unfork prettier config (#30205)2024-08-02 3af905d [compiler] Fix issue with macro arguments being outlined2024-08-06 3d61b9b [compiler] Stay in SSA form through entire pipeline2024-08-07 e948a5a [compiler] Add lowerContextAccess pass2024-08-08 83cc13f [compiler] Rewrite useContext callee2024-08-12 d50e024 [compiler] Promote temporaries when necessary to prevent codegen reordering over side-effectful operations2024-08-15 c39da3e [compiler] Off-by-default validation against setState directly in passive effect2024-08-19 d2413bf [compiler] Validate against JSX in try statements2024-09-06 43264a6 [compiler][cleanup] Remove unused enableReactiveScopesInHIR flag2024-09-12 206df66 [compiler][rewrite] PropagateScopeDeps hir rewrite2024-09-18 5dcb009 [compiler] Add JSX inlining optimization (#30867)2024-09-19 632f88d [compiler] Allow ReactElement symbol to be configured when inlining jsx (#30996)2024-10-17 c91b3b0 JSX Outlining (#30956)2024-11-06 fd018af [compiler] Delete propagateScopeDeps (non-hir) (#31199)2024-11-22 e697386 [compiler] First cut at dep inference (#31386)2024-11-22 2a9f4c0 [compiler] Infer deps configuration (#31616)2024-12-14 a1b3bd0 Optimize method calls w props receiver (#31775)2024-12-16 e30872a [compiler][be] Playground now compiles entire program (#31774)2024-12-16 d325f87 [compiler][be] Logger based debug printing in test runner (#31809)2024-12-20 03297e0 [compiler] transform fire calls (#31796)2025-01-17 7f3826e [compiler] validation against calling impure functions (#31960)2025-01-31 152bfe3 [compiler][rfc] Hacky retry pipeline for fire (#32164)2025-03-13 7939d92 [compiler] clean up retry pipeline: `fireRetry` flag -> compileMode (#32511)2025-03-20 5f4c5c9 [compiler] Validate static components2025-03-20 e3c0642 [compiler] Refactor validations to return Result and log where appropriate2025-04-24 71d0896 [forgive] Log inferEffectDependencies (#32996)2025-05-03 0db8db1 [compiler] Validate against mutable functions being frozen2025-06-18 66cfe04 [compiler] New mutability/aliasing model (#33494)2025-07-24 6f4294a [compiler] Validate against setState in all effect types (#33753)2025-07-28 c60eebf [compiler] Add new ValidateNoVoidUseMemo pass (#33990)2025-07-28 b5c1637 [compiler] Reuse DropManualMemoization for ValidateNoVoidUseMemo (#34001)2025-08-04 d3b26b2 [compiler] rebase #32285 (#34102)2025-08-04 7deda94 [compiler] Delete PropagatePhiTypes (#34107)2025-08-15 eaf6adb [compiler][wip] Remove old mutation/aliasing implementation (#34028)2025-09-09 a9410fb [compiler] Option to infer names for anonymous functions (#34410)2025-09-09 665de2e [compiler] Improve name hints for outlined functions (#34434)2025-09-10 835b009 [compiler] Allow setStates in use{Layout,Insertion}Effect where the set value is derived from a ref (#34462)2025-10-23 09056ab [Compiler] Improve error for calculate in render useEffect validation (#34580)2025-11-10 7296120 [compiler] Update ValidateNoDerivedComputationsInEffects_exp to log the error instead of throwing (#34972)2025-11-11 5e94655 [compiler] _exp version of ValidateNoDerivedComputationsInEffects take precedence over stable version when enabled (#35099)2025-11-13 3a495ae [compiler] source location validator (#35109)2025-11-20 4cf770d [compiler][poc] Quick experiment with SSR-optimization pass (#35102)2025-11-20 50e7ec8 [compiler] Deprecate noEmit, add outputMode (#35112)2025-11-21 bcc3fd8 [compiler] Implement exhaustive dependency checking for manual memoization (#34394)2025-11-24 9599e7a [compiler] Adjustments to exhaustive deps messages, disable the lint rule (#35192)2025-12-08 ec9cc00 [compiler][poc] Reuse ValidateExhaustiveDeps for effect dep validation (#35285)2025-12-12 38a6f4e [compiler] Only run validations with env.logErrors on outputMode: 'lint' (#35216)2026-02-20 b16b768 [compiler] Feature flag cleanup (#35825)2026-02-23 426a394 [compiler] Phase 2+7: Wrap pipeline passes in tryRecord for fault tolerance (#35874)2026-02-23 e3e5d95 [compiler] Phase 4 (batch 1): Update validation passes to record errors on env (#35875)2026-02-24 9b2d801 [compiler] Phase 4 (batch 2), 5, 6: Update remaining passes for fault tolerance (#35876)2026-02-24 d6558f3 [compiler] Phase 3: Make lower() always produce HIRFunction (#35878)2026-02-24 8a33fb3 [compiler] Cleanup: consistent tryRecord() wrapping and error recording (#35880)2026-02-24 9075330 [compiler] Remove tryRecord, add catch-all error handling, fix remaining throws (#35881)2026-06-09 03e7755 [compiler] Port React Compiler to Rust (#36173)2023-10-03 9fc5e55 [be] Access all features flags through Environment
Every commit that changed it, 2023-10-03 – 2026-06-09. Raised orange dots are fixes.
  1. Changed [compiler] Port React Compiler to Rust (#36173)

    03e7755 · Joseph Savona

  2. Changed [compiler] Remove tryRecord, add catch-all error handling, fix remaining throws (#35881)

    9075330 · Joseph Savona fix · INFERRED

  3. Changed [compiler] Cleanup: consistent tryRecord() wrapping and error recording (#35880)

    8a33fb3 · Joseph Savona

  4. Changed [compiler] Phase 3: Make lower() always produce HIRFunction (#35878)

    d6558f3 · Joseph Savona

  5. Changed [compiler] Phase 4 (batch 2), 5, 6: Update remaining passes for fault tolerance (#35876)

    9b2d801 · Joseph Savona

  6. Changed [compiler] Phase 4 (batch 1): Update validation passes to record errors on env (#35875)

    e3e5d95 · Joseph Savona

  7. Changed [compiler] Phase 2+7: Wrap pipeline passes in tryRecord for fault tolerance (#35874)

    426a394 · Joseph Savona

  8. Changed [compiler] Feature flag cleanup (#35825)

    b16b768 · Joseph Savona

  9. Changed [compiler] Only run validations with env.logErrors on outputMode: 'lint' (#35216)

    38a6f4e · Jorge Cabiedes

  10. Changed [compiler][poc] Reuse ValidateExhaustiveDeps for effect dep validation (#35285)

    ec9cc00 · Joseph Savona

  11. Changed [compiler] Adjustments to exhaustive deps messages, disable the lint rule (#35192)

    9599e7a · Joseph Savona

  12. Changed [compiler] Implement exhaustive dependency checking for manual memoization (#34394)

    bcc3fd8 · Joseph Savona

  13. Changed [compiler] Deprecate noEmit, add outputMode (#35112)

    50e7ec8 · Joseph Savona

  14. Changed [compiler][poc] Quick experiment with SSR-optimization pass (#35102)

    4cf770d · Joseph Savona

  15. Changed [compiler] source location validator (#35109)

    3a495ae · Nathan

  16. Changed [compiler] _exp version of ValidateNoDerivedComputationsInEffects take precedence over stable version when enabled (#35099)

    5e94655 · Jorge Cabiedes

  17. Changed [compiler] Update ValidateNoDerivedComputationsInEffects_exp to log the error instead of throwing (#34972)

    7296120 · Jorge Cabiedes

  18. Changed [Compiler] Improve error for calculate in render useEffect validation (#34580)

    09056ab · Jorge Cabiedes

  19. Changed [compiler] Allow setStates in use{Layout,Insertion}Effect where the set value is derived from a ref (#34462)

    835b009 · lauren

  20. Changed [compiler] Improve name hints for outlined functions (#34434)

    665de2e · Joseph Savona

  21. Changed [compiler] Option to infer names for anonymous functions (#34410)

    a9410fb · Joseph Savona

  22. Changed [compiler][wip] Remove old mutation/aliasing implementation (#34028)

    eaf6adb · Joseph Savona

  23. Changed [compiler] Delete PropagatePhiTypes (#34107)

    7deda94 · Joseph Savona

  24. Changed [compiler] rebase #32285 (#34102)

    d3b26b2 · Joseph Savona

  25. Changed [compiler] Reuse DropManualMemoization for ValidateNoVoidUseMemo (#34001)

    b5c1637 · lauren

  26. Changed [compiler] Add new ValidateNoVoidUseMemo pass (#33990)

    c60eebf · lauren

  27. Changed [compiler] Validate against setState in all effect types (#33753)

    6f4294a · Joseph Savona

  28. Changed [compiler] New mutability/aliasing model (#33494)

    66cfe04 · Joseph Savona

  29. Changed [compiler] Validate against mutable functions being frozen

    0db8db1 · Joe Savona

  30. Changed [forgive] Log inferEffectDependencies (#32996)

    71d0896 · lauren

  31. Changed [compiler] Refactor validations to return Result and log where appropriate

    e3c0642 · Joe Savona

  32. Changed [compiler] Validate static components

    5f4c5c9 · Joe Savona

  33. Changed [compiler] clean up retry pipeline: `fireRetry` flag -> compileMode (#32511)

    7939d92 · mofeiZ

  34. Changed [compiler][rfc] Hacky retry pipeline for fire (#32164)

    152bfe3 · mofeiZ

  35. Changed [compiler] validation against calling impure functions (#31960)

    7f3826e · Joseph Savona

  36. Changed [compiler] transform fire calls (#31796)

    03297e0 · Jordan Brown

  37. Changed [compiler][be] Logger based debug printing in test runner (#31809)

    d325f87 · mofeiZ

  38. Changed [compiler][be] Playground now compiles entire program (#31774)

    e30872a · mofeiZ

  39. Changed Optimize method calls w props receiver (#31775)

    a1b3bd0 · Joseph Savona

  40. Changed [compiler] Infer deps configuration (#31616)

    2a9f4c0 · Jordan Brown

  41. Changed [compiler] First cut at dep inference (#31386)

    e697386 · Jordan Brown

  42. Changed [compiler] Delete propagateScopeDeps (non-hir) (#31199)

    fd018af · mofeiZ

  43. Changed JSX Outlining (#30956)

    c91b3b0 · Sathya Gunasekaran

  44. Changed [compiler] Allow ReactElement symbol to be configured when inlining jsx (#30996)

    632f88d · Jack Pope

  45. Changed [compiler] Add JSX inlining optimization (#30867)

    5dcb009 · Jack Pope

  46. Changed [compiler][rewrite] PropagateScopeDeps hir rewrite

    206df66 · Mofei Zhang

  47. Changed [compiler][cleanup] Remove unused enableReactiveScopesInHIR flag

    43264a6 · Mofei Zhang

  48. Changed [compiler] Validate against JSX in try statements

    d2413bf · Joe Savona

  49. Changed [compiler] Off-by-default validation against setState directly in passive effect

    c39da3e · Joe Savona

  50. Changed [compiler] Promote temporaries when necessary to prevent codegen reordering over side-effectful operations

    d50e024 · Mike Vitousek

  51. Changed [compiler] Rewrite useContext callee

    83cc13f · Sathya Gunsasekaran

  52. Changed [compiler] Add lowerContextAccess pass

    e948a5a · Sathya Gunsasekaran

  53. Changed [compiler] Stay in SSA form through entire pipeline

    3d61b9b · Joe Savona

  54. Changed [compiler] Fix issue with macro arguments being outlined

    3af905d · Mike Vitousek fix · INFERRED

  55. Changed Compiler: unfork prettier config (#30205)

    fd2b3e1 · Jan Kassens

  56. Changed [compiler][patch] Don't wrap non-ascii fbt operands in JSXExpressionContainer

    b2ec044 · Mofei Zhang

  57. Changed [compiler] General-purpose function outlining

    9d7f02d · Joe Savona

  58. Changed [compiler] Validate against locals being reassigned after render

    4c9a2d2 · Joe Savona

  59. Changed [compiler][hir] Correctly remove non-existent terminal preds when pruning labels

    7d9861e · Mofei Zhang

  60. Changed [compiler] Support method-call version of macro functions

    dbc5f36 · Joe Savona

  61. Changed [compiler] Instruction reordering

    59e73d9 · Joe Savona

  62. Changed [compiler] HIR-based FlattenScopesWithHooksOrUse

    b5b9daa · Joe Savona

  63. Changed [compiler] HIR-based FlattenReactiveLoops

    43c17d1 · Joe Savona

  64. Changed [compiler] Prune dependencies that are only used by useRef or useState

    c69211a · Mike Vitousek

  65. Changed [compiler] Debug tool to emit change detection code rather than memoization

    5c420e3 · Mike Vitousek

  66. Changed [compiler] Option to always take the non-memo branch

    8b01a2e · Mike Vitousek

  67. Changed [compiler] Option for preserving calls to useMemo/useCallback

    28fe581 · Mike Vitousek

  68. Changed [hir-rewrite] Remove breaks to HIR ScopeTerminal after converting to reactiveFunction IR

    18f4a38 · Mofei Zhang

  69. Changed [hir] Rewrite buildReactiveBlocks -> buildReactiveScopeTerminalsHIR

    2b2d305 · Mofei Zhang

  70. Changed [hir] Re-implement mergeOverlappingReactiveScopes (+ bugfix)

    a44559b · Mofei Zhang fix · INFERRED

  71. Changed [HIR] Assert program blocks and scopes are properly nested

    10e11c4 · Mofei Zhang

  72. Changed [HIR] Naive implementation of pruneUnusedLabels in HIR

    40474b8 · Mofei Zhang

  73. Changed [be] Stabilize block ids

    d87ba1b · Mofei Zhang

  74. Changed HIR-based MergeOverlappingScopes

    f707cb5 · Joe Savona

  75. Changed HIR-based AlignReactiveScopesToBlockScopes

    f4fbeb8 · Joe Savona

  76. Changed Support use operator

    8b9edaf · Joe Savona

  77. Changed Remove disableAllMemoization flag

    b00300c · Joe Savona

  78. Changed [logger] Add CompilerDiagnostic category, thread Logger into environment

    b35779c · Mofei Zhang

  79. Changed Fix block scoping of declarations with early return

    1b5ae06 · Joe Savona fix · INFERRED

  80. Changed Fix for method call not memoizing in same scope as outer call

    79e3fc0 · Joe Savona fix · INFERRED

  81. Changed MemoizeFbtOperandsInSameScope operates on HIR

    ebbada3 · Joe Savona

  82. Changed Avoid conflicting names for reactive scope codegen

    8faed2a · Joe Savona

  83. Changed Prune scopes whose deps always invalidate

    f4455ef · Joe Savona

  84. Changed [other] Change instrumentation to use an optional gating identifier; record filepath

    a06ded9 · Mofei Zhang

  85. Changed [be] Remove @enableMergeConsecutiveScopes flag, feature is stable

    09d122a · Joe Savona

  86. Changed Add an optional validation to bail out on capitalized function calls

    a927040 · Jordan Brown

  87. Changed [be] Change validate functions to not return unnecessary Result

    6924786 · Joe Savona

  88. Changed [be] Remove ValidateFrozenLambdas

    bde30f0 · Joe Savona

  89. Changed Improve validateNoRefAccessInRender

    5f1b8fd · Joe Savona

  90. Changed [be] Extract computeUnconditionalBlocks() helper

    6dae958 · Joe Savona

  91. Changed Validate that all variable references are consistently local/context

    6da1912 · Joe Savona

  92. Changed Early branch with new type inference foundation

    7ca3b00 · Joe Savona

  93. Changed Todo for early return within reactive scopes

    4c68da2 · Joe Savona

  94. Changed Separate mode to validate preserving manual memoization

    c77acb3 · Joe Savona

  95. Changed Validation that useMemo/useCallback is preserved in the output

    af1aa8d · Joe Savona

  96. Changed [patch] ObjectMethods should have the same scope as their parent ObjectExpressions

    12de013 · Mofei Zhang

  97. Changed 🌲 Create scopes for primitive operations

    9be2efd · Joe Savona

  98. Changed 🌲 Separate pass for lowering reactive scopes

    b339129 · Joe Savona

  99. Changed [be] Move codegen logic Program.ts -> Codegen

    37e1975 · Mofei Zhang

  100. Changed New approach to hook validation

    0c0bedd · Joe Savona

  101. Changed [RFC] useEffect dependency memoization check

    d7db416 · Joe Savona

  102. Changed [be] Flag and test for unexpected exceptions during compilations

    f47685c · Mofei Zhang

  103. Changed Add validation against instructions not part of their scope

    c424cbb · Joe Savona

  104. Changed Handle IIFE with logical mutated later

    35fee31 · Joe Savona

  105. Changed Fix for IIFE return values mutated later

    0d3f388 · Joe Savona fix · INFERRED

  106. Changed HIR-based reactive identifier analysis

    d5c3fb8 · Joe Savona

  107. Changed Improve MergeConsecutiveScopes

    87b1549 · Joe Savona

  108. Changed [be] Rename InlineUseMemo imports

    529568c · Joe Savona

  109. Changed Generalize InlineUseMemo to inline IIFEs

    428c475 · Joe Savona

  110. Changed Reorder InlineUseMemo after type inference

    444a1ad · Joe Savona

  111. Changed [be] s/DropUseMemo/DropManualMemoization/

    74c6c99 · Joe Savona

  112. Changed Promote inlineUseMemo to stable (remove flag)

    80d867d · Joe Savona

  113. Changed [be] Improve feature flags setup

    3489055 · Joe Savona

  114. Born [be] Access all features flags through Environment

    9fc5e55 · Joe Savona