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
14 lines
608 B
Plaintext
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)
|
|
}
|
|
}
|