Expand description
Structural check for the bootstrap-as-function composition tree.
Every Module’s bootstrap recording emits its own FunctionProto
stamped MODULE_PHASE_BOOTSTRAP. A parent Module that composes
children via ModuleCall::bootstrap(g) records a CALL NodeProto
into its own bootstrap pointing at the child’s
"<child>__bootstrap" FunctionProto. This pass walks the call
graph rooted at the target’s bootstrap and surfaces:
CompileError::BootstrapCompositionGapwhen a Call points at a bootstrap function name that has no matching FunctionProto in the model — the engine’s FunctionCall dispatch would refuse to seed a CallContext for a missing target.CompileError::BootstrapCompositionCyclewhen the function-call graph is not a DAG. Bootstrap completion is one-shot; a cycle in the composition tree wedges the engine inbootstrap_pendingforever.
Runs at the top level of the compile pipeline — before inlining or partitioning can rearrange the function table — so the error surfaces against the recorded composition shape the author wrote.
Functions§
- validate_
bootstrap_ composition - Walk the bootstrap-call graph rooted at
<target>__bootstrapand verify every reachable Call resolves to an existing FunctionProto.