Add Stage‑B positive canaries (emit→Gate‑C): print/binop/if/loop/array/map/string with safe skip when emit empty; Add shared stageb_helpers.sh; Fix semicolons in test code.

This commit is contained in:
nyash-codex
2025-11-01 20:06:41 +09:00
parent acdc4cbd84
commit 2dd28e4123
9 changed files with 234 additions and 0 deletions

View File

@ -315,11 +315,16 @@ impl NyashRunner {
}
}
crate::runner::child_env::pre_run_reset_oob_if_strict();
crate::runner::child_env::pre_run_reset_oob_if_strict();
self.execute_mir_module(&module);
if crate::config::env::oob_strict_fail() && crate::runtime::observe::oob_seen() {
eprintln!("[selfhost][oob-strict] Out-of-bounds observed → exit(1)");
std::process::exit(1);
}
if crate::config::env::oob_strict_fail() && crate::runtime::observe::oob_seen() {
eprintln!("[selfhost][oob-strict] Out-of-bounds observed → exit(1)");
std::process::exit(1);
}
return true;
} else {
return false;
@ -406,7 +411,12 @@ impl NyashRunner {
std::process::exit(code);
}
}
crate::runner::child_env::pre_run_reset_oob_if_strict();
self.execute_mir_module(&module);
if crate::config::env::oob_strict_fail() && crate::runtime::observe::oob_seen() {
eprintln!("[selfhost][oob-strict] Out-of-bounds observed → exit(1)");
std::process::exit(1);
}
true
}
Err(e) => {