1
0
Fork 0
mirror of https://github.com/imjasonh/nescript synced 2026-07-18 06:36:57 +00:00

IR codegen: scroll, debug.log, debug.assert

Adds Scroll / DebugLog / DebugAssert variants to IrOp, wires them into
the IR lowering, optimizer liveness tracking, and IR codegen. Scroll
emits two PPU $2005 writes; debug statements emit writes to $4800 when
IrCodeGen::with_debug(true) is set, stripped otherwise. These were the
last feature gaps versus the AST codegen path, so IR codegen is now a
full replacement.

https://claude.ai/code/session_01W6eQFStA66EuMKHUFo2rx3
This commit is contained in:
Claude 2026-04-12 10:43:53 +00:00
parent 8a6441071e
commit d609b77cd7
No known key found for this signature in database
5 changed files with 162 additions and 6 deletions

View file

@ -140,6 +140,7 @@ fn compile(input: &PathBuf, debug: bool, asm_dump: bool, use_ir: bool) -> Result
use nescript::codegen::IrCodeGen;
IrCodeGen::new(&analysis.var_allocations, &ir_program)
.with_sprites(&sprites)
.with_debug(debug)
.generate(&ir_program)
} else {
CodeGen::new(&analysis.var_allocations, &program.constants)