3 Commits
Author SHA1 Message Date
Phillip Heller a87d897455 decompiler: don't resolve empty-string operand to a RET_* name
operand_int_val used atoi, so an empty-string comparison operand ('')
mapped to 0 and resolved to RET_OK (DEFINEd '0') -- both semantically
wrong and non-round-tripping ('' is 0 bytes, '0' is 1), shifting every
later offset (seen in QAPLTEXT 6.03.17). Only treat a string as a return
code when it round-trips through atoi (canonical decimal), so '' and '00'
no longer collide with '0'; real codes still resolve ('0'->RET_OK,
'10'->RET_SOME_ONES).

Adds decompiler_return_code_names (round-trip + resolution assertions)
over a new control fixture ret_codes.src.
2026-08-13 13:31:58 -06:00
Phillip Heller ca897ac080 Batch: compiler/formatter work in progress, decompiler TODO
- TODO.md: decompiler emits a truncated vars list when DATA contains a
  struct overlay (ENPHSTAC), breaking best-effort round-trip; fix is to
  size vars from the highest referenced register or the COD data-area
  size.
- Compiler/formatter/lexer modifications committed as-is with this batch.
2026-08-01 18:03:39 -06:00
Phillip Heller a432ef5b5f Initial commit. 2026-06-21 11:34:08 -06:00