HIR — react Architecture
The logic for lowering Babel AST to a proprietary intermediate representation.
Entity Profile
Dependency Diagram
graph TD subdomain_MIRInfrastructure_HIR["HIR"] 58f81300_7c82_5086_3e10_e46b5f3ab04d["ObjectShape.ts"] subdomain_MIRInfrastructure_HIR --> 58f81300_7c82_5086_3e10_e46b5f3ab04d 38c44267_cdd2_9815_ebad_fa6761ba5934["Globals.ts"] subdomain_MIRInfrastructure_HIR --> 38c44267_cdd2_9815_ebad_fa6761ba5934 2f3caf55_cc64_415c_55dd_9771ba7dc210["visitors.ts"] subdomain_MIRInfrastructure_HIR --> 2f3caf55_cc64_415c_55dd_9771ba7dc210 5dff208f_71b7_72c1_b78a_03be9b621b2a["AssertValidBlockNesting.ts"] subdomain_MIRInfrastructure_HIR --> 5dff208f_71b7_72c1_b78a_03be9b621b2a 5e35ae0f_bcda_75e5_55c4_a894ff043a95["TypeSchema.ts"] subdomain_MIRInfrastructure_HIR --> 5e35ae0f_bcda_75e5_55c4_a894ff043a95 35147ed6_ce97_e85f_570c_faf2d25f42f4["InferTypes.ts"] subdomain_MIRInfrastructure_HIR --> 35147ed6_ce97_e85f_570c_faf2d25f42f4 0c7e53f1_4ebc_f3be_54f8_05e81729a4e9["DefaultModuleTypeProvider.ts"] subdomain_MIRInfrastructure_HIR --> 0c7e53f1_4ebc_f3be_54f8_05e81729a4e9 6976a9ee_9d8e_4f16_3016_495f39aff2fd["PrintHIR.ts"] subdomain_MIRInfrastructure_HIR --> 6976a9ee_9d8e_4f16_3016_495f39aff2fd 010bd3a7_d091_50ea_4e1f_20541d841f85["MergeConsecutiveBlocks.ts"] subdomain_MIRInfrastructure_HIR --> 010bd3a7_d091_50ea_4e1f_20541d841f85 18a78965_f593_105b_e5e8_07001321c2ec["HIR.ts"] subdomain_MIRInfrastructure_HIR --> 18a78965_f593_105b_e5e8_07001321c2ec 53e05ed1_ffb1_8db2_8573_ef5a3fb99c72["CollectHoistablePropertyLoads.ts"] subdomain_MIRInfrastructure_HIR --> 53e05ed1_ffb1_8db2_8573_ef5a3fb99c72 c0d1dc03_8683_01ed_b02a_b10aae366514["ComputeUnconditionalBlocks.ts"] subdomain_MIRInfrastructure_HIR --> c0d1dc03_8683_01ed_b02a_b10aae366514 76832af2_c0a7_f31c_e448_af5664da4b88["PropagateScopeDependenciesHIR.ts"] subdomain_MIRInfrastructure_HIR --> 76832af2_c0a7_f31c_e448_af5664da4b88 a4fd6965_224d_0ddc_a6f9_b2f74cfd3994["ScopeDependencyUtils.ts"] subdomain_MIRInfrastructure_HIR --> a4fd6965_224d_0ddc_a6f9_b2f74cfd3994 style subdomain_MIRInfrastructure_HIR fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Domain
Functions
- DefaultNonmutatingHook()
- InstrumentationSchema()
- LifetimeIdSchema()
- ObjectPropertiesSchema()
- _shrink()
- _staticInvariantInstructionValueHasLocation()
- _staticInvariantReactiveTerminalHasInstructionId()
- _staticInvariantReactiveTerminalHasLocation()
- _staticInvariantTerminalHasFallthrough()
- _staticInvariantTerminalHasInstructionId()
- _staticInvariantTerminalHasLocation()
- addDependency()
- addFunction()
- addHoistedIdentifier()
- addHook()
- addObject()
- addPhi()
- addShape()
- apply()
- areEqualPaths()
- assertConsistentIdentifiers()
- assertNonNull()
- assertTerminalPredsExist()
- assertTerminalSuccessorsExist()
- assertValidBlockNesting()
- assertValidMutableRanges()
- bindVariableTo()
- bindings()
- buf()
- build()
- buildDependencyInstructions()
- buildGraph()
- buildReactiveScopeTerminalsHIR()
- buildReverseGraph()
- buildTemporaryPlace()
- captureScopes()
- clonePlaceToTemporary()
- collectDependencies()
- collectHoistablePropertyLoads()
- collectHoistablePropertyLoadsImpl()
- collectHoistablePropertyLoadsInInnerFn()
- collectMinimalDependenciesInSubtree()
- collectNonNullsInBlocks()
- collectOptionalChainSidemap()
- collectScopeInfo()
- collectTemporariesSidemap()
- collectTemporariesSidemapImpl()
- complete()
- computeDominatorTree()
- computeImmediateDominators()
- computePostDominatorTree()
- computeUnconditionalBlocks()
- constructor()
- constructor()
- constructor()
- constructor()
- constructor()
- constructor()
- constructor()
- constructor()
- context()
- convertHoistedLValueKind()
- createAnonId()
- createTemporaryPlace()
- currentBlockKind()
- currentScope()
- currentScope()
- debug()
- debug()
- debug()
- declare()
- defaultModuleTypeProvider()
- defineContext()
- defineFunction()
- definePlace()
- deriveMinimalDependencies()
- doesPatternContainSpreadElement()
- eachCallArgument()
- eachInstructionLValue()
- eachInstructionLValueWithKind()
- eachInstructionOperand()
- eachInstructionValueLValue()
- eachInstructionValueOperand()
- eachPatternItem()
- eachPatternOperand()
- eachTerminalOperand()
- eachTerminalSuccessor()
- eliminateRedundantPhi()
- enableDropManualMemoization()
- enableMemoization()
- enableValidations()
- enter()
- enter()
- enterInnerFn()
- enterReserved()
- enterSSA()
- enterSSAImpl()
- enterScope()
- enterTryCatch()
- entry()
- environment()
- equation()
- evaluatesToStableTypeOrContainer()
- exit()
- exitScope()
- findContextIdentifiers()
- findTemporariesUsedOutsideDeclaringScope()
- fixIncompletePhis()
- fixScopeAndIdentifierRanges()
- forkTemporaryIdentifier()
- gatherCapturedContext()
- generate()
- generateGloballyUniqueIdentifierName()
- generateInstructionTypes()
- get()
- get()
- get()
- get()
- getAssumedInvokedFunctions()
- getFallthroughPropertyType()
- getFunctionName()
- getFunctionSignature()
- getGlobalDeclaration()
- getHookKind()
- getHookKindForType()
- getIdAt()
- getLoadKind()
- getMaybeNonNullInInstruction()
- getName()
- getOrCreateIdentifier()
- getOrCreateProperty()
- getOrCreatePropertyEntry()
- getOutlinedFunctions()
- getOverlappingReactiveScopes()
- getPlace()
- getPlaceScope()
- getProperty()
- getPropertyType()
- getReanimatedModuleType()
- getReversePostorderedBlocks()
- getScopes()
- getStoreKind()
- getTargetIfIndirection()
- handleAssignment()
- handleIdentifier()
- handleInstruction()
- handleRewrite()
- hasDeclared()
- identifier()
- inferTypes()
- installTypeConfig()
- intersect()
- isArrayType()
- isContextIdentifier()
- isContextIdentifier()
- isDeferredDependency()
- isDependency()
- isDispatcherType()
- isEffectEventFunctionType()
- isExpressionBlockKind()
- isFireFunctionType()
- isHoistedIdentifier()
- isHookName()
- isImmutableAtInstr()
- isJsxType()
- isLoadContextMutable()
- isMapType()
- isMutable()
- isMutableEffect()
- isObjectMethodType()
- isObjectType()
- isOptional()
- isPlainObjectType()
- isPrimitiveBinaryOp()
- isPrimitiveType()
- isPromotedJsxTemporary()
- isPromotedTemporary()
- isPropsType()
- isRefLikeName()
- isRefOrRefLikeMutableType()
- isRefOrRefValue()
- isRefValueType()
- isReorderableExpression()
- isScopeActive()
- isScopeActive()
- isSetActionStateType()
- isSetOptimisticType()
- isSetStateType()
- isSetType()
- isStableType()
- isStableTypeContainer()
- isStartTransitionType()
- isStatementBlockKind()
- isSubPath()
- isSubPathIgnoringOptionals()
- isUseActionStateType()
- isUseContextHookType()
- isUseEffectEventType()
- isUseEffectHookType()
- isUseInsertionEffectHookType()
- isUseLayoutEffectHookType()
- isUseOperator()
- isUseOptimisticType()
- isUseReducerType()
- isUseRefType()
- isUseStateType()
- isUsedOutsideDeclaringScope()
- keyByScopeId()
- label()
- logErrors()
- lookupBreak()
- lookupContinue()
- loop()
- lower()
- lowerArguments()
- lowerAssignment()
- lowerExpression()
- lowerExpressionToTemporary()
- lowerFunction()
- lowerFunctionToValue()
- lowerIdentifier()
- lowerIdentifierForAssignment()
- lowerJsxElement()
- lowerJsxElementName()
- lowerJsxMemberExpression()
- lowerMemberExpression()
- lowerObjectMethod()
- lowerObjectPropertyKey()
- lowerOptionalCallExpression()
- lowerOptionalMemberExpression()
- lowerReorderableExpression()
- lowerStatement()
- lowerType()
- lowerValueToTemporary()
- makeBlockId()
- makeDeclarationId()
- makeId()
- makeIdentifierId()
- makeIdentifierName()
- makeInstructionId()
- makeOrMergeProperty()
- makePropertyLiteral()
- makeScopeId()
- makeTemporary()
- makeTemporaryIdentifier()
- mapCallArguments()
- mapInstructionLValues()
- mapInstructionOperands()
- mapInstructionValueOperands()
- mapPatternOperands()
- mapTerminalOperands()
- mapTerminalSuccessors()
- markInstructionIds()
- markPredecessors()
- matchOptionalTestBlock()
- maybeDependency()
- merge()
- merge()
- mergeConsecutiveBlocks()
- mergeOverlappingReactiveScopesHIR()
- moduleName()
- newBlock()
- nextBlockId()
- nextIdentifierId()
- nextIdentifierId()
- nextScopeId()
- nextSsaId()
- no_op()
- nonNull()
- notNull()
- occursCheck()
- outlineFunction()
- parseAliasingSignatureConfig()
- parseEnvironmentConfig()
- path()
- print()
- printAliases()
- printAliasingEffect()
- printAliasingSignature()
- printDeps()
- printFunction()
- printFunctionType()
- printFunctionWithOutlined()
- printHIR()
- printHole()
- printIdentifier()
- printInstruction()
- printInstructionValue()
- printLValue()
- printManualMemoDependency()
- printMixedHIR()
- printMutableRange()
- printName()
- printObjectPropertyKey()
- printPattern()
- printPhi()
- printPlace()
- printPlaceForAliasEffect()
- printScope()
- printSourceLocation()
- printSourceLocationLine()
- printSubtree()
- printTerminal()
- printType()
- promoteTemporary()
- promoteTemporaryJsxTag()
- propagateNonNull()
- propagateScopeDependenciesHIR()
- pruneUnusedLabelsHIR()
- push()
- pushEndScopeTerminal()
- pushStartScopeTerminal()
- rangePreOrderComparator()
- recordScopes()
- recursivelyTraverseItems()
- reduceMaybeOptionalChains()
- removeDeadDoWhileStatements()
- removeUnnecessaryTryCatch()
- removeUnreachableForUpdates()
- reserve()
- resolveBinding()
- resolveIdentifier()
- resolveThrowHandler()
- reversePostorderBlocks()
- rewriteInstructionKindsBasedOnReassignment()
- rewritePlace()
- scope()
- scope()
- setName()
- signatureArgument()
- startBlock()
- state()
- switch()
- terminalFallthrough()
- terminalHasFallthrough()
- terminate()
- terminateWithContinuation()
- traverseFunction()
- traverseOptionalBlock()
- trimJsxText()
- tryParseExternalFunction()
- tryResolveType()
- tryUnionTypes()
- typeContext()
- unify()
- validate()
- validateEnvironmentConfig()
- validateIdentifierName()
- validateMutableRange()
- visit()
- visitDependency()
- visitInstructionId()
- visitOperand()
- visitPlace()
- visitProperty()
- visitReassignment()
- withFunctionScope.enter()
- withFunctionScope.exit()
- writeNonOptionalDependency()
- writeOptionalDependency()
Source Files
- compiler/packages/babel-plugin-react-compiler/src/HIR/AssertConsistentIdentifiers.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/AssertTerminalBlocksExist.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/AssertValidBlockNesting.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/AssertValidMutableRanges.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/BuildHIR.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/BuildReactiveScopeTerminalsHIR.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/CollectHoistablePropertyLoads.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/CollectOptionalChainDependencies.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/ComputeUnconditionalBlocks.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/DefaultModuleTypeProvider.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/DeriveMinimalDependenciesHIR.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/Dominator.ts
- compiler/packages/babel-plugin-react-compiler/src/SSA/EliminateRedundantPhi.ts
- compiler/packages/babel-plugin-react-compiler/src/SSA/EnterSSA.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/Environment.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/FindContextIdentifiers.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/Globals.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/HIR.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/HIRBuilder.ts
- compiler/packages/babel-plugin-react-compiler/src/TypeInference/InferTypes.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/MergeConsecutiveBlocks.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/MergeOverlappingReactiveScopesHIR.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/ObjectShape.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/PrintHIR.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/PropagateScopeDependenciesHIR.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/PruneUnusedLabelsHIR.ts
- compiler/packages/babel-plugin-react-compiler/src/SSA/RewriteInstructionKindsBasedOnReassignment.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/ScopeDependencyUtils.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/TypeSchema.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/visitors.ts
Source
- compiler/packages/babel-plugin-react-compiler/src/HIR/AssertConsistentIdentifiers.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/AssertTerminalBlocksExist.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/AssertValidBlockNesting.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/AssertValidMutableRanges.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/BuildHIR.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/BuildReactiveScopeTerminalsHIR.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/CollectHoistablePropertyLoads.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/CollectOptionalChainDependencies.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/ComputeUnconditionalBlocks.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/DefaultModuleTypeProvider.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/DeriveMinimalDependenciesHIR.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/Dominator.ts
- compiler/packages/babel-plugin-react-compiler/src/SSA/EliminateRedundantPhi.ts
- compiler/packages/babel-plugin-react-compiler/src/SSA/EnterSSA.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/Environment.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/FindContextIdentifiers.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/Globals.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/HIR.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/HIRBuilder.ts
- compiler/packages/babel-plugin-react-compiler/src/TypeInference/InferTypes.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/MergeConsecutiveBlocks.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/MergeOverlappingReactiveScopesHIR.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/ObjectShape.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/PrintHIR.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/PropagateScopeDependenciesHIR.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/PruneUnusedLabelsHIR.ts
- compiler/packages/babel-plugin-react-compiler/src/SSA/RewriteInstructionKindsBasedOnReassignment.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/ScopeDependencyUtils.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/TypeSchema.ts
- compiler/packages/babel-plugin-react-compiler/src/HIR/visitors.ts
Frequently Asked Questions
What is the HIR subdomain?
HIR is a subdomain in the react codebase, part of the MIRInfrastructure domain. The logic for lowering Babel AST to a proprietary intermediate representation. It contains 30 source files.
Which domain does HIR belong to?
HIR belongs to the MIRInfrastructure domain.
What functions are in HIR?
The HIR subdomain contains 360 function(s): DefaultNonmutatingHook, InstrumentationSchema, LifetimeIdSchema, ObjectPropertiesSchema, _shrink, _staticInvariantInstructionValueHasLocation, _staticInvariantReactiveTerminalHasInstructionId, _staticInvariantReactiveTerminalHasLocation, and 352 more.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free