#src/ir

    IR2 owns exactly one optimizer body representation: HotFunc.

    #Ownership Rules

    • Boundary decode, encode, validation, printing, and debug-module views stay on raw @lib.Module / @lib.Expr forms.
    • HotFunc is the only owned optimizer body representation.
    • CFG, dominance, post-dominance, liveness, use-def, effects, loop info, and SSA are derived overlays keyed by revision; they do not own bodies.
    • Semantic mutation must go through public hot-IR mutation APIs and must bump revision.
    • There is no compatibility surface for deleted recursive optimizer-body ownership layers.

    #Pass Contract

    • Pipeline shape: lift -> verify -> analyze -> mutate -> verify -> lower.
    • Pass descriptors must declare required analyses and invalidations.
    • Every later IR2 slice follows strict TDD: add/adjust failing tests first, then implement, then rerun moon test.

    #Canonical Docs

    #Module Map

    • architecture.mbt: shared IR2 architecture types that later pass-manager slices build on now, including revision reads and pass-descriptor metadata.
    • bitset.mbt: shared dense UInt64-backed mutable bitsets with strict bounds checks, in-place set algebra, and deterministic set-bit iteration for later dataflow overlays.
    • cfg.mbt: deterministic CFG overlay builder with synthetic entry/exit blocks, explicit edge lists, node and region-root block mappings, structured label-target resolution, and exceptional-exit tracking for later dominator and dataflow slices.
    • cfg_contract.mbt: normative block-boundary, structured-control successor, terminator edge-kind, and exceptional-edge policy helpers so CFG construction and later analyses stop guessing hot-IR control-flow rules.
    • cfg_order.mbt: shared deterministic CFG preorder/postorder/reverse-postorder helpers, reverse-exit traversals, exceptional-edge-inclusive order variants, direct-region block ordering, and worklist seed policy so later analyses stop reimplementing block visitation order and unreachable-block handling.
    • dominators.mbt: reachable-block dominator overlay with immediate dominators, dominator-tree children, dominance frontiers, interval-based dominance queries, and a debug dump surface built over the normal-flow CFG edge policy.
    • effects.mbt: conservative derived effect-mask summaries for nodes, blocks, and regions, combining raw hot flags with exact-instruction refinement, including SIMD memory and string array effects, so passes can ask purity, memory, throw, trap, and state-behavior questions through one shared API.
    • liveness.mbt: locals-only backward dataflow overlay with block live_in / live_out bitsets and direct local liveness queries, using the current non-exceptional CFG edge policy so SSA v1 stays aligned with normal-flow dominance.
    • loop_info.mbt: natural-loop overlay with loop headers, loop bodies, latch sets, exit edges, parent nesting, block depths, block-to-innermost-loop mapping, and a debug dump surface built from CFG plus dominance.
    • postdominators.mbt: reverse-flow post-dominator overlay with explicit normal and exceptional exit roots, immediate post-dominators, post-dominator-tree children, post-dominance frontiers, interval-free post-dominance queries, and a debug dump surface for later control rewrites.
    • analysis_cache.mbt: shared revision-keyed cache entries for CFG, traversal orders, dominators, post-dominators, loop info, use-def, liveness, effects, and local SSA, with typed get_or_build helpers and explicit cache reset for pass pipelines.
    • ssa_policy.mbt: local SSA overlay policy helpers covering SSA value and phi ids, entry-definition origins, overlay-only phi ownership, pruned dominance-frontier phi placement, and the locked rename/destruction/exclusion rules for SSA v1.
    • ssa_local.mbt: local SSA construction overlay with synthetic entry defs, block-entry phi placement/materialization, dominator-tree renaming for LocalGet / LocalSet / LocalTee, predecessor-aligned phi inputs, and direct def/use query helpers for later SSA-assisted rewrites.
    • ssa_destroy.mbt: local SSA destruction helpers that assign concrete locals, insert predecessor copies for block-entry phis, allocate temp locals for cyclic parallel copies, rewrite local ops back to plain hot locals, and drop dead local defs created by destruction.
    • test_helpers.mbt: shared IR2 fixture builders, verify-and-lower assertions, and deterministic CFG / dominance / liveness / SSA dump helpers for adjacent golden tests.
    • use_def.mbt: node-use and locals-only block def/use overlay with distinct root-slot vs child-slot tracking, local read/write node queries, and CFG-ordered per-block summaries for later liveness, DCE, and SSA work.
    • hot_core.mbt: owned dense storage model, storage counters, body-result accessors, and the minimal core debug dump surface. Deleted nodes are tracked as tombstones, and free-list reuse remains disabled for now.
    • hot_flags.mbt: canonical per-op raw flag table plus fast node classification helpers for control, branch, effect, trap, and exceptional-edge queries, including the conservative Heap family contract for GC/reference boundary ops that still preserve exact opcode identity through payload side tables.
    • hot_types.mbt: canonical keyed type interning plus result-arity, result-type, and local-metadata queries for later label, CFG, and SSA slices.
    • hot_labels.mbt: stable label ownership, branch-arity, and control-region slot metadata so later analyses stop decoding control immediates directly.
    • hot_side_tables.mbt: typed side-table alloc/get helpers for const payloads, memargs, branch tables, catches, call signatures, and exact boundary instruction payloads; branch and catch arrays are copied on construction, allocation, and access so retained payload objects cannot mutate cached control flow without a revision bump.
    • hot_builders.mbt: canonical safe node constructors that allocate labels, region wrappers, and side-table payload ids without raw field assembly, including the Heap family helper used for boundary GC/reference instructions.
    • hot_mutate.mbt: canonical root, node, child-span, deletion, and revision-bump mutation helpers so later rewrites stop writing HotFunc storage directly.
    • hot_query.mbt: canonical read-only node-family, exact-instruction, type, branch, simple-value, single-root wrapper, wrapper-body unwrap, single-if, plain-branch arm, trailing-plain-branch split, single-exit arm, holder-block, repeated-root / repeated-child, repeated-wrapper, trailing-payload-split, span, local-metadata, and tombstone queries so analyses and passes stop decoding raw storage layout directly.
    • hot_walk.mbt: stable root, child, subtree, region, control-region, worklist, and rewrite-by-slot traversal helpers with explicit Continue / Skip / Stop / Error control flow.
    • hot_region_edit.mbt: one structured region reference plus root/body/then/else/catch splice helpers so passes can rewrite top-level and nested bodies through one mutation contract.
    • hot_module_context.mbt: shared boundary-module context resolution for function signatures, type-index block results, memories, tables, globals, tags, element segments, data segments, and aggregate field metadata so lift/lower and later analyses stop depending on validator-private lookups.
    • hot_verify.mbt: structured core/control verification plus CFG, dominator, post-dominator, liveness, and SSA hooks plus debug abort helpers so lift/lower and later passes fail fast on corruption.
    • hot_lift.mbt: validator-backed boundary-to-hot lifting for function bodies and module functions, including module-context resolution, label metadata allocation, typed side-table payload preservation, and structured lift errors.
    • hot_lower.mbt: verified hot-to-boundary lowering for function bodies and @lib.Func definitions, including label-depth remapping, exact-instruction recovery, and stack-aware emission for shared branch payload values.
    • hot.mbt: compatibility-free hot-lift/lower façade helpers and glue used by active IR2 consumers.
    • float_compat.mbt: Wasm-compatible float helper surface used by hot lifting/lowering.

    #Split Rule

    The split is now landed, not just planned. Later slices should keep adding focused modules or extending the current focused owners instead of growing hot.mbt back into a monolith. Treat hot.mbt as a compatibility-free facade/glue layer over the focused files above.

    BlockId

    type BlockId = Int

    EffectMask

    type EffectMask = UInt

    LabelId

    type LabelId = Int

    LocalId

    type LocalId = Int

    NodeId

    type NodeId = Int

    PhiId

    type PhiId = Int

    RootId

    type RootId = Int

    SideTableId

    type SideTableId = Int

    SsaValueId

    type SsaValueId = Int

    TypeId

    type TypeId = Int

    Bitset

    pub struct Bitset {
    size : Int
    words : Array[UInt64]
    } derive(Eq,
    Debug
    )

    CfgBlockBoundaryReason

    pub enum CfgBlockBoundaryReason {
    RootEntry
    ControlHeader
    LoopHeader
    BodyRegionEntry
    ThenRegionEntry
    ElseRegionEntry
    CatchRegionEntry
    CatchListRegionEntry
    Terminator
    } derive(Eq,
    Debug
    )

    CfgControlSuccessorPolicy

    pub enum CfgControlSuccessorPolicy {
    InlineBodyRegion
    SplitThenElse
    SplitBodyCatch
    SplitBodyCatchList
    } derive(Eq,
    Debug
    )

    CfgEdge

    pub struct CfgEdge {
    kind : CfgEdgeKind
    block : Int
    } derive(Eq,
    Debug
    )

    impl Show for CfgEdge

    CfgEdgeKind

    pub enum CfgEdgeKind {
    FallthroughEdge
    BranchEdge
    ReturnEdge
    ExceptionalEdge
    UnreachableExitEdge
    } derive(Eq,
    Debug
    )

    impl Show for CfgEdgeKind

    CfgExceptionTargetPolicy

    pub enum CfgExceptionTargetPolicy {
    NoExceptionEdge
    PropagateToCaller
    ToCatchRegion
    ToCatchListRegion
    DelegateToTarget
    } derive(Eq,
    Debug
    )

    CfgRegionRootBlock

    pub struct CfgRegionRootBlock {
    region_holder : Int
    slot : Int
    block : Int
    } derive(Eq,
    Debug
    )

    HotAnalysis

    pub enum HotAnalysis {
    Cfg
    Dominance
    Liveness
    UseDef
    Effects
    LoopInfo
    Ssa
    } derive(Eq,
    Debug
    )

    impl Show for HotAnalysis

    HotAnalysis::cfg

    HotAnalysis::dominance

    fn HotAnalysis::dominance() -> HotAnalysis

    HotAnalysis::effects

    fn HotAnalysis::effects() -> HotAnalysis

    HotAnalysis::liveness

    fn HotAnalysis::liveness() -> HotAnalysis

    HotAnalysis::loop_info

    fn HotAnalysis::loop_info() -> HotAnalysis

    HotAnalysis::ssa

    HotAnalysis::use_def

    fn HotAnalysis::use_def() -> HotAnalysis

    HotAnalysisCache

    pub struct HotAnalysisCache {
    owner_roots : Array[Int]?
    cfg : HotCacheEntry[HotCfg]?
    orders : HotCacheEntry[HotCfgOrders]?
    dom : HotCacheEntry[HotDominators]?
    postdom : HotCacheEntry[HotPostDominators]?
    loop_info : HotCacheEntry[HotLoopInfo]?
    use_def : HotCacheEntry[HotUseDef]?
    liveness : HotCacheEntry[HotLiveness]?
    effects : HotCacheEntry[HotEffectsSummary]?
    ssa : HotCacheEntry[HotLocalSsa]?
    } derive(Eq,
    Debug
    )

    HotAnalysisCache::new

    HotBlockInfo

    pub struct HotBlockInfo {
    id : Int
    nodes : Array[Int]
    preds : Array[CfgEdge]
    succs : Array[CfgEdge]
    is_synthetic : Bool
    region_holder : Int
    start_slot : Int
    end_slot : Int
    } derive(Eq,
    Debug
    )

    HotBranchTable

    pub struct HotBranchTable {
    targets : Array[Int]
    default_target : Int
    } derive(Eq,
    Debug
    )

    HotBranchTable::new

    fn HotBranchTable::new(targets : Array[Int], default_target : Int) -> HotBranchTable

    HotCacheEntry

    pub struct HotCacheEntry[T] {
    built_at_revision : Int
    value : T
    } derive(Eq,
    Debug
    )

    impl Show for HotCacheEntry[T]

    HotCallSig

    impl Show for HotCallSig

    HotCatchArm

    pub enum HotCatchArm {
    CatchArm(
    TagIdx
    , Int)
    CatchRefArm(
    TagIdx
    , Int)
    CatchAllArm(Int)
    CatchAllRefArm(Int)
    } derive(Eq,
    Debug
    )

    impl Show for HotCatchArm

    HotCatchArm::all

    fn HotCatchArm::all(label_id : Int) -> HotCatchArm

    HotCatchArm::all_ref

    fn HotCatchArm::all_ref(label_id : Int) -> HotCatchArm

    HotCatchArm::catch_

    fn HotCatchArm::catch_(tag_idx :
    TagIdx
    , label_id : Int) -> HotCatchArm

    HotCatchArm::catch_ref

    fn HotCatchArm::catch_ref(tag_idx :
    TagIdx
    , label_id : Int) -> HotCatchArm

    HotCatchInfo

    pub struct HotCatchInfo {
    catches : Array[HotCatchArm]
    } derive(Eq,
    Debug
    )

    HotCatchInfo::new

    HotCfg

    pub struct HotCfg {
    operands_expanded : Bool
    blocks : Array[HotBlockInfo]
    node_to_block : Array[Int]
    region_roots : Array[CfgRegionRootBlock]
    entry_block : Int
    exit_block : Int
    exceptional_exit_block : Int?
    } derive(Eq,
    Debug
    )

    impl Show for HotCfg

    HotCfgOrders

    pub struct HotCfgOrders {
    preorder : Array[Int]
    postorder : Array[Int]
    reverse_postorder : Array[Int]
    reverse_postorder_with_exceptions : Array[Int]
    reverse_exit_postorder : Array[Int]
    reverse_exit_postorder_with_exceptions : Array[Int]
    worklist_seed : Array[Int]
    } derive(Eq,
    Debug
    )

    HotChildSpanRewrite

    pub struct HotChildSpanRewrite {
    node_id : Int
    new_children : Array[Int]
    } derive(Eq,
    Debug
    )

    HotChildSpanRewrite::new

    fn HotChildSpanRewrite::new(node_id : Int, new_children : Array[Int]) -> HotChildSpanRewrite

    HotConstPayload

    HotConstPayload::f32_const

    HotConstPayload::f64_const

    HotConstPayload::i32_const

    HotConstPayload::i64_const

    HotConstPayload::ref_null_const

    HotConstPayload::string_const

    fn HotConstPayload::string_const(value : Bytes) -> HotConstPayload

    HotControlRegionRole

    pub enum HotControlRegionRole {
    BodyRegion
    ThenRegion
    ElseRegion
    CatchRegion
    CatchListRegion
    } derive(Eq,
    Debug
    )

    HotControlRegionSlotInfo

    pub struct HotControlRegionSlotInfo {
    slot : Int
    role : HotControlRegionRole
    required : Bool
    } derive(Eq,
    Debug
    )

    HotDominators

    pub struct HotDominators {
    entry_block : Int
    reachable : Bitset
    idoms : Array[Int]
    children : Array[Array[Int]]
    frontiers : Array[Array[Int]]
    dom_preorder : Array[Int]
    dom_postorder : Array[Int]
    } derive(Eq,
    Debug
    )

    HotEffectsSummary

    pub struct HotEffectsSummary {
    node_masks : Array[UInt]
    block_masks : Array[UInt]
    root_region_mask : UInt
    } derive(Eq,
    Debug
    )

    HotFunc

    pub struct HotFunc {
    nodes : Array[HotNode]
    children : Array[Int]
    roots : Array[Int]
    locals : HotLocals
    types : Array[HotTypeInfo]
    type_ids :
    HashMap
    [String, Int]
    value_types : Array[
    ValType
    ]
    value_type_ids : Array[Int]
    block_types : Array[
    BlockType
    ]
    block_type_ids : Array[Int]
    labels : Array[HotLabelInfo]
    consts : Array[HotConstPayload]
    memargs : Array[HotMemArg]
    branch_tables : Array[HotBranchTable]
    catches : Array[HotCatchInfo]
    call_sigs : Array[HotCallSig]
    instr_payloads : Array[HotInstrPayload]
    body_result_type : Int
    func_type_idx :
    TypeIdx
    ?
    free_nodes : Array[Int]
    deleted_nodes : Array[Bool]
    revision : Int
    validation_env :
    Env
    ?
    lifted_local_accesses : HotLiftLocalAccesses?
    }

    HotFunc::new

    fn HotFunc::new(locals? : HotLocals, body_result_type? : Int) -> HotFunc

    HotInstrPayload

    HotLabelInfo

    pub struct HotLabelInfo {
    kind : HotLabelKind
    result_type : Int
    owner : Int
    branch_arity : Int
    } derive(Eq,
    Debug
    )

    HotLabelKind

    pub enum HotLabelKind {
    BlockLabel
    LoopLabel
    IfLabel
    RegionLabel
    TryLabel
    TryTableLabel
    } derive(Eq,
    Debug
    )

    HotLiftError

    pub enum HotLiftError {
    InvalidLabelDepth(Int)
    InvalidFunctionIndex(
    FuncIdx
    )
    MissingFunctionBody(
    FuncIdx
    )
    MissingFunctionType(
    FuncIdx
    )
    InvalidBodyState(String)
    TypecheckFailure(String, String)
    UnsupportedInstruction(String)
    } derive(Eq,
    Debug
    )

    HotLiftLocalAccesses

    pub struct HotLiftLocalAccesses {
    local_count : Int
    gets : Array[(Int, Int)]
    writes : Array[(Int, Int)]
    capture_sources : Array[(Int, Int)]?
    revision : Int
    }

    Source-order local accesses from an unmodified lift. A missing node (-1) denotes a stack-polymorphic instruction with no concrete operand. Synthetic lifetime captures have no source entry. Raw rewriters must use this map, rather than assuming that HOT node order equals raw instruction order.

    HotLiveness

    pub struct HotLiveness {
    include_exceptional_edges : Bool
    live_in_sets : Array[Bitset]
    live_out_sets : Array[Bitset]
    } derive(Eq,
    Debug
    )

    impl Show for HotLiveness

    HotLocalGraph

    pub struct HotLocalGraph {
    local_count : Int
    param_count : Int
    get_source_ids : Array[Array[Int]]
    set_influence_gets : Array[Array[Int]]
    write_local_ids : Array[Int]
    write_is_tees : Array[Bool]
    local_is_already_ssa : Array[Bool]
    local_has_legal_default : Array[Bool]
    } derive(Eq,
    Debug
    )

    HotLocalGraphSource

    pub enum HotLocalGraphSource {
    EntrySource(Int)
    SetSource(Int)
    } derive(Eq,
    Debug
    )

    HotLocalGraphSourceValue

    pub struct HotLocalGraphSourceValue {
    is_entry : Bool
    index : Int
    } derive(Eq,
    Debug
    )

    Scalar source description for allocation-free indexed queries. Entry indices identify locals; other indices identify write nodes. No graph storage or encoded source identity escapes through this value.

    HotLocalReadSources

    pub struct HotLocalReadSources {
    // private fields
    } derive(
    Debug
    )

    Immutable reaching-read sources, without writer influences or SSA facts. A zero source count remains unknown; consumers must keep their fallback.

    HotLocalSsa

    pub struct HotLocalSsa {
    revision : Int
    value_types : Array[
    ValType
    ]
    value_origins : Array[HotSsaValueOrigin]
    phis : Array[HotSsaPhi]
    entry_defs : Array[Int]
    phi_value_ids : Array[Int]
    block_phis : Array[Array[Int]]
    phi_inputs : Array[Array[HotSsaPhiInput]]
    local_get_values : Array[Int]
    local_write_defs : Array[Int]
    value_uses : Array[Array[HotSsaUseOrigin]]
    } derive(Eq,
    Debug
    )

    impl Show for HotLocalSsa

    HotLocalSsa::new

    fn HotLocalSsa::new(revision? : Int, value_types? : Array[
    ValType
    ], value_origins? : Array[HotSsaValueOrigin], phis? : Array[HotSsaPhi], entry_defs? : Array[Int], phi_value_ids? : Array[Int], block_phis? : Array[Array[Int]], phi_inputs? : Array[Array[HotSsaPhiInput]], local_get_values? : Array[Int], local_write_defs? : Array[Int], value_uses? : Array[Array[HotSsaUseOrigin]]) -> HotLocalSsa

    HotLocals

    impl Show for HotLocals

    HotLocals::new

    HotLoopExit

    pub struct HotLoopExit {
    from : Int
    edge : CfgEdge
    } derive(Eq,
    Debug
    )

    impl Show for HotLoopExit

    HotLoopInfo

    pub struct HotLoopInfo {
    loops : Array[HotLoopSummary]
    block_to_loop : Array[Int]
    block_depth : Array[Int]
    } derive(Eq,
    Debug
    )

    impl Show for HotLoopInfo

    HotLoopSummary

    pub struct HotLoopSummary {
    header : Int
    blocks : Array[Int]
    latches : Array[Int]
    exits : Array[HotLoopExit]
    parent : Int
    depth : Int
    } derive(Eq,
    Debug
    )

    HotLowerOptions

    pub struct HotLowerOptions {
    preserve_if_arm_single_nops : Bool
    preserve_dead_local_tee_drops : Bool
    preserve_nontrailing_nops : Bool
    preserve_trailing_nops : Bool
    preserve_typed_loop_const_prefix_spills : Bool
    preserve_flat_ir_spills : Bool
    flatten_unused_result_blocks : Bool
    preserve_struct_set_value_blocks : Bool
    }

    HotLowerOptions::new

    fn HotLowerOptions::new(preserve_if_arm_single_nops? : Bool, preserve_dead_local_tee_drops? : Bool, preserve_nontrailing_nops? : Bool, preserve_trailing_nops? : Bool, preserve_typed_loop_const_prefix_spills? : Bool, preserve_flat_ir_spills? : Bool, flatten_unused_result_blocks? : Bool, preserve_struct_set_value_blocks? : Bool) -> HotLowerOptions

    HotMemArg

    impl Show for HotMemArg

    HotNode

    pub struct HotNode {
    op : HotOp
    ty : Int
    flags : UInt
    order : Int
    imm0 : Int
    imm1 : Int
    child_base : Int
    child_count : Int
    } derive(Eq,
    Debug
    )

    impl Show for HotNode

    HotNodeUseCounts

    pub struct HotNodeUseCounts {
    counts : Array[Int]
    } derive(Eq,
    Debug
    )

    Lightweight exact node-use counts without use-site or local-use allocation.

    HotOp

    pub enum HotOp {
    Nop
    Unreachable
    Block
    Loop
    If
    Try
    TryTable
    Br
    BrIf
    BrTable
    BrOnNull
    BrOnNonNull
    BrOnCast
    BrOnCastFail
    Return
    Call
    CallIndirect
    CallRef
    ReturnCall
    ReturnCallIndirect
    ReturnCallRef
    LocalGet
    LocalSet
    LocalTee
    GlobalGet
    GlobalSet
    Load
    Store
    MemorySize
    MemoryGrow
    MemoryCopy
    MemoryFill
    MemoryInit
    DataDrop
    TableGet
    TableSet
    TableSize
    TableGrow
    TableFill
    TableCopy
    TableInit
    ElemDrop
    Const
    Drop
    Select
    RefNull
    RefIsNull
    RefFunc
    RefGetDesc
    RefTest
    RefCast
    RefTestDesc
    RefCastDescEq
    Heap
    Continuation
    Unary
    Binary
    Compare
    Convert
    TupleMake
    TupleExtract
    StringOp
    Throw
    Rethrow
    ThrowRef
    Delegate
    Catch
    CatchAll
    Atomic
    Simd
    } derive(Eq,
    Debug
    )

    impl Show for HotOp

    HotOp::atomic_op

    fn HotOp::atomic_op() -> HotOp

    HotOp::br_on_cast

    fn HotOp::br_on_cast() -> HotOp

    HotOp::br_on_cast_fail

    fn HotOp::br_on_cast_fail() -> HotOp

    HotOp::br_on_non_null

    fn HotOp::br_on_non_null() -> HotOp

    HotOp::br_on_null

    fn HotOp::br_on_null() -> HotOp

    HotOp::catch_

    fn HotOp::catch_() -> HotOp

    HotOp::catch_all

    fn HotOp::catch_all() -> HotOp

    HotOp::ref_get_desc

    fn HotOp::ref_get_desc() -> HotOp

    HotOp::rethrow

    fn HotOp::rethrow() -> HotOp

    HotPassDescriptor

    pub struct HotPassDescriptor {
    name : String
    requires : Array[HotAnalysis]
    invalidates : Array[HotAnalysis]
    } derive(Eq,
    Debug
    )

    HotPassDescriptor::new

    fn HotPassDescriptor::new(name : String, requires? : Array[HotAnalysis], invalidates? : Array[HotAnalysis]) -> HotPassDescriptor

    HotPostDominators

    pub struct HotPostDominators {
    roots : Array[Int]
    reachable : Bitset
    postdom_sets : Array[Bitset]
    ipdoms : Array[Int]
    children : Array[Array[Int]]
    frontiers : Array[Array[Int]]
    } derive(Eq,
    Debug
    )

    HotRegionRef

    pub struct HotRegionRef {
    holder : Int
    } derive(Eq,
    Debug
    )

    HotRegionRef::root

    HotRewriteCtl

    pub enum HotRewriteCtl[S, E] {
    Same(S)
    Replace(S, Int)
    Remove(S)
    Error(E)
    }

    HotSideTableKind

    pub enum HotSideTableKind {
    ConstPayloadTable
    MemArgTable
    BranchTableTable
    CatchInfoTable
    CallSigTable
    InstrPayloadTable
    } derive(Eq,
    Debug
    )

    HotSimpleValueKey

    pub enum HotSimpleValueKey {
    ConstValue(HotConstPayload)
    LocalGetValue(Int)
    } derive(Eq,
    Debug
    )

    HotSsaConcreteLocals

    pub struct HotSsaConcreteLocals {
    value_locals : Array[Int]
    extra_local_types : Array[
    ValType
    ]
    } derive(Eq,
    Debug
    )

    HotSsaConcreteLocals::new

    fn HotSsaConcreteLocals::new(value_locals? : Array[Int], extra_local_types? : Array[
    ValType
    ]) -> HotSsaConcreteLocals

    HotSsaCopy

    pub struct HotSsaCopy {
    source_local : Int
    target_local : Int
    } derive(Eq,
    Debug
    )

    HotSsaCopy::new

    fn HotSsaCopy::new(source_local : Int, target_local : Int) -> HotSsaCopy

    HotSsaDestroyPolicy

    pub enum HotSsaDestroyPolicy {
    ReusePhiLocals
    } derive(Eq,
    Debug
    )

    HotSsaDestructionPolicy

    pub enum HotSsaDestructionPolicy {
    ParallelCopiesInPredecessors
    } derive(Eq,
    Debug
    )

    HotSsaExcludedFeature

    pub enum HotSsaExcludedFeature {
    ExceptionalEdges
    PersistentHotPhiNodes
    IrOwnedSsaBodies
    NonLocalValues
    } derive(Eq,
    Debug
    )

    HotSsaPendingInsert

    type HotSsaPendingInsert derive(Eq,
    Debug
    )

    HotSsaPhi

    pub struct HotSsaPhi {
    block : Int
    local_id : Int
    } derive(Eq,
    Debug
    )

    impl Show for HotSsaPhi

    HotSsaPhi::new

    fn HotSsaPhi::new(block : Int, local_id : Int) -> HotSsaPhi

    HotSsaPhiInput

    pub struct HotSsaPhiInput {
    predecessor : Int
    value_id : Int
    } derive(Eq,
    Debug
    )

    HotSsaPhiInput::new

    fn HotSsaPhiInput::new(predecessor : Int, value_id : Int) -> HotSsaPhiInput

    HotSsaRegionInsertGroup

    type HotSsaRegionInsertGroup derive(Eq,
    Debug
    )

    HotSsaRenamePolicy

    pub enum HotSsaRenamePolicy {
    DominatorTreeRename
    } derive(Eq,
    Debug
    )

    HotSsaUseOrigin

    pub enum HotSsaUseOrigin {
    LocalGetUse(Int)
    PhiInputUse(Int, Int)
    } derive(Eq,
    Debug
    )

    HotSsaValueOrigin

    pub enum HotSsaValueOrigin {
    EntryParamDef(Int)
    EntryDefaultInitDef(Int)
    LocalSetDef(Int)
    LocalTeeDef(Int)
    PhiDef(Int)
    } derive(Eq,
    Debug
    )

    HotStringBuiltin

    pub enum HotStringBuiltin {
    NewWtf16Array
    } derive(Eq,
    Debug
    )

    HotStringBuiltin::new_wtf16_array

    fn HotStringBuiltin::new_wtf16_array() -> HotStringBuiltin

    HotUseDef

    pub struct HotUseDef {
    node_uses : Array[Array[HotUseSite]]
    block_defs : Array[Bitset]
    block_uses : Array[Bitset]
    local_reads : Array[Array[Int]]
    local_writes : Array[Array[Int]]
    local_write_blocks : Array[Array[Int]]
    } derive(Eq,
    Debug
    )

    HotUseSite

    pub struct HotUseSite {
    user : Int
    slot : Int
    kind : HotUseSlotKind
    } derive(Eq,
    Debug
    )

    impl Show for HotUseSite

    HotUseSlotKind

    pub enum HotUseSlotKind {
    ChildUseSlot
    RootUseSlot
    } derive(Eq,
    Debug
    )

    HotVerifyError

    pub enum HotVerifyError {
    InvalidBodyResultType(Int)
    MissingTypeKey(Int, String)
    MismatchedTypeKey(Int, String, Int)
    InvalidRoot(Int, Int)
    InvalidNodeType(Int, Int)
    InvalidNodeFlags(Int, UInt, UInt)
    InvalidChildSpan(Int, Int, Int)
    InvalidChildRef(Int, Int, Int)
    InvalidLabelResultType(Int, Int)
    InvalidLabelOwner(Int, Int)
    InvalidLabelOwnerKind(Int, HotLabelKind, HotOp)
    InvalidControlLabel(Int, Int)
    InvalidSideTableRef(Int, HotSideTableKind, Int)
    InvalidControlChildCount(Int, Int, Int)
    InvalidControlChild(Int, Int, Int)
    InvalidCatchPayload(Int, String)
    InvalidBranchTarget(Int, Int)
    InvalidBranchArity(Int, Int, Int, Int)
    InvalidCfgEntry(Int)
    InvalidCfgExit(Int)
    InvalidCfgBlockId(Int, Int)
    InvalidCfgEdge(Int, CfgEdge)
    InvalidCfgEdgeSymmetry(Int, CfgEdge)
    InvalidCfgNodeMapping(Int, Int)
    InvalidCfgBlockNode(Int, Int)
    InvalidCfgRegionRoot(Int, Int, Int)
    InvalidCfgShape(String, Int, Int)
    InvalidDomEntry(Int, Int)
    InvalidDomShape(String, Int, Int)
    InvalidDomReachable(Int)
    InvalidDomIdom(Int, Int)
    InvalidDomChild(Int, Int)
    InvalidDomFrontier(Int, Int)
    InvalidSsaRevision(Int, Int)
    InvalidSsaShape(String, Int, Int)
    InvalidSsaValue(Int)
    InvalidSsaPhi(Int)
    InvalidSsaLocal(Int)
    InvalidSsaNode(Int)
    InvalidSsaValueOrigin(Int, HotSsaValueOrigin)
    InvalidSsaPhiInput(Int, Int, Int)
    InvalidSsaPhiAlignment(Int, Int, Int, Int)
    InvalidSsaType(Int,
    ValType
    ,
    ValType
    )
    InvalidSsaUse(Int, HotSsaUseOrigin)
    InvalidSsaDominance(Int, Int, Int)
    InvalidAnalysisOwner
    InvalidAnalysisRevision(HotAnalysis, Int, Int)
    InvalidAnalysisDependency(HotAnalysis, HotAnalysis)
    } derive(Eq,
    Debug
    )

    HotVisitCtl

    pub enum HotVisitCtl[S, E] {
    Continue(S)
    Skip(S)
    Stop(S)
    Error(E)
    }

    IrTestHotFixture

    pub struct IrTestHotFixture {
    mod_ :
    Module

    code_idx : Int
    hot_func : HotFunc
    }

    EFFECT_MASK_ACQUIRE

    let EFFECT_MASK_ACQUIRE : UInt

    EFFECT_MASK_ATOMIC_READ

    let EFFECT_MASK_ATOMIC_READ : UInt

    EFFECT_MASK_ATOMIC_WRITE

    let EFFECT_MASK_ATOMIC_WRITE : UInt

    EFFECT_MASK_CALL

    let EFFECT_MASK_CALL : UInt

    EFFECT_MASK_CONTROL

    let EFFECT_MASK_CONTROL : UInt

    EFFECT_MASK_GLOBAL_STATE

    let EFFECT_MASK_GLOBAL_STATE : UInt

    EFFECT_MASK_LOCAL_STATE

    let EFFECT_MASK_LOCAL_STATE : UInt

    EFFECT_MASK_MEMORY_READ

    let EFFECT_MASK_MEMORY_READ : UInt

    EFFECT_MASK_MEMORY_WRITE

    let EFFECT_MASK_MEMORY_WRITE : UInt

    EFFECT_MASK_RELEASE

    let EFFECT_MASK_RELEASE : UInt

    EFFECT_MASK_SEQ_CST

    let EFFECT_MASK_SEQ_CST : UInt

    EFFECT_MASK_TABLE_READ

    let EFFECT_MASK_TABLE_READ : UInt

    EFFECT_MASK_TABLE_WRITE

    let EFFECT_MASK_TABLE_WRITE : UInt

    EFFECT_MASK_THROW

    let EFFECT_MASK_THROW : UInt

    EFFECT_MASK_TRAP

    let EFFECT_MASK_TRAP : UInt

    HOT_FLAG_BRANCH

    let HOT_FLAG_BRANCH : UInt

    HOT_FLAG_CALL

    let HOT_FLAG_CALL : UInt

    HOT_FLAG_CONTROL

    let HOT_FLAG_CONTROL : UInt

    HOT_FLAG_HAS_EXCEPTIONAL_SUCC

    let HOT_FLAG_HAS_EXCEPTIONAL_SUCC : UInt

    HOT_FLAG_LOAD

    let HOT_FLAG_LOAD : UInt

    HOT_FLAG_MAY_TRAP

    let HOT_FLAG_MAY_TRAP : UInt

    HOT_FLAG_SIDE_EFFECT

    let HOT_FLAG_SIDE_EFFECT : UInt

    HOT_FLAG_STORE

    let HOT_FLAG_STORE : UInt

    HOT_FLAG_TERMINATOR

    let HOT_FLAG_TERMINATOR : UInt

    HOT_FLAG_THROWS

    let HOT_FLAG_THROWS : UInt

    HOT_FLAG_VALUE

    let HOT_FLAG_VALUE : UInt

    HOT_IMPLICIT_FUNCTION_LABEL

    let HOT_IMPLICIT_FUNCTION_LABEL : Int

    bitset_clear

    fn bitset_clear(bitset : Bitset, idx : Int) -> Bool

    bitset_contains

    fn bitset_contains(bitset : Bitset, idx : Int) -> Bool

    bitset_difference_into

    fn bitset_difference_into(dst : Bitset, src : Bitset) -> Bool

    bitset_equals

    fn bitset_equals(lhs : Bitset, rhs : Bitset) -> Bool

    bitset_for_each_set_bit

    fn bitset_for_each_set_bit(bitset : Bitset, visit : (Int) -> Unit) -> Unit

    bitset_intersect_into

    fn bitset_intersect_into(dst : Bitset, src : Bitset) -> Bool

    bitset_new

    fn bitset_new(size : Int) -> Bitset

    bitset_set

    fn bitset_set(bitset : Bitset, idx : Int) -> Bool

    bitset_union_into

    fn bitset_union_into(dst : Bitset, src : Bitset) -> Bool

    block_local_defs

    fn block_local_defs(use_def : HotUseDef, block_id : Int) -> Bitset

    block_local_uses

    fn block_local_uses(use_def : HotUseDef, block_id : Int) -> Bitset

    cache_get_or_build_cfg

    fn cache_get_or_build_cfg(cache : HotAnalysisCache, func : HotFunc) -> HotCfg

    cache_get_or_build_dom

    fn cache_get_or_build_dom(cache : HotAnalysisCache, func : HotFunc) -> HotDominators

    cache_get_or_build_effects

    fn cache_get_or_build_effects(cache : HotAnalysisCache, func : HotFunc) -> HotEffectsSummary

    cache_get_or_build_liveness

    fn cache_get_or_build_liveness(cache : HotAnalysisCache, func : HotFunc) -> HotLiveness

    cache_get_or_build_loop_info

    fn cache_get_or_build_loop_info(cache : HotAnalysisCache, func : HotFunc) -> HotLoopInfo

    cache_get_or_build_orders

    fn cache_get_or_build_orders(cache : HotAnalysisCache, func : HotFunc) -> HotCfgOrders

    cache_get_or_build_postdom

    fn cache_get_or_build_postdom(cache : HotAnalysisCache, func : HotFunc) -> HotPostDominators

    cache_get_or_build_ssa

    fn cache_get_or_build_ssa(cache : HotAnalysisCache, func : HotFunc) -> HotLocalSsa

    cache_get_or_build_use_def

    fn cache_get_or_build_use_def(cache : HotAnalysisCache, func : HotFunc) -> HotUseDef

    cache_invalidate_all

    fn cache_invalidate_all(cache : HotAnalysisCache) -> Unit

    cache_invalidate_analyses

    fn cache_invalidate_analyses(cache : HotAnalysisCache, analyses : Array[HotAnalysis]) -> Unit

    cfg_block_boundary_reasons

    fn cfg_block_boundary_reasons(func : HotFunc, node_id : Int) -> Array[CfgBlockBoundaryReason]

    cfg_block_count

    fn cfg_block_count(cfg : HotCfg) -> Int

    cfg_block_for_node

    fn cfg_block_for_node(cfg : HotCfg, node_id : Int) -> Int?

    cfg_block_for_region_root

    fn cfg_block_for_region_root(cfg : HotCfg, region_ref : HotRegionRef, slot : Int) -> Int?

    cfg_block_get

    fn cfg_block_get(cfg : HotCfg, block_id : Int) -> HotBlockInfo

    cfg_block_worklist_seed

    fn cfg_block_worklist_seed(cfg : HotCfg) -> Array[Int]

    cfg_build

    fn cfg_build(func : HotFunc, conservative_exception_entries? : Bool, expand_operand_control? : Bool) -> HotCfg

    cfg_control_successor_policy

    fn cfg_control_successor_policy(op : HotOp) -> CfgControlSuccessorPolicy?

    cfg_entry_block

    fn cfg_entry_block(cfg : HotCfg) -> Int

    cfg_exception_target_policy

    fn cfg_exception_target_policy(op : HotOp) -> CfgExceptionTargetPolicy

    cfg_exceptional_exit_block

    fn cfg_exceptional_exit_block(cfg : HotCfg) -> Int?

    cfg_exit_block

    fn cfg_exit_block(cfg : HotCfg) -> Int

    cfg_postorder

    fn cfg_postorder(cfg : HotCfg) -> Array[Int]

    cfg_predecessor_edges

    fn cfg_predecessor_edges(cfg : HotCfg, block_id : Int) -> Array[CfgEdge]

    cfg_predecessors

    fn cfg_predecessors(cfg : HotCfg, block_id : Int) -> Array[CfgEdge]

    cfg_preorder

    fn cfg_preorder(cfg : HotCfg) -> Array[Int]

    cfg_region_blocks_in_rpo

    fn cfg_region_blocks_in_rpo(cfg : HotCfg, region_ref : HotRegionRef) -> Array[Int]

    cfg_region_root_can_reach_next

    fn cfg_region_root_can_reach_next(func : HotFunc, cfg : HotCfg, region_ref : HotRegionRef, slot : Int) -> Bool

    Reports whether execution beginning at one structured-region root can reach the following root in the same region. This is stronger than inspecting the root opcode: structured controls may complete through their own labels, and exception or loop edges may still reach the continuation.

    cfg_reverse_postorder

    fn cfg_reverse_postorder(cfg : HotCfg) -> Array[Int]

    cfg_reverse_postorder_from_exit

    fn cfg_reverse_postorder_from_exit(cfg : HotCfg) -> Array[Int]

    cfg_reverse_postorder_from_exit_with_exceptions

    fn cfg_reverse_postorder_from_exit_with_exceptions(cfg : HotCfg) -> Array[Int]

    cfg_reverse_postorder_with_exceptions

    fn cfg_reverse_postorder_with_exceptions(cfg : HotCfg) -> Array[Int]

    cfg_successor_edges

    fn cfg_successor_edges(cfg : HotCfg, block_id : Int) -> Array[CfgEdge]

    cfg_successors

    fn cfg_successors(cfg : HotCfg, block_id : Int) -> Array[CfgEdge]

    cfg_terminator_edge_kinds

    fn cfg_terminator_edge_kinds(op : HotOp) -> Array[CfgEdgeKind]

    compat_is_f32_nan

    fn compat_is_f32_nan(x : Float) -> Bool

    compat_is_f64_nan

    fn compat_is_f64_nan(x : Double) -> Bool

    compat_is_f64_non_finite

    fn compat_is_f64_non_finite(x : Double) -> Bool

    compat_trunc_f64_to_i64_s

    fn compat_trunc_f64_to_i64_s(x : Double) -> Int64?

    compat_trunc_f64_to_i64_u

    fn compat_trunc_f64_to_i64_u(x : Double) -> Int64?

    dom_build

    fn dom_build(cfg : HotCfg) -> HotDominators

    dom_children

    fn dom_children(dom : HotDominators, block_id : Int) -> Array[Int]

    dom_debug_dump

    fn dom_debug_dump(dom : HotDominators) -> String

    dom_dominates

    fn dom_dominates(dom : HotDominators, lhs : Int, rhs : Int) -> Bool

    dom_frontier

    fn dom_frontier(dom : HotDominators, block_id : Int) -> Array[Int]

    dom_idom

    fn dom_idom(dom : HotDominators, block_id : Int) -> Int?

    dom_strictly_dominates

    fn dom_strictly_dominates(dom : HotDominators, lhs : Int, rhs : Int) -> Bool

    effects_atomic_order_mask

    fn effects_atomic_order_mask(order :
    AtomicOrder
    , read~ : Bool, write~ : Bool) -> UInt

    effects_atomic_orders_conflict

    fn effects_atomic_orders_conflict(earlier : UInt, later : UInt, earlier_shared~ : Bool, later_shared~ : Bool) -> Bool

    effects_for_block

    fn effects_for_block(func : HotFunc, cfg : HotCfg, block_id : Int) -> UInt

    effects_for_node

    fn effects_for_node(func : HotFunc, node_id : Int) -> UInt

    effects_for_region

    fn effects_for_region(func : HotFunc, region_ref : HotRegionRef) -> UInt

    effects_is_pure

    fn effects_is_pure(mask : UInt) -> Bool

    effects_may_throw

    fn effects_may_throw(mask : UInt) -> Bool

    effects_reads_memory

    fn effects_reads_memory(mask : UInt) -> Bool

    effects_writes_memory

    fn effects_writes_memory(mask : UInt) -> Bool

    hot_alloc_branch_table

    fn hot_alloc_branch_table(func : HotFunc, table : HotBranchTable) -> Int

    hot_alloc_call_sig

    fn hot_alloc_call_sig(func : HotFunc, sig : HotCallSig) -> Int

    hot_alloc_catch_info

    fn hot_alloc_catch_info(func : HotFunc, info : HotCatchInfo) -> Int

    hot_alloc_child_span

    fn hot_alloc_child_span(func : HotFunc, count : Int) -> Int

    hot_alloc_children

    fn hot_alloc_children(func : HotFunc, count : Int) -> Int

    hot_alloc_const

    fn hot_alloc_const(func : HotFunc, payload : HotConstPayload) -> Int

    hot_alloc_instr_payload

    fn hot_alloc_instr_payload(func : HotFunc, payload : HotInstrPayload) -> Int

    hot_alloc_memarg

    fn hot_alloc_memarg(func : HotFunc, memarg : HotMemArg) -> Int

    hot_alloc_node

    fn hot_alloc_node(func : HotFunc, node : HotNode) -> Int

    hot_append_body_local

    fn hot_append_body_local(func : HotFunc, ty :
    ValType
    ) -> Int

    hot_append_root

    fn hot_append_root(func : HotFunc, id : Int) -> Unit

    hot_body_result_type

    fn hot_body_result_type(func : HotFunc) -> Int

    hot_body_result_type_set

    fn hot_body_result_type_set(func : HotFunc, ty : Int) -> Unit

    hot_branch_table_default_target

    fn hot_branch_table_default_target(func : HotFunc, id : Int) -> Int

    hot_branch_table_set

    fn hot_branch_table_set(func : HotFunc, node_id : Int, targets : Array[Int], default_target : Int) -> Unit

    hot_branch_table_targets

    fn hot_branch_table_targets(func : HotFunc, id : Int) -> Array[Int]

    hot_branch_table_targets_for_node

    fn hot_branch_table_targets_for_node(func : HotFunc, node_id : Int) -> Array[Int]

    hot_branch_target

    fn hot_branch_target(func : HotFunc, node_id : Int) -> Int?

    hot_branch_target_set

    fn hot_branch_target_set(func : HotFunc, node_id : Int, target : Int) -> Unit

    hot_build_atomic

    fn hot_build_atomic(func : HotFunc, result_types : Array[
    ValType
    ], instr :
    Instruction
    , children : Array[Int]) -> Int

    hot_build_binary

    fn hot_build_binary(func : HotFunc, result_type :
    ValType
    , lhs : Int, rhs : Int) -> Int

    hot_build_block

    fn hot_build_block(func : HotFunc, block_type :
    BlockType
    , body : Array[Int]) -> Int

    hot_build_br

    fn hot_build_br(func : HotFunc, target : Int, values? : Array[Int]) -> Int

    hot_build_br_if

    fn hot_build_br_if(func : HotFunc, target : Int, condition : Int, values? : Array[Int]) -> Int

    hot_build_br_table

    fn hot_build_br_table(func : HotFunc, targets : Array[Int], default_target : Int, selector : Int, values? : Array[Int]) -> Int

    hot_build_call

    fn hot_build_call(func : HotFunc, func_idx : Int, result_types : Array[
    ValType
    ], args : Array[Int]) -> Int

    hot_build_call_indirect

    fn hot_build_call_indirect(func : HotFunc, type_idx :
    TypeIdx
    , table_idx :
    TableIdx
    , result_types : Array[
    ValType
    ], args : Array[Int], callee : Int) -> Int

    hot_build_call_ref

    fn hot_build_call_ref(func : HotFunc, type_idx :
    TypeIdx
    , result_types : Array[
    ValType
    ], args : Array[Int], callee_ref : Int) -> Int

    hot_build_catch_payload

    fn hot_build_catch_payload(func : HotFunc, tag_idx :
    TagIdx
    , val_type :
    ValType
    ) -> Int

    Represent one legacy catch payload lane at catch-region entry. Ordered payload lanes must appear as the catch region's leading roots.

    hot_build_compare

    fn hot_build_compare(func : HotFunc, lhs : Int, rhs : Int) -> Int

    hot_build_const_f32

    fn hot_build_const_f32(func : HotFunc, value :
    F32
    ) -> Int

    hot_build_const_f64

    fn hot_build_const_f64(func : HotFunc, value :
    F64
    ) -> Int

    hot_build_const_i32

    fn hot_build_const_i32(func : HotFunc, value :
    I32
    ) -> Int

    hot_build_const_i64

    fn hot_build_const_i64(func : HotFunc, value :
    I64
    ) -> Int

    hot_build_const_v128_splat

    fn hot_build_const_v128_splat(func : HotFunc, byte : Byte) -> Int

    hot_build_const_v128_zero

    fn hot_build_const_v128_zero(func : HotFunc) -> Int

    hot_build_convert

    fn hot_build_convert(func : HotFunc, result_type :
    ValType
    , operand : Int) -> Int

    hot_build_delegate

    fn hot_build_delegate(func : HotFunc, target : Int) -> Int

    hot_build_drop

    fn hot_build_drop(func : HotFunc, value : Int) -> Int

    hot_build_global_get

    fn hot_build_global_get(func : HotFunc, global_idx : Int, result_type :
    ValType
    ) -> Int

    hot_build_global_set

    fn hot_build_global_set(func : HotFunc, global_idx : Int, value : Int) -> Int

    hot_build_heap

    fn hot_build_heap(func : HotFunc, result_types : Array[
    ValType
    ], instr :
    Instruction
    , children : Array[Int]) -> Int

    hot_build_if

    fn hot_build_if(func : HotFunc, block_type :
    BlockType
    , condition : Int, then_body : Array[Int], else_body? : Array[Int]?) -> Int

    hot_build_load

    fn hot_build_load(func : HotFunc, result_type :
    ValType
    , memarg :
    MemArg
    , address : Int) -> Int

    hot_build_local_get

    fn hot_build_local_get(func : HotFunc, local_id : Int) -> Int

    hot_build_local_set

    fn hot_build_local_set(func : HotFunc, local_id : Int, value : Int) -> Int

    hot_build_local_set_from_tee

    fn hot_build_local_set_from_tee(func : HotFunc, tee_id : Int) -> Int

    Copy a tee's write into a statement without changing its source order. The caller must replace each moved tee use with a read at that use site.

    hot_build_local_set_from_value

    fn hot_build_local_set_from_value(func : HotFunc, local_id : Int, value : Int) -> Int

    Capture an existing value at its source execution position. Use this when extracting an operand into a preceding local-set root.

    hot_build_local_tee

    fn hot_build_local_tee(func : HotFunc, local_id : Int, value : Int) -> Int

    hot_build_local_tee_from_set

    fn hot_build_local_tee_from_set(func : HotFunc, set_id : Int) -> Int

    Turn a set into a value-producing write without changing its source order. The caller must remove the old set and preserve this order when replacing the read that receives the tee.

    hot_build_loop

    fn hot_build_loop(func : HotFunc, block_type :
    BlockType
    , body : Array[Int]) -> Int

    hot_build_node

    fn hot_build_node(func : HotFunc, op : HotOp, ty : Int, imm0? : Int, imm1? : Int, children? : Array[Int]) -> Int

    hot_build_nop

    fn hot_build_nop(func : HotFunc) -> Int

    hot_build_ref_func

    fn hot_build_ref_func(func : HotFunc, func_idx :
    FuncIdx
    , ref_type :
    RefType
    ) -> Int

    hot_build_ref_null

    fn hot_build_ref_null(func : HotFunc, value :
    RefType
    ) -> Int

    hot_build_region

    fn hot_build_region(func : HotFunc, body : Array[Int], result_arity : Int) -> Int

    Build a control's region holder without introducing an encoded block. Attach the holder to a compatible control slot; result_arity is its fallthrough stack arity. Body nodes must belong to the same function.

    hot_build_resolved_block

    fn hot_build_resolved_block(func : HotFunc, block_type :
    BlockType
    , params : Array[
    ValType
    ], results : Array[
    ValType
    ], body : Array[Int]) -> Int

    hot_build_return

    fn hot_build_return(func : HotFunc, values : Array[Int]) -> Int

    hot_build_return_call

    fn hot_build_return_call(func : HotFunc, func_idx : Int, args : Array[Int]) -> Int

    hot_build_return_call_indirect

    fn hot_build_return_call_indirect(func : HotFunc, type_idx :
    TypeIdx
    , table_idx :
    TableIdx
    , args : Array[Int], callee : Int) -> Int

    hot_build_return_call_ref

    fn hot_build_return_call_ref(func : HotFunc, type_idx :
    TypeIdx
    , args : Array[Int], callee_ref : Int) -> Int

    hot_build_select

    fn hot_build_select(func : HotFunc, result_type :
    ValType
    , if_true : Int, if_false : Int, condition : Int) -> Int

    hot_build_simd

    fn hot_build_simd(func : HotFunc, result_types : Array[
    ValType
    ], instr :
    Instruction
    , children : Array[Int]) -> Int

    hot_build_store

    fn hot_build_store(func : HotFunc, memarg :
    MemArg
    , address : Int, value : Int) -> Int

    hot_build_string_const

    fn hot_build_string_const(func : HotFunc, value : Bytes) -> Int

    hot_build_table_get

    fn hot_build_table_get(func : HotFunc, table_idx : Int, result_type :
    ValType
    , index : Int) -> Int

    hot_build_table_set

    fn hot_build_table_set(func : HotFunc, table_idx : Int, index : Int, value : Int) -> Int

    hot_build_throw

    fn hot_build_throw(func : HotFunc, tag_idx :
    TagIdx
    , args : Array[Int]) -> Int

    hot_build_throw_ref

    fn hot_build_throw_ref(func : HotFunc, exnref : Int) -> Int

    hot_build_try

    fn hot_build_try(func : HotFunc, block_type :
    BlockType
    , body : Array[Int], catch_body? : Array[Int]?) -> Int

    hot_build_try_table

    fn hot_build_try_table(func : HotFunc, block_type :
    BlockType
    , catches : Array[HotCatchArm], body : Array[Int], catch_list_body? : Array[Int]) -> Int

    hot_build_tuple_extract

    fn hot_build_tuple_extract(func : HotFunc, result_type :
    ValType
    , tuple : Int, index : Int) -> Int

    hot_build_tuple_make

    fn hot_build_tuple_make(func : HotFunc, result_types : Array[
    ValType
    ], values : Array[Int]) -> Int

    hot_build_unary

    fn hot_build_unary(func : HotFunc, result_type :
    ValType
    , operand : Int) -> Int

    hot_build_unreachable

    fn hot_build_unreachable(func : HotFunc) -> Int

    hot_call_sig_get

    fn hot_call_sig_get(func : HotFunc, id : Int) -> HotCallSig

    hot_catch_info_get

    fn hot_catch_info_get(func : HotFunc, id : Int) -> HotCatchInfo

    hot_catch_payload_tag

    fn hot_catch_payload_tag(func : HotFunc, node_id : Int) ->
    TagIdx

    hot_child_count

    fn hot_child_count(func : HotFunc, id : Int) -> Int

    hot_child_get

    fn hot_child_get(func : HotFunc, id : Int, idx : Int) -> Int

    hot_child_set

    fn hot_child_set(func : HotFunc, id : Int, idx : Int, child : Int) -> Unit

    hot_child_span

    fn hot_child_span(func : HotFunc, node_id : Int) -> Array[Int]

    hot_child_storage_count

    fn hot_child_storage_count(func : HotFunc) -> Int

    hot_const_get

    fn hot_const_get(func : HotFunc, id : Int) -> HotConstPayload

    hot_continuation_targets

    fn hot_continuation_targets(func : HotFunc, node_id : Int) -> Array[Int]

    hot_continuation_targets_set

    fn hot_continuation_targets_set(func : HotFunc, node_id : Int, targets : Array[Int]) -> Unit

    hot_control_demote_if_to_block

    fn hot_control_demote_if_to_block(func : HotFunc, if_id : Int, new_children : Array[Int]) -> Unit

    hot_control_demote_loop_to_block

    fn hot_control_demote_loop_to_block(func : HotFunc, loop_id : Int) -> Unit

    hot_control_node_label

    fn hot_control_node_label(func : HotFunc, node_id : Int) -> Int

    hot_control_region_slot_info

    fn hot_control_region_slot_info(op : HotOp) -> Array[HotControlRegionSlotInfo]

    hot_control_result_type_set

    fn hot_control_result_type_set(func : HotFunc, control_id : Int, ty : Int) -> Unit

    hot_debug_dump_core

    fn hot_debug_dump_core(func : HotFunc) -> String

    hot_default_flags_for_op

    fn hot_default_flags_for_op(op : HotOp) -> UInt

    hot_delete_detached_control_forest

    fn hot_delete_detached_control_forest(func : HotFunc, root_ids : Array[Int]) -> Bool

    Delete exact detached structured trees and all labels they own.

    hot_delete_detached_control_subtree

    fn hot_delete_detached_control_subtree(func : HotFunc, root_id : Int) -> Bool

    Delete one exact detached structured subtree and all labels it owns.

    hot_delete_detached_forest

    fn hot_delete_detached_forest(func : HotFunc, root_ids : Array[Int]) -> Bool

    Delete an exact detached forest and all labels its controls own.

    The operation fails without mutation when the roots are empty, duplicate, or overlapping; when any descendant graph is shared or cyclic; when any node is still rooted or owned by another live node; when control-label ownership is incomplete; or when any outside branch/catch targets an owned label.

    hot_delete_detached_node

    fn hot_delete_detached_node(func : HotFunc, id : Int) -> Unit

    hot_delete_detached_nodes

    fn hot_delete_detached_nodes(func : HotFunc, node_ids : Array[Int]) -> Unit

    Delete an exact distinct detached node set with one revision invalidation.

    hot_delete_node

    fn hot_delete_node(func : HotFunc, id : Int) -> Unit

    hot_for_each_child

    fn[S, E] hot_for_each_child(func : HotFunc, parent_id : Int, initial : S, visit : (S, Int, Int) -> HotVisitCtl[S, E]) -> Result[S, E]

    hot_for_each_root

    fn[S, E] hot_for_each_root(func : HotFunc, initial : S, visit : (S, Int, Int) -> HotVisitCtl[S, E]) -> Result[S, E]

    hot_has_exceptional_succ

    fn hot_has_exceptional_succ(func : HotFunc, node_id : Int) -> Bool

    hot_has_side_effect

    fn hot_has_side_effect(func : HotFunc, node_id : Int) -> Bool

    hot_instr_payload_get

    fn hot_instr_payload_get(func : HotFunc, id : Int) -> HotInstrPayload

    hot_is_branch

    fn hot_is_branch(func : HotFunc, node_id : Int) -> Bool

    hot_is_control_node

    fn hot_is_control_node(func : HotFunc, node_id : Int) -> Bool

    hot_is_terminator_node

    fn hot_is_terminator_node(func : HotFunc, node_id : Int) -> Bool

    hot_label_alloc

    fn hot_label_alloc(func : HotFunc, kind : HotLabelKind, result_type : Int, owner : Int, branch_arity : Int) -> Int

    hot_label_branch_arity

    fn hot_label_branch_arity(func : HotFunc, label_id : Int) -> Int

    hot_label_get

    fn hot_label_get(func : HotFunc, label_id : Int) -> HotLabelInfo

    hot_label_is_live

    fn hot_label_is_live(func : HotFunc, label_id : Int) -> Bool

    hot_label_kind

    fn hot_label_kind(func : HotFunc, label_id : Int) -> HotLabelKind

    hot_label_owner

    fn hot_label_owner(func : HotFunc, label_id : Int) -> Int

    hot_label_owner_set

    fn hot_label_owner_set(func : HotFunc, label_id : Int, owner : Int) -> Unit

    hot_label_result_type

    fn hot_label_result_type(func : HotFunc, label_id : Int) -> Int

    hot_lift_body

    fn hot_lift_body(body :
    Expr
    , locals : HotLocals, body_result_type? :
    BlockType
    ) -> HotFunc

    hot_lift_body_result

    fn hot_lift_body_result(body :
    Expr
    , locals : HotLocals, body_result_type? :
    BlockType
    ) -> Result[HotFunc, HotLiftError]

    hot_lift_body_with_context

    fn hot_lift_body_with_context(body :
    Expr
    , locals : HotLocals, ctx : HotModuleContext, body_result_type? :
    BlockType
    ) -> HotFunc

    hot_lift_body_with_context_result

    fn hot_lift_body_with_context_result(body :
    Expr
    , locals : HotLocals, ctx : HotModuleContext, body_result_type? :
    BlockType
    ) -> Result[HotFunc, HotLiftError]

    hot_lift_body_with_context_unverified

    fn hot_lift_body_with_context_unverified(body :
    Expr
    , locals : HotLocals, ctx : HotModuleContext, body_result_type? :
    BlockType
    ) -> HotFunc

    hot_lift_func_with_context

    hot_lift_func_with_context_result

    fn hot_lift_func_with_context_result(mod_ :
    Module
    , func_idx :
    FuncIdx
    , ctx : HotModuleContext, capture_stack_locals? : Bool, materialize_multi_values? : Bool, record_local_accesses? : Bool, record_capture_sources? : Bool) -> Result[HotFunc, HotLiftError]

    Keep original local-access provenance by default. Callers that never query hot_lift_local_accesses may omit it explicitly; capture/conflict analysis, typechecking, result materialization and the lifted graph are unchanged. The source-map getter rejects a lift made with recording disabled.

    hot_lift_func_with_context_unverified

    fn hot_lift_func_with_context_unverified(mod_ :
    Module
    , func_idx :
    FuncIdx
    , ctx : HotModuleContext) -> HotFunc

    hot_lift_local_accesses

    fn hot_lift_local_accesses(func : HotFunc) -> HotLiftLocalAccesses

    hot_lift_release_local_accesses

    fn hot_lift_release_local_accesses(func : HotFunc) -> Unit

    Release optional source and capture provenance after its final consumer. Existing journal aliases remain valid; this drops the HotFunc owner only.

    hot_local_body_count

    fn hot_local_body_count(func : HotFunc) -> Int

    hot_local_count

    fn hot_local_count(func : HotFunc) -> Int

    hot_local_is_param

    fn hot_local_is_param(func : HotFunc, local_id : Int) -> Bool

    hot_local_node_id_set

    fn hot_local_node_id_set(func : HotFunc, node_id : Int, local_id : Int) -> Unit

    hot_local_param_count

    fn hot_local_param_count(func : HotFunc) -> Int

    hot_local_type

    fn hot_local_type(func : HotFunc, local_id : Int) ->
    ValType
    ?

    hot_loop_entry_values_clear

    fn hot_loop_entry_values_clear(func : HotFunc, loop_id : Int) -> Array[Int]

    hot_lower_body

    fn hot_lower_body(func : HotFunc) ->
    Expr

    hot_lower_body_unverified

    fn hot_lower_body_unverified(func : HotFunc) ->
    Expr

    hot_lower_func

    fn hot_lower_func(func : HotFunc) ->
    Func

    hot_lower_func_unverified

    fn hot_lower_func_unverified(func : HotFunc) ->
    Func

    hot_lower_func_unverified_with_options

    fn hot_lower_func_unverified_with_options(func : HotFunc, options : HotLowerOptions) ->
    Func

    hot_lower_func_with_options

    fn hot_lower_func_with_options(func : HotFunc, options : HotLowerOptions) ->
    Func

    hot_make_simple_node

    fn hot_make_simple_node(op : HotOp, ty : Int, canonicalized_flags : UInt, imm0 : Int, imm1 : Int, children : Array[Int]) -> HotNode

    hot_may_trap

    fn hot_may_trap(func : HotFunc, node_id : Int) -> Bool

    hot_memarg_get

    fn hot_memarg_get(func : HotFunc, id : Int) -> HotMemArg

    hot_module_context_from_module

    fn hot_module_context_from_module(mod_ :
    Module
    ) -> HotModuleContext

    hot_module_context_validation_env

    fn hot_module_context_validation_env(ctx : HotModuleContext) ->
    Env

    Build a reusable body-validation environment from one immutable module context. Function-local labels, locals and return state are intentionally absent; the body validator adds them independently for each function.

    hot_module_func_has_annotation

    fn hot_module_func_has_annotation(ctx : HotModuleContext, func_idx :
    FuncIdx
    , name : String) -> Bool

    hot_module_func_import_matches

    fn hot_module_func_import_matches(ctx : HotModuleContext, func_idx :
    FuncIdx
    , module_name : String, base_name : String) -> Bool

    hot_module_resolve_array_field

    hot_module_resolve_block_results

    hot_module_resolve_func_import

    hot_module_resolve_func_type

    hot_module_resolve_func_type_idx

    fn hot_module_resolve_func_type_idx(ctx : HotModuleContext, func_idx :
    FuncIdx
    ) ->
    TypeIdx
    ?

    hot_module_resolve_global_const_init

    fn hot_module_resolve_global_const_init(ctx : HotModuleContext, global_idx :
    GlobalIdx
    ) -> HotConstPayload?

    hot_module_resolve_global_init

    fn hot_module_resolve_global_init(ctx : HotModuleContext, global_idx :
    GlobalIdx
    ) ->
    Expr
    ?

    hot_module_resolve_global_type

    hot_module_resolve_mem_index_type

    fn hot_module_resolve_mem_index_type(ctx : HotModuleContext, mem_idx :
    MemIdx
    ) ->
    ValType
    ?

    hot_module_resolve_mem_type

    hot_module_resolve_struct_fields

    hot_module_resolve_subtype

    hot_module_resolve_table_index_type

    fn hot_module_resolve_table_index_type(ctx : HotModuleContext, table_idx :
    TableIdx
    ) ->
    ValType
    ?

    hot_module_resolve_table_type

    hot_module_resolve_tag_type

    hot_module_resolve_type_func_type

    hot_module_subtype_count

    fn hot_module_subtype_count(ctx : HotModuleContext) -> Int

    hot_node_count

    fn hot_node_count(func : HotFunc) -> Int

    hot_node_exact_instr

    fn hot_node_exact_instr(func : HotFunc, node_id : Int) ->
    Instruction
    ?

    hot_node_exact_instr_payload_id

    fn hot_node_exact_instr_payload_id(func : HotFunc, node_id : Int) -> Int?

    hot_node_exact_instr_set

    fn hot_node_exact_instr_set(func : HotFunc, id : Int, instr :
    Instruction
    ) -> Unit

    hot_node_flags

    fn hot_node_flags(func : HotFunc, node_id : Int) -> UInt

    hot_node_get

    fn hot_node_get(func : HotFunc, id : Int) -> HotNode

    hot_node_has_flag

    fn hot_node_has_flag(func : HotFunc, node_id : Int, flag : UInt) -> Bool

    hot_node_is_deleted

    fn hot_node_is_deleted(func : HotFunc, node_id : Int) -> Bool

    hot_node_is_live

    fn hot_node_is_live(func : HotFunc, node_id : Int) -> Bool

    hot_node_kind_is_atomic

    fn hot_node_kind_is_atomic(func : HotFunc, node_id : Int) -> Bool

    hot_node_kind_is_branch

    fn hot_node_kind_is_branch(func : HotFunc, node_id : Int) -> Bool

    hot_node_kind_is_call

    fn hot_node_kind_is_call(func : HotFunc, node_id : Int) -> Bool

    hot_node_kind_is_control

    fn hot_node_kind_is_control(func : HotFunc, node_id : Int) -> Bool

    hot_node_kind_is_exception

    fn hot_node_kind_is_exception(func : HotFunc, node_id : Int) -> Bool

    hot_node_kind_is_global

    fn hot_node_kind_is_global(func : HotFunc, node_id : Int) -> Bool

    hot_node_kind_is_heap

    fn hot_node_kind_is_heap(func : HotFunc, node_id : Int) -> Bool

    hot_node_kind_is_local

    fn hot_node_kind_is_local(func : HotFunc, node_id : Int) -> Bool

    hot_node_kind_is_memory

    fn hot_node_kind_is_memory(func : HotFunc, node_id : Int) -> Bool

    hot_node_kind_is_numeric

    fn hot_node_kind_is_numeric(func : HotFunc, node_id : Int) -> Bool

    hot_node_kind_is_simd

    fn hot_node_kind_is_simd(func : HotFunc, node_id : Int) -> Bool

    hot_node_kind_is_table

    fn hot_node_kind_is_table(func : HotFunc, node_id : Int) -> Bool

    hot_node_kind_is_tuple

    fn hot_node_kind_is_tuple(func : HotFunc, node_id : Int) -> Bool

    hot_node_may_throw_exception

    fn hot_node_may_throw_exception(func : HotFunc, node_id : Int) -> Bool

    hot_node_op

    fn hot_node_op(func : HotFunc, id : Int) -> HotOp

    hot_node_promote_to_block

    fn hot_node_promote_to_block(func : HotFunc, node_id : Int, block_type :
    BlockType
    , new_children : Array[Int]) -> Unit

    hot_node_repeated_live_child

    fn hot_node_repeated_live_child(func : HotFunc, node_id : Int) -> Int?

    hot_node_result_arity

    fn hot_node_result_arity(func : HotFunc, node_id : Int) -> Int

    hot_node_set

    fn hot_node_set(func : HotFunc, id : Int, node : HotNode) -> Unit

    hot_node_type

    fn hot_node_type(func : HotFunc, node_id : Int) -> Int

    hot_node_use_count

    fn hot_node_use_count(use_counts : HotNodeUseCounts, node_id : Int) -> Int

    hot_node_use_counts_build

    fn hot_node_use_counts_build(func : HotFunc) -> HotNodeUseCounts

    Count every reachable live root and child reference in the current HOT snapshot.

    hot_nodes_match_simple_value

    fn hot_nodes_match_simple_value(func : HotFunc, lhs : Int, rhs : Int) -> Bool

    hot_ordered_catch_payloads_repairable

    fn hot_ordered_catch_payloads_repairable(func : HotFunc) -> Bool

    Report whether every typed legacy catch payload is either the exact scalar first-descendant family or one ordered same-tag lane vector under an exclusive direct block chain. Catch-all markers, loops, nested catches, sharing, outside uses, or any partial lane reject the complete function.

    hot_param_count

    fn hot_param_count(func : HotFunc) -> Int

    hot_pass_invalidates

    fn hot_pass_invalidates(descriptor : HotPassDescriptor) -> Array[HotAnalysis]

    hot_pass_requires

    fn hot_pass_requires(descriptor : HotPassDescriptor) -> Array[HotAnalysis]

    hot_preserve_replacement_position

    fn hot_preserve_replacement_position(func : HotFunc, replacement : Int, original : Int) -> Unit

    hot_region_body_ref

    fn hot_region_body_ref(func : HotFunc, control_id : Int) -> HotRegionRef

    hot_region_catch_list_ref

    fn hot_region_catch_list_ref(func : HotFunc, try_table_id : Int) -> HotRegionRef

    hot_region_catch_ref

    fn hot_region_catch_ref(func : HotFunc, try_id : Int) -> HotRegionRef?

    hot_region_else_ref

    fn hot_region_else_ref(func : HotFunc, if_id : Int) -> HotRegionRef?

    hot_region_get

    fn hot_region_get(func : HotFunc, region_ref : HotRegionRef, idx : Int) -> Int

    hot_region_holder_block_label

    fn hot_region_holder_block_label(func : HotFunc, region_ref : HotRegionRef) -> Int?

    hot_region_holder_block_root

    fn hot_region_holder_block_root(func : HotFunc, region_ref : HotRegionRef) -> Int?

    hot_region_insert

    fn hot_region_insert(func : HotFunc, region_ref : HotRegionRef, idx : Int, node_ids : Array[Int]) -> Unit

    hot_region_is_strict_no_work_block_chain

    fn hot_region_is_strict_no_work_block_chain(func : HotFunc, region_ref : HotRegionRef, label_is_used : (Int) -> Bool) -> Bool

    Prove that a region is empty or contains only an unused-label resultless single-root block chain ending in an empty body or one childless nop.

    hot_region_is_strict_no_work_forest

    fn hot_region_is_strict_no_work_forest(func : HotFunc, region_ref : HotRegionRef, label_is_used : (Int) -> Bool) -> Bool

    Prove that every root in a region independently forms an unused-label resultless block chain ending empty or in one childless nop.

    hot_region_remove

    fn hot_region_remove(func : HotFunc, region_ref : HotRegionRef, idx : Int, count : Int) -> Array[Int]

    hot_region_repeated_live_block_body

    fn hot_region_repeated_live_block_body(func : HotFunc, region_ref : HotRegionRef) -> HotRegionRef?

    hot_region_repeated_live_block_body_or_self

    fn hot_region_repeated_live_block_body_or_self(func : HotFunc, region_ref : HotRegionRef) -> HotRegionRef

    hot_region_repeated_live_block_root

    fn hot_region_repeated_live_block_root(func : HotFunc, region_ref : HotRegionRef) -> Int?

    hot_region_repeated_live_if_root

    fn hot_region_repeated_live_if_root(func : HotFunc, region_ref : HotRegionRef) -> Int?

    hot_region_repeated_live_root

    fn hot_region_repeated_live_root(func : HotFunc, region_ref : HotRegionRef) -> Int?

    hot_region_replace_body

    fn hot_region_replace_body(func : HotFunc, region_ref : HotRegionRef, node_ids : Array[Int]) -> Unit

    hot_region_result_arity

    fn hot_region_result_arity(func : HotFunc, region_ref : HotRegionRef) -> Int

    hot_region_root_count

    fn hot_region_root_count(func : HotFunc, region_ref : HotRegionRef) -> Int

    hot_region_set

    fn hot_region_set(func : HotFunc, region_ref : HotRegionRef, idx : Int, node_id : Int) -> Int

    hot_region_single_exit_root

    fn hot_region_single_exit_root(func : HotFunc, region_ref : HotRegionRef) -> Int?

    hot_region_single_live_block_body

    fn hot_region_single_live_block_body(func : HotFunc, region_ref : HotRegionRef) -> HotRegionRef?

    hot_region_single_live_block_body_or_self

    fn hot_region_single_live_block_body_or_self(func : HotFunc, region_ref : HotRegionRef) -> HotRegionRef

    hot_region_single_live_block_root

    fn hot_region_single_live_block_root(func : HotFunc, region_ref : HotRegionRef) -> Int?

    hot_region_single_live_if_root

    fn hot_region_single_live_if_root(func : HotFunc, region_ref : HotRegionRef) -> Int?

    hot_region_single_live_root

    fn hot_region_single_live_root(func : HotFunc, region_ref : HotRegionRef) -> Int?

    hot_region_single_plain_br_root

    fn hot_region_single_plain_br_root(func : HotFunc, region_ref : HotRegionRef) -> Int?

    hot_region_single_plain_br_target

    fn hot_region_single_plain_br_target(func : HotFunc, region_ref : HotRegionRef) -> Int?

    hot_region_splice

    fn hot_region_splice(func : HotFunc, region_ref : HotRegionRef, idx : Int, remove_count : Int, node_ids : Array[Int]) -> Array[Int]

    hot_region_split_trailing_payload_roots

    fn hot_region_split_trailing_payload_roots(func : HotFunc, region_ref : HotRegionRef, result_arity : Int) -> (Array[Int], Array[Int])?

    hot_region_split_trailing_plain_br_root

    fn hot_region_split_trailing_plain_br_root(func : HotFunc, region_ref : HotRegionRef) -> (Array[Int], Int)?

    hot_region_split_trailing_plain_br_target

    fn hot_region_split_trailing_plain_br_target(func : HotFunc, region_ref : HotRegionRef) -> (Array[Int], Int)?

    hot_region_then_ref

    fn hot_region_then_ref(func : HotFunc, if_id : Int) -> HotRegionRef

    hot_region_truncate_suffix

    fn hot_region_truncate_suffix(func : HotFunc, region_ref : HotRegionRef, keep_count : Int) -> Array[Int]

    hot_repair_nondefaultable_local_scopes

    fn hot_repair_nondefaultable_local_scopes(func : HotFunc) -> Bool

    Preserve result types when code motion moves a local read outside the control scope that initialized its non-defaultable reference storage. Call only after a semantics-preserving transform on a valid input.

    hot_repair_ordered_catch_payloads

    fn hot_repair_ordered_catch_payloads(func : HotFunc) -> Bool

    Capture exact scalar or ordered same-tag legacy catch payloads atomically. Lane locals retain source order; entry captures consume the handler stack in reverse lane order before exact old-position reads replace every payload use.

    hot_repair_scalar_catch_payloads

    fn hot_repair_scalar_catch_payloads(func : HotFunc) -> Bool

    Capture every repairable scalar legacy catch payload into a typed local at catch entry and replace its exact nested first-descendant use. The complete function is preflighted before any local, node, root, child, or revision mutation; unsupported multiple payloads, nested catches, loops, sharing, or outside uses leave the function unchanged.

    hot_replace_child_span

    fn hot_replace_child_span(func : HotFunc, id : Int, new_children : Array[Int]) -> Array[Int]

    hot_replace_child_spans_and_control_result_type

    fn hot_replace_child_spans_and_control_result_type(func : HotFunc, control_id : Int, ty : Int, rewrites : Array[HotChildSpanRewrite]) -> Unit

    hot_replace_local_set_with_drop

    fn hot_replace_local_set_with_drop(func : HotFunc, node_id : Int) -> Bool

    hot_replace_local_tee_with_value

    fn hot_replace_local_tee_with_value(func : HotFunc, node_id : Int) -> Bool

    hot_replace_node

    fn hot_replace_node(func : HotFunc, id : Int, new_node : HotNode, preserve_value_order? : Bool) -> Unit

    hot_replace_node_preserving_position

    fn hot_replace_node_preserving_position(func : HotFunc, id : Int, new_node : HotNode) -> Unit

    hot_revision_bump

    fn hot_revision_bump(func : HotFunc) -> Unit

    hot_revision_current

    fn hot_revision_current(func : HotFunc) -> Int

    hot_rewrite_children_by_slot

    fn[S, E] hot_rewrite_children_by_slot(func : HotFunc, parent_id : Int, initial : S, rewrite : (S, Int, Int, Int) -> HotRewriteCtl[S, E]) -> Result[S, E]

    hot_rewrite_error

    fn[S, E] hot_rewrite_error(err : E) -> HotRewriteCtl[S, E]

    hot_rewrite_remove

    fn[S, E] hot_rewrite_remove(state : S) -> HotRewriteCtl[S, E]

    hot_rewrite_replace

    fn[S, E] hot_rewrite_replace(state : S, replacement : Int) -> HotRewriteCtl[S, E]

    hot_rewrite_same

    fn[S, E] hot_rewrite_same(state : S) -> HotRewriteCtl[S, E]

    hot_root_append

    fn hot_root_append(func : HotFunc, id : Int) -> Unit

    hot_root_count

    fn hot_root_count(func : HotFunc) -> Int

    hot_root_get

    fn hot_root_get(func : HotFunc, idx : Int) -> Int

    hot_root_insert

    fn hot_root_insert(func : HotFunc, idx : Int, id : Int) -> Unit

    hot_root_remove

    fn hot_root_remove(func : HotFunc, idx : Int) -> Int

    hot_root_set

    fn hot_root_set(func : HotFunc, idx : Int, id : Int) -> Unit

    hot_root_span

    fn hot_root_span(func : HotFunc) -> Array[Int]

    hot_root_splice

    fn hot_root_splice(func : HotFunc, idx : Int, remove_count : Int, new_roots : Array[Int]) -> Array[Int]

    hot_root_storage_count

    fn hot_root_storage_count(func : HotFunc) -> Int

    hot_scalar_catch_payloads_repairable

    fn hot_scalar_catch_payloads_repairable(func : HotFunc) -> Bool

    Report whether every typed legacy catch payload in the function can be captured exactly once on its catch region's first-descendant line.

    hot_set_body_local_type

    fn hot_set_body_local_type(func : HotFunc, local_id : Int, ty :
    ValType
    ) -> Bool

    hot_side_table_kind_for_op

    fn hot_side_table_kind_for_op(op : HotOp) -> HotSideTableKind?

    hot_simple_value_key

    fn hot_simple_value_key(func : HotFunc, node_id : Int) -> HotSimpleValueKey?

    hot_source_first_effect_orders

    fn hot_source_first_effect_orders(func : HotFunc) -> Array[Int]

    First source-ordered external effect in each node's operand tree. Region bodies are separate scopes. The node count denotes no effect.

    hot_split_trailing_payload_roots

    fn hot_split_trailing_payload_roots(func : HotFunc, roots : Array[Int], result_arity : Int) -> (Array[Int], Array[Int])?

    hot_try_table_catches_set

    fn hot_try_table_catches_set(func : HotFunc, node_id : Int, catches : Array[HotCatchArm]) -> Unit

    hot_tuple_make_promote_to_block

    fn hot_tuple_make_promote_to_block(func : HotFunc, tuple_make_id : Int, block_type :
    BlockType
    ) -> Unit

    hot_type_get

    fn hot_type_get(func : HotFunc, type_id : Int) -> HotTypeInfo

    hot_type_intern_block_result

    fn hot_type_intern_block_result(func : HotFunc, block_type :
    BlockType
    ) -> Int

    hot_type_intern_resolved_block_result

    fn hot_type_intern_resolved_block_result(func : HotFunc, block_type :
    BlockType
    , params : Array[
    ValType
    ], results : Array[
    ValType
    ]) -> Int

    hot_type_intern_results

    fn hot_type_intern_results(func : HotFunc, result_types : Array[
    ValType
    ]) -> Int

    hot_type_intern_value

    fn hot_type_intern_value(func : HotFunc, val_type :
    ValType
    ) -> Int

    hot_type_intern_void

    fn hot_type_intern_void(_func : HotFunc) -> Int

    hot_type_is_void

    fn hot_type_is_void(func : HotFunc, type_id : Int) -> Bool

    hot_type_resolve_results

    fn hot_type_resolve_results(func : HotFunc, ctx : HotModuleContext, type_id : Int) -> Array[
    ValType
    ]?

    hot_type_result_arity

    fn hot_type_result_arity(func : HotFunc, type_id : Int) -> Int

    hot_type_results

    fn hot_type_results(func : HotFunc, type_id : Int) -> Array[
    ValType
    ]

    hot_type_void

    fn hot_type_void(func : HotFunc) -> Int

    hot_verify_all

    fn[C] hot_verify_all(func : HotFunc, cache? : C?) -> Result[Unit, HotVerifyError]

    hot_verify_all_or_abort

    fn hot_verify_all_or_abort(func : HotFunc) -> Unit

    hot_verify_cached_analyses

    fn hot_verify_cached_analyses(func : HotFunc, cache : HotAnalysisCache) -> Result[Unit, HotVerifyError]

    hot_verify_cfg

    fn hot_verify_cfg(func : HotFunc, cfg : HotCfg) -> Result[Unit, HotVerifyError]

    hot_verify_control

    fn hot_verify_control(func : HotFunc) -> Result[Unit, HotVerifyError]

    hot_verify_control_or_abort

    fn hot_verify_control_or_abort(func : HotFunc) -> Unit

    hot_verify_core

    fn hot_verify_core(func : HotFunc) -> Result[Unit, HotVerifyError]

    hot_verify_core_or_abort

    fn hot_verify_core_or_abort(func : HotFunc) -> Unit

    hot_verify_dominators

    fn hot_verify_dominators(cfg : HotCfg, dom : HotDominators) -> Result[Unit, HotVerifyError]

    hot_verify_node_exact_instr_payload

    fn hot_verify_node_exact_instr_payload(func : HotFunc, node_id : Int) -> Bool

    hot_verify_ssa

    fn hot_verify_ssa(func : HotFunc, cfg : HotCfg, ssa : HotLocalSsa) -> Result[Unit, HotVerifyError]

    hot_visit_continue

    fn[S, E] hot_visit_continue(state : S) -> HotVisitCtl[S, E]

    hot_visit_error

    fn[S, E] hot_visit_error(err : E) -> HotVisitCtl[S, E]

    hot_visit_skip

    fn[S, E] hot_visit_skip(state : S) -> HotVisitCtl[S, E]

    hot_visit_stop

    fn[S, E] hot_visit_stop(state : S) -> HotVisitCtl[S, E]

    hot_walk_control_regions

    fn[S, E] hot_walk_control_regions(func : HotFunc, control_id : Int, initial : S, visit : (S, Int, HotControlRegionSlotInfo, Int) -> HotVisitCtl[S, E]) -> Result[S, E]

    hot_walk_region

    fn[S, E] hot_walk_region(func : HotFunc, region_id : Int, initial : S, visit : (S, Int, Int) -> HotVisitCtl[S, E]) -> Result[S, E]

    hot_walk_subtree_postorder

    fn[S, E] hot_walk_subtree_postorder(func : HotFunc, root_id : Int, initial : S, visit : (S, Int) -> HotVisitCtl[S, E]) -> Result[S, E]

    hot_walk_subtree_preorder

    fn[S, E] hot_walk_subtree_preorder(func : HotFunc, root_id : Int, initial : S, visit : (S, Int) -> HotVisitCtl[S, E]) -> Result[S, E]

    hot_weaken_body_local_to_nullable_ref

    fn hot_weaken_body_local_to_nullable_ref(func : HotFunc, local_id : Int) -> Bool

    hot_worklist_walk

    fn[S, E] hot_worklist_walk(func : HotFunc, seeds : Array[Int], initial : S, visit : (S, Int) -> HotVisitCtl[S, E]) -> Result[S, E]

    ir_test_assert_verify_and_lower

    fn ir_test_assert_verify_and_lower(fixture : IrTestHotFixture) ->
    Module

    ir_test_build_hot_from_wat

    fn ir_test_build_hot_from_wat(text : String, code_idx? : Int) -> IrTestHotFixture

    ir_test_dump_cfg

    fn ir_test_dump_cfg(func : HotFunc) -> String

    ir_test_dump_dom

    fn ir_test_dump_dom(func : HotFunc) -> String

    ir_test_dump_liveness

    fn ir_test_dump_liveness(func : HotFunc) -> String

    ir_test_dump_ssa

    fn ir_test_dump_ssa(func : HotFunc) -> String

    live_in

    fn live_in(liveness : HotLiveness, block_id : Int) -> Bitset

    live_out

    fn live_out(liveness : HotLiveness, block_id : Int) -> Bitset

    liveness_build

    fn liveness_build(cfg : HotCfg, use_def : HotUseDef, include_exceptional_edges? : Bool) -> HotLiveness

    liveness_build_from_func

    fn liveness_build_from_func(func : HotFunc, cfg : HotCfg, include_exceptional_edges? : Bool) -> HotLiveness

    Build complete liveness without unused node-use and per-local use-site overlays. The CFG must describe the same current function snapshot; rebuild after mutation. Uses the same block scan, shape checks and fixed-point solver as liveness_build.

    local_graph_build

    fn local_graph_build(func : HotFunc, cfg : HotCfg) -> HotLocalGraph

    local_graph_build_full_flow

    fn local_graph_build_full_flow(func : HotFunc, cfg : HotCfg) -> HotLocalGraph

    local_graph_build_read_sources

    fn local_graph_build_read_sources(func : HotFunc, cfg : HotCfg, selected_gets? : Array[Bool]?) -> HotLocalReadSources

    Include exceptional flow with the same ordered sources as the full graph. An optional arena-sized read mask limits published rows to selected gets. Unselected rows are empty/unknown; every selected row keeps full-flow sources. The mask is borrowed only during construction, never retained or mutated.

    local_graph_can_move_set_past_node

    fn local_graph_can_move_set_past_node(func : HotFunc, cfg : HotCfg, graph : HotLocalGraph, set_id : Int, obstacle_id : Int) -> Array[Int]

    local_graph_entry_source_has_legal_default

    fn local_graph_entry_source_has_legal_default(graph : HotLocalGraph, local_id : Int) -> Bool

    local_graph_entry_source_is_default

    fn local_graph_entry_source_is_default(graph : HotLocalGraph, local_id : Int) -> Bool

    local_graph_entry_source_is_param

    fn local_graph_entry_source_is_param(graph : HotLocalGraph, local_id : Int) -> Bool

    local_graph_get_is_merge

    fn local_graph_get_is_merge(graph : HotLocalGraph, node_id : Int) -> Bool

    local_graph_get_is_single_source

    fn local_graph_get_is_single_source(graph : HotLocalGraph, node_id : Int) -> Bool

    local_graph_influenced_gets_for_set

    fn local_graph_influenced_gets_for_set(graph : HotLocalGraph, node_id : Int) -> Array[Int]

    local_graph_influenced_gets_for_write

    fn local_graph_influenced_gets_for_write(graph : HotLocalGraph, node_id : Int) -> Array[Int]

    local_graph_local_is_already_ssa

    fn local_graph_local_is_already_ssa(graph : HotLocalGraph, local_id : Int) -> Bool

    local_graph_node_is_write

    fn local_graph_node_is_write(graph : HotLocalGraph, node_id : Int) -> Bool

    local_graph_reaching_source_count_for_get

    fn local_graph_reaching_source_count_for_get(graph : HotLocalGraph, node_id : Int) -> Int

    Read a stable LocalGraph snapshot without materializing an owned source array. Zero sources means the read has no represented reaching definition; consumers that require a complete proof must retain their unknown fallback.

    local_graph_reaching_source_for_get

    fn local_graph_reaching_source_for_get(graph : HotLocalGraph, node_id : Int, source_index : Int) -> HotLocalGraphSource

    Read one source in the same order as the owned query. The source index must be below local_graph_reaching_source_count_for_get. This query does not expose or copy the graph's internal source row.

    local_graph_reaching_source_value_for_get

    fn local_graph_reaching_source_value_for_get(graph : HotLocalGraph, node_id : Int, source_index : Int) -> HotLocalGraphSourceValue

    Same checked indices and order as the enum query, with a scalar return.

    local_graph_reaching_sources_for_get

    fn local_graph_reaching_sources_for_get(graph : HotLocalGraph, node_id : Int) -> Array[HotLocalGraphSource]

    local_graph_source_is_default_entry

    fn local_graph_source_is_default_entry(graph : HotLocalGraph, source : HotLocalGraphSource) -> Bool

    local_graph_source_is_defaultable_entry

    fn local_graph_source_is_defaultable_entry(graph : HotLocalGraph, source : HotLocalGraphSource) -> Bool

    local_graph_source_is_param_entry

    fn local_graph_source_is_param_entry(graph : HotLocalGraph, source : HotLocalGraphSource) -> Bool

    local_graph_write_has_merge_influences

    fn local_graph_write_has_merge_influences(graph : HotLocalGraph, node_id : Int) -> Bool

    local_graph_write_is_no_merge_freshenable

    fn local_graph_write_is_no_merge_freshenable(graph : HotLocalGraph, node_id : Int) -> Bool

    local_graph_write_is_set

    fn local_graph_write_is_set(graph : HotLocalGraph, node_id : Int) -> Bool

    local_graph_write_is_tee

    fn local_graph_write_is_tee(graph : HotLocalGraph, node_id : Int) -> Bool

    local_graph_write_local_id

    fn local_graph_write_local_id(graph : HotLocalGraph, node_id : Int) -> Int

    local_live_in

    fn local_live_in(liveness : HotLiveness, block_id : Int, local_id : Int) -> Bool

    local_live_out

    fn local_live_out(liveness : HotLiveness, block_id : Int, local_id : Int) -> Bool

    local_read_nodes

    fn local_read_nodes(use_def : HotUseDef, local_id : Int) -> Array[Int]

    local_read_nodes_borrowed

    fn local_read_nodes_borrowed(use_def : HotUseDef, local_id : Int) -> Array[Int]

    Return direct internal local-read node storage for read-only callers.

    This avoids allocating a full copy of the local-read list. Callers must not mutate the returned array.

    local_read_source_count_for_get

    fn local_read_source_count_for_get(graph : HotLocalReadSources, node_id : Int) -> Int

    local_read_source_value_for_get

    fn local_read_source_value_for_get(graph : HotLocalReadSources, node_id : Int, source_index : Int) -> HotLocalGraphSourceValue

    local_write_block_ids

    fn local_write_block_ids(use_def : HotUseDef, local_id : Int) -> Array[Int]

    local_write_nodes

    fn local_write_nodes(use_def : HotUseDef, local_id : Int) -> Array[Int]

    local_write_nodes_borrowed

    fn local_write_nodes_borrowed(use_def : HotUseDef, local_id : Int) -> Array[Int]

    Return direct internal local-write node storage for read-only callers.

    This avoids allocating a full copy of the local-write list. Callers must not mutate the returned array.

    loop_blocks

    fn loop_blocks(info : HotLoopInfo, loop_id : Int) -> Array[Int]

    loop_depth

    fn loop_depth(info : HotLoopInfo, block_id : Int) -> Int

    loop_exits

    fn loop_exits(info : HotLoopInfo, loop_id : Int) -> Array[HotLoopExit]

    loop_for_block

    fn loop_for_block(info : HotLoopInfo, block_id : Int) -> Int?

    loop_header

    fn loop_header(info : HotLoopInfo, loop_id : Int) -> Int

    loop_info_build

    fn loop_info_build(cfg : HotCfg, dom : HotDominators) -> HotLoopInfo

    loop_info_debug_dump

    fn loop_info_debug_dump(info : HotLoopInfo) -> String

    loop_latches

    fn loop_latches(info : HotLoopInfo, loop_id : Int) -> Array[Int]

    node_use_count

    fn node_use_count(use_def : HotUseDef, node_id : Int) -> Int

    node_use_sites

    fn node_use_sites(use_def : HotUseDef, node_id : Int) -> Array[HotUseSite]

    node_use_sites_borrowed

    fn node_use_sites_borrowed(use_def : HotUseDef, node_id : Int) -> Array[HotUseSite]

    Return direct internal node-use site storage for read-only callers.

    This avoids allocating a full copy of the use sites vector. Callers must not mutate the returned array.

    postdom_build

    fn postdom_build(cfg : HotCfg) -> HotPostDominators

    postdom_children

    fn postdom_children(postdom : HotPostDominators, block_id : Int) -> Array[Int]

    postdom_debug_dump

    fn postdom_debug_dump(postdom : HotPostDominators) -> String

    postdom_frontier

    fn postdom_frontier(postdom : HotPostDominators, block_id : Int) -> Array[Int]

    postdom_ipdom

    fn postdom_ipdom(postdom : HotPostDominators, block_id : Int) -> Int?

    postdom_postdominates

    fn postdom_postdominates(postdom : HotPostDominators, lhs : Int, rhs : Int) -> Bool

    ssa_assign_concrete_locals

    fn ssa_assign_concrete_locals(func : HotFunc, ssa : HotLocalSsa, preserve_write_nodes? :
    BitSet
    ) -> HotSsaConcreteLocals

    ssa_build_local

    fn ssa_build_local(func : HotFunc, cfg : HotCfg, dom : HotDominators, liveness : HotLiveness, use_def : HotUseDef) -> HotLocalSsa

    ssa_def_for_local_set

    fn ssa_def_for_local_set(ssa : HotLocalSsa, node_id : Int) -> Int

    ssa_default_init_def

    fn ssa_default_init_def(local_id : Int) -> HotSsaValueOrigin

    ssa_destroy_into_hot

    fn ssa_destroy_into_hot(func : HotFunc, cfg : HotCfg, ssa : HotLocalSsa, policy? : HotSsaDestroyPolicy, preserve_write_nodes? :
    BitSet
    ) -> HotSsaConcreteLocals

    ssa_destruction_policy

    fn ssa_destruction_policy() -> HotSsaDestructionPolicy

    ssa_insert_predecessor_copies

    fn ssa_insert_predecessor_copies(func : HotFunc, region_ref : HotRegionRef, predecessor_block : HotBlockInfo, copies : Array[HotSsaCopy]) -> Array[Int]

    ssa_local_set_def

    fn ssa_local_set_def(node_id : Int) -> HotSsaValueOrigin

    ssa_local_tee_def

    fn ssa_local_tee_def(node_id : Int) -> HotSsaValueOrigin

    ssa_maybe_def_for_local_set

    fn ssa_maybe_def_for_local_set(ssa : HotLocalSsa, node_id : Int) -> Int?

    ssa_param_entry_def

    fn ssa_param_entry_def(local_id : Int) -> HotSsaValueOrigin

    ssa_phi_block

    fn ssa_phi_block(ssa : HotLocalSsa, phi_id : Int) -> Int

    ssa_phi_def

    fn ssa_phi_def(phi_id : Int) -> HotSsaValueOrigin

    ssa_phi_inputs

    fn ssa_phi_inputs(ssa : HotLocalSsa, phi_id : Int) -> Array[HotSsaPhiInput]

    ssa_phi_local

    fn ssa_phi_local(ssa : HotLocalSsa, phi_id : Int) -> Int

    ssa_phi_nodes_are_overlay_only

    fn ssa_phi_nodes_are_overlay_only() -> Bool

    ssa_phi_placement_blocks

    fn ssa_phi_placement_blocks(func : HotFunc, cfg : HotCfg, dom : HotDominators, liveness : HotLiveness, use_def : HotUseDef, rpo : Array[Int], local_id : Int) -> Array[Int]

    ssa_phis_for_block

    fn ssa_phis_for_block(ssa : HotLocalSsa, block_id : Int) -> Array[Int]

    ssa_remove_dead_local_defs

    fn ssa_remove_dead_local_defs(func : HotFunc, dead_nodes : Array[Int]) -> Unit

    ssa_rename_policy

    fn ssa_rename_policy() -> HotSsaRenamePolicy

    ssa_rewrite_local_use

    fn ssa_rewrite_local_use(func : HotFunc, node_id : Int, local_id : Int) -> Unit

    ssa_simple_condition_value_block_allowed

    fn ssa_simple_condition_value_block_allowed(func : HotFunc, block_id : Int) -> Bool

    ssa_simple_drop_result_if_allowed

    fn ssa_simple_drop_result_if_allowed(func : HotFunc, drop_id : Int, operand_slot : Int, if_id : Int) -> Bool

    ssa_simple_drop_value_block_allowed

    fn ssa_simple_drop_value_block_allowed(func : HotFunc, drop_id : Int, operand_slot : Int, block_id : Int) -> Bool

    ssa_simple_result_if_arm_value_block_allowed

    fn ssa_simple_result_if_arm_value_block_allowed(func : HotFunc, if_result_type :
    ValType
    , block_id : Int) -> Bool

    ssa_simple_value_block_operand_allowed

    fn ssa_simple_value_block_operand_allowed(func : HotFunc, block_id : Int) -> Bool

    ssa_uses_of_value

    fn ssa_uses_of_value(ssa : HotLocalSsa, value_id : Int) -> Array[HotSsaUseOrigin]

    ssa_v1_exclusions

    fn ssa_v1_exclusions() -> Array[HotSsaExcludedFeature]

    ssa_value_for_local_get

    fn ssa_value_for_local_get(ssa : HotLocalSsa, node_id : Int) -> Int

    ssa_value_origin

    fn ssa_value_origin(ssa : HotLocalSsa, value_id : Int) -> HotSsaValueOrigin

    ssa_value_type

    fn ssa_value_type(ssa : HotLocalSsa, value_id : Int) ->
    ValType

    use_def_build

    fn use_def_build(func : HotFunc, cfg? : HotCfg?) -> HotUseDef

    use_def_build_node_uses

    fn use_def_build_node_uses(func : HotFunc) -> HotUseDef