Phase 20.34 prep: add using aliases in nyash.toml for hako.mir.builder & hako.llvm.emit; add README contracts for MirBuilderBox/LLVMEmitBox; verify canaries green
This commit is contained in:
22
lang/src/mir/builder/README.md
Normal file
22
lang/src/mir/builder/README.md
Normal file
@ -0,0 +1,22 @@
|
||||
# MirBuilderBox — Program(JSON v0) → MIR(JSON v0)
|
||||
|
||||
Responsibility
|
||||
- Convert Stage‑B Program(JSON v0) into MIR(JSON v0) for VM/LLVM lines.
|
||||
- Phase 20.34 starts with a delegate implementation to Runner and progressively internalizes ops.
|
||||
|
||||
Interface (stable)
|
||||
- `emit_from_program_json_v0(program_json: String, opts: Map|Null) -> String|Null`
|
||||
- Returns canonical MIR(JSON v0) on success; returns null and prints a tagged diagnostic on failure.
|
||||
|
||||
Tags (Fail‑Fast, stable)
|
||||
- `[mirbuilder/input/null]` — input is null
|
||||
- `[mirbuilder/input/invalid]` — header missing (version/kind)
|
||||
- `[mirbuilder/delegate]` — delegate path selected (Runner `--program-json-to-mir`)
|
||||
- `[mirbuilder/delegate/missing]` — delegate/provider not wired yet
|
||||
|
||||
Toggles (default OFF)
|
||||
- `HAKO_MIR_BUILDER_DELEGATE=1`: Use Runner `--program-json-to-mir` as a temporary provider
|
||||
|
||||
Notes
|
||||
- Box‑First policy: boundary/contract first, then implementation. Keep tags stable; no silent fallback.
|
||||
- Large payloads: implementation may stream/json-scan later; initial version is string‑based.
|
||||
Reference in New Issue
Block a user