@@ -101,6 +101,7 @@ import {propagatePhiTypes} from '../TypeInference/PropagatePhiTypes';
101101import { lowerContextAccess } from '../Optimization/LowerContextAccess' ;
102102import { validateNoSetStateInPassiveEffects } from '../Validation/ValidateNoSetStateInPassiveEffects' ;
103103import { validateNoJSXInTryStatement } from '../Validation/ValidateNoJSXInTryStatement' ;
104+ import { propagateScopeDependenciesHIR } from '../HIR/PropagateScopeDependenciesHIR' ;
104105
105106export 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