stage3: unify to cleanup; MIR return-defer; docs+smokes updated; LLVM(harness): finalize_phis ownership, ret.py simplified, uses-predeclare; cleanup return override green; method-postfix cleanup return WIP (PHI head)

This commit is contained in:
Selfhosting Dev
2025-09-19 02:07:38 +09:00
parent 951a050592
commit 5e818eeb7e
205 changed files with 9671 additions and 1849 deletions

View File

@ -0,0 +1,21 @@
// Blockpostfix catch sample (Stage3 gated)
// Enable: NYASH_PARSER_STAGE3=1 (or NYASH_BLOCK_CATCH=1) + NYASH_TRY_RESULT_MODE=1 for JSON v0 Bridge
function main() {
local y
y = 0
{
// try body
// do_something_dangerous()
throw "E"
} catch (e) {
// handle error
y = 42
} cleanup {
// cleanup
y = y + 1
}
return y
}