Phase 10.7 (NYASH_JIT_PHI_MIN=1): Minimal PHI support for single-diamond via block params; extend IRBuilder with block-param/jump-args APIs; implement in CraneliftBuilder; update LowerCore two-pass for PHI wiring.
This commit is contained in:
17
examples/jit_loop_early_return.nyash
Normal file
17
examples/jit_loop_early_return.nyash
Normal file
@ -0,0 +1,17 @@
|
||||
// JIT loop early-return demo (no PHI needed)
|
||||
// Enable: NYASH_JIT_EXEC=1 NYASH_JIT_THRESHOLD=1
|
||||
|
||||
static box Main {
|
||||
main() {
|
||||
local i
|
||||
i = 0
|
||||
loop(i < 10) {
|
||||
if (i == 3) {
|
||||
return 99
|
||||
}
|
||||
i = i + 1
|
||||
}
|
||||
return -1
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user