|
|
|
@@ -108,16 +108,34 @@ supply frame entry points keep their previous code shape (D156). |
|
|
|
`planning/epics-and-stories.md`, `planning/claims/E04-S08.md`. |
|
|
|
- Remaining risks: interface arguments and four-byte interface returns are not |
|
|
|
emitted (E06-S07); arguments are limited to `EM_ARG_MAX` (8) staged values; |
|
|
|
the prologue's failure path returns without a diagnostic, so a refused frame |
|
|
|
is currently silent; and the pre-existing `calls` suite failure described |
|
|
|
below is unrelated but still red. |
|
|
|
|
|
|
|
## Known unrelated failure |
|
|
|
|
|
|
|
`calls` fails on a **fresh** build with `EM_ERR_LABEL` (7) and |
|
|
|
`FL_ERR_STATE` (3), `cg_len = 0x31`, while the same test passes when the build |
|
|
|
directory's older object files are reused. The identical signature reproduces |
|
|
|
on pristine `8a2d8ce` (verified by `git stash` + fresh `build/calls-test`), so |
|
|
|
it predates this story and points at emitter label state that is not |
|
|
|
deterministically initialized. It is not caused by E04-S08 and needs its own |
|
|
|
fix (initialize or validate the per-row method-label table before pass 2). |
|
|
|
and the prologue's failure path returns without a diagnostic, so a refused |
|
|
|
frame is currently silent. |
|
|
|
|
|
|
|
## Related label fix |
|
|
|
|
|
|
|
A fresh-build failure with `EM_ERR_LABEL` (7) and `FL_ERR_STATE` (3) reproduced |
|
|
|
on pristine `8a2d8ce` and was independent of this story. Its cause was the |
|
|
|
method-label table's `$FF` sentinel: any row whose byte was not `$FF` was taken |
|
|
|
as an already-assigned label 0, so a later method redefined it at a different |
|
|
|
offset. `em_reset` now clears the table to zero, `em_method_label` stores each |
|
|
|
label as `id + 1`, and a lookup outside 1..`FL_LABELS` allocates again. Fresh |
|
|
|
`calls` and `args` runs now pass. |
|
|
|
|
|
|
|
The clear loop itself was also wrong: `ldx #$FF` / `dex` / `bpl` stops after |
|
|
|
one row because `$FE` is negative, so ids from the count pass survived into the |
|
|
|
emitting pass after `fl_init` had freed every flow label. The loop now counts |
|
|
|
X up from 0 until it wraps, clearing all 256 rows on every `em_reset`. |
|
|
|
|
|
|
|
## Hello fixture regression |
|
|
|
|
|
|
|
`hello` failed at HEAD with `E227 CANNOT EMIT THIS CODE YET` at `end program` |
|
|
|
(verified passing at `221e0c5`, failing at `5489ae6`). `hello-test.s` never set |
|
|
|
`em_on`, and the new BSS variables moved it onto RAM that VICE's power-on |
|
|
|
pattern leaves non-zero, so the statement emitter ran without print vectors. |
|
|
|
The fixture now clears `em_on` before `parse_file`, as the emitter contract |
|
|
|
requires of every caller. |
|
|
|
|
|
|
|
The `parser` suite's verification passes, but its baseline hashes in |
|
|
|
`tests/regression/baseline.json` predate `221e0c5` and `5489ae6`; pristine |
|
|
|
HEAD's `parser-test.prg` already differs, so that entry needs a reviewed |
|
|
|
refresh. |