docs: add MIR13 mode doc and set PHI-off as default; bridge lowering split (if/loop/try); llvmlite resolver stabilization; curated runner default PHI-off; refresh CURRENT_TASK.md

This commit is contained in:
Selfhosting Dev
2025-09-17 10:58:12 +09:00
parent 31f90012e0
commit d99b941218
131 changed files with 2584 additions and 2657 deletions

View File

@ -117,6 +117,20 @@ pub(crate) fn execute_file_with_backend(runner: &NyashRunner, filename: &str) {
}
runner.execute_vm_mode(filename);
}
"interpreter" => {
eprintln!("⚠ interpreter backend is legacy and deprecated. Use 'vm' (PyVM/LLVM) instead.");
if std::env::var("NYASH_VM_USE_PY").ok().as_deref() == Some("1") {
if std::env::var("NYASH_CLI_VERBOSE").ok().as_deref() == Some("1") {
println!("👉 Redirecting to VM backend (PyVM) as requested by NYASH_VM_USE_PY=1");
}
runner.execute_vm_mode(filename);
} else {
if std::env::var("NYASH_CLI_VERBOSE").ok().as_deref() == Some("1") {
println!("👉 Redirecting to VM backend");
}
runner.execute_vm_mode(filename);
}
}
#[cfg(feature = "cranelift-jit")]
"jit-direct" => {
if std::env::var("NYASH_CLI_VERBOSE").ok().as_deref() == Some("1") {
@ -142,23 +156,9 @@ pub(crate) fn execute_file_with_backend(runner: &NyashRunner, filename: &str) {
}
runner.execute_llvm_mode(filename);
}
_ => {
if std::env::var("NYASH_CLI_VERBOSE").ok().as_deref() == Some("1") {
println!(
"🦀 Nyash Rust Implementation - Executing file: {} 🦀",
filename
);
if let Some(fuel) = runner.config.debug_fuel {
println!("🔥 Debug fuel limit: {} iterations", fuel);
} else {
println!("🔥 Debug fuel limit: unlimited");
}
println!("====================================================");
}
super::modes::interpreter::execute_nyash_file(
filename,
runner.config.debug_fuel.clone(),
);
other => {
eprintln!("❌ Unknown backend: {}. Use 'vm' or 'llvm' (or 'interpreter' legacy).", other);
std::process::exit(2);
}
}
}