runner: introduce CoreExecutor box for JSON→exec; wire Gate‑C pipe to CoreExecutor. Stage‑B bundling: duplicate name Fail‑Fast + mix canary; add Core Map/String positive smokes; add Gate‑C budget opt‑in canary; docs: Exit Code Policy; apply child_env in PyVM common util.

This commit is contained in:
nyash-codex
2025-11-02 15:43:43 +09:00
parent 110b4f3321
commit a1d5b82683
43 changed files with 1077 additions and 99 deletions

View File

@ -134,6 +134,21 @@ impl MirInterpreter {
other => other.to_string(),
};
// Minimal builtin bridge: support print-like globals in legacy form
// Accept: "print", "nyash.console.log", "env.console.log", "nyash.builtin.print"
match raw.as_str() {
"print" | "nyash.console.log" | "env.console.log" | "nyash.builtin.print" => {
if let Some(a0) = args.get(0) {
let v = self.reg_load(*a0)?;
println!("{}", v.to_string());
} else {
println!("");
}
return Ok(VMValue::Void);
}
_ => {}
}
// Resolve function name using unique-tail matching
let fname = call_resolution::resolve_function_name(
&raw,
@ -539,6 +554,16 @@ impl MirInterpreter {
args: &[ValueId],
) -> Result<VMValue, VMError> {
match extern_name {
// Minimal console externs
"nyash.console.log" | "env.console.log" | "print" | "nyash.builtin.print" => {
if let Some(arg_id) = args.get(0) {
let v = self.reg_load(*arg_id)?;
println!("{}", v.to_string());
} else {
println!("");
}
Ok(VMValue::Void)
}
"exit" => {
let code = if let Some(arg_id) = args.get(0) {
self.reg_load(*arg_id)?.as_integer().unwrap_or(0)