Files
hakorune/apps/selfhost/vm/mir_min_entry.nyash
nyash-codex 34be7d2d79 vm/router: minimal special-method extension (equals/1); toString mapping kept
mir: add TypeCertainty to Callee::Method (diagnostic only); plumb through builder/JSON/printer; backends ignore behaviorally

using: confirm unified prelude resolver entry for all runner modes

docs: update Callee architecture with certainty; update call-instructions; CURRENT_TASK note

tests: quick 40/40 PASS; integration (LLVM) 17/17 PASS
2025-09-28 01:33:58 +09:00

14 lines
608 B
Plaintext

// mir_min_entry.nyash — MirVmMin の薄いエントリ
// 引数があれば JSON を第1引数から受け取る。無ければデフォルトの const→ret (42)。
using selfhost.vm.mir_min as MirVmMin
static box Main {
main(args) {
// 既定の最小 MIR(JSON v0)
local json = "{\"functions\":[{\"name\":\"main\",\"params\":[],\"blocks\":[{\"id\":0,\"instructions\":[{\"op\":\"const\",\"dst\":1,\"value\":{\"type\":\"i64\",\"value\":42}},{\"op\":\"ret\",\"value\":1}]}]}]}"
if args { if args.size() > 0 { local s = args.get(0) if s { json = s } } }
return MirVmMin.run(json)
}
}