From d5e7a8d8d63e8239ff9caac6de037c7f1175a8ab Mon Sep 17 00:00:00 2001 From: Sebastian Jeong Date: Mon, 17 Aug 2026 01:36:48 +0900 Subject: [PATCH] dev: restore core=dynamic; the trap failures were the PATH bug The previous commit blamed core=dynamic for the M3 bounds cases exiting 0 instead of trapping. That was wrong. Both suspects were live at the time -- the recompiler and a cache hit that skipped BUILD.BAT's `set PATH` -- and the core was ruled out before the PATH line was restored, so the test proved nothing. Retested with the PATH fix in place: core=dynamic gives 50 passed on m3, the traps included. abort() reports its exit status fine under the recompiler. Per milestone, warm cache, all green: m1 2s m2 3s m3 7s m4 3s m5 3s m6 6s m7 5s 29s total against 65s on the interpreter. --- src/ferrolang_vm/dosboxx.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/ferrolang_vm/dosboxx.py b/src/ferrolang_vm/dosboxx.py index d6c8c75..0dcc2b3 100644 --- a/src/ferrolang_vm/dosboxx.py +++ b/src/ferrolang_vm/dosboxx.py @@ -287,13 +287,14 @@ def run_suite(cases: list[Case], *, keep: bool = False, show_dos: bool = False, console = run_root / "CONSOLE.LOG" config = run_root / "DOSBOX.CON" config.write_text( - # Do not tune [cpu] here. core=dynamic is roughly 5x faster but the - # recompiler loses abort()'s exit status -- a program that traps - # exits 0 instead, so the M3 bounds cases stop reporting the trap - # they exist to prove. Verified against a compiler built under - # core=normal, so it is the runtime and not the build. + # core=auto leaves real mode on the interpreter, which is where the + # 16-bit compiler build spends its time. Nothing here is timing + # sensitive -- a compiler and a batch file -- so ask for the + # recompiler explicitly. The M3 bounds cases confirm abort() still + # reports its exit status under it. f"[log]\nlogfile={console}\n" - f"[dosbox]\nlog console=quiet\n", + f"[dosbox]\nlog console=quiet\n" + f"[cpu]\ncore=dynamic\ncycles=max\n", encoding="ascii", ) if cached.is_file():