Phase 10_6b scheduler complete; 10_4 GC hooks + counting/strict tracing; 10_c minimal JIT path (i64/bool consts, binop/compare/return, hostcall opt-in); docs & examples; add Phase 10.7 roadmap (JIT branch wiring + minimal ABI).

This commit is contained in:
Moe Charm
2025-08-27 17:06:46 +09:00
parent de03514085
commit ddae7fe1fc
67 changed files with 4618 additions and 268 deletions

View File

@ -80,7 +80,15 @@ impl JitManager {
/// 10_c: execute compiled function if present (stub: empty args). Returns Some(VMValue) if JIT path was taken.
pub fn execute_compiled(&self, func: &str, args: &[crate::backend::vm::VMValue]) -> Option<crate::backend::vm::VMValue> {
if let Some(h) = self.handle_of(func) {
return self.engine.execute_handle(h, args);
// Expose current args to hostcall shims
crate::jit::rt::set_current_args(args);
let t0 = std::time::Instant::now();
let out = self.engine.execute_handle(h, args);
if std::env::var("NYASH_JIT_STATS").ok().as_deref() == Some("1") {
let dt = t0.elapsed();
eprintln!("[JIT] exec_time_ms={} for {}", dt.as_millis(), func);
}
return out;
}
None
}