Phase 20.34: wire Host providers via externs (env.mirbuilder.emit, env.codegen.emit_object); implement MirBuilder provider (Program→MIR JSON) and ny-llvmc wrapper; update Hako boxes (MirBuilderBox, LLVMEmitProviderBox) to delegate; adjust canaries to PASS (MirBuilder PASS, LLVM SKIP on unresolved or missing ny-llvmc).
This commit is contained in:
@ -21,7 +21,7 @@ static box MirBuilderBox {
|
||||
}
|
||||
|
||||
// Main entry
|
||||
emit_from_program_json_v0(program_json, opts) {
|
||||
method emit_from_program_json_v0(program_json, opts) {
|
||||
if program_json == null {
|
||||
print("[mirbuilder/input/null] program_json is null")
|
||||
return null
|
||||
@ -35,12 +35,13 @@ static box MirBuilderBox {
|
||||
// Delegate-first policy (Phase 20.34 Milestone A)
|
||||
local d = env.get("HAKO_MIR_BUILDER_DELEGATE")
|
||||
if d != null && ("" + d) == "1" {
|
||||
print("[mirbuilder/delegate] use Runner --program-json-to-mir")
|
||||
return null
|
||||
// Call host provider via extern: env.mirbuilder.emit(program_json)
|
||||
local args = new ArrayBox(); args.push(program_json)
|
||||
local ret = hostbridge.extern_invoke("env.mirbuilder", "emit", args)
|
||||
return ret
|
||||
}
|
||||
// Provider not wired yet
|
||||
// Provider not wired → Fail‑Fast tag
|
||||
print("[mirbuilder/delegate/missing] no provider; enable HAKO_MIR_BUILDER_DELEGATE=1")
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user