m2comp-step7)MGen.DumpImage prints the assembled image to StdOut after every
successful emit: global layout per scope (name/slot/size), the
procedure table (number/address/depth), then disassembled code
with resolved labels. Unknown bytes degrade to DB (never fail).
A full sweep over all test sources shows zero unknowns. Suite
65/65 (61 inherited + 4 listing checks).
src/MGen.def/.mod: DumpImage + helpers (WrS/WrI/WrHex2/
WrHexQ/WrOp/OpLen/LabelAt). Instruction sizes: 1, 2 (u8/ext),
9 (immW/jp/jpfalse); imm0..15, signed local slots, loadParam
for 03H..07H; jumps resolve to L<n> (else +rel); immW
payloads as 16 hex digits.compiler.frm): DumpImage after a successful
EmitModule (listings already written, verdict last).run_tests.sh: expect_code (compile + grep backend listing):
realCmp in r_real (listing-level guard for the step-5.2 D5
fix), proc-table entry in r_proc, jpfalse in t_case,
storeIndir0 in t_with.immW printed 32 hex digits (nibble helper already emits two
chars each — dropped the manual split).84H/85H leaves take a u8 param count (undocumented in the
local table); missing size broke alignment and swallowed a
label. Same class of latent defect the listing exists to catch..LST basename, so the
committed listing is whichever unit compiles last; ad-hoc
single-file compiles leave stale content behind. Canonical
state = one full suite run (each session's last writer wins).d_basic twice
in one process (duplicate errors, never reaching the driver
gate). It now uses a dedicated empty tests/d_second.mod, so
both programs parse clean and the driver's program-last gate
fires with clean listings on both sides.