mirror of
https://github.com/imjasonh/nescript
synced 2026-07-08 17:06:04 +00:00
Adds two items from the "Code quality / tooling" section of docs/future-work.md. Both make it easier to chase regressions without touching codegen. - `nescript build --no-opt` skips the IR optimizer pass so optimizer-introduced miscompiles can be bisected against the unoptimized output. Threaded through CompileOptions and gated at the single optimizer call site in src/main.rs. Covered by a new integration test that compiles the same program twice (opt on / opt off) and asserts both outputs are valid iNES ROMs with matching headers and reset vectors. - A criterion-based `benches/compile.rs` harness that times the full parse -> analyze -> lower -> optimize -> codegen -> link pipeline on every examples/*.ne file. Sources are pre-read into memory so file I/O stays off the hot loop, and each example gets its own Criterion group for easy regression spotting. Committed ROM bytes under examples/*.nes are unchanged; the emulator goldens under tests/emulator/goldens/ are untouched. |
||
|---|---|---|
| .. | ||
| emulator | ||
| integration | ||
| integration_test.rs | ||