pyvm: implement TypeOp(check) + strict match-guard smokes; parser: guard support in match; llvm: PHI wiring at block head + incoming normalization; docs: AGENTS LLVM/PHI + guard policy; add tests; plan: refactor parse_box_declaration + TODO triage + clone reduction + CLI split + LLVM builder split; update CURRENT_TASK.md

This commit is contained in:
Selfhosting Dev
2025-09-19 10:52:57 +09:00
parent e55ce363c3
commit 7dfd55bfdb
22 changed files with 2622 additions and 86 deletions

View File

@ -0,0 +1,12 @@
static box Main {
main(args) {
local d = 1
local r = match d {
1 if (0 == 1) => { print("no") 7 }
1 => { print("yes") 9 }
_ => 0
}
return r
}
}

View File

@ -0,0 +1,13 @@
static box Main {
main(args) {
local x = "hello"
// Expect to match type arm and pass guard (length > 3)
local r = match x {
StringBox(s) if s.length() > 3 => { print("gt3") 1 }
StringBox(s) if s.length() > 10 => { print("gt10") 2 }
_ => { print("other") 0 }
}
return r
}
}