Explorar el Código

Add stories for the missing compiler driver and interface-expression codegen.

E07-S05 specifies the on-machine n128c driver that prepare-disk and the
compiler launcher already expect; E06-S07 specifies emitting interface
conversions, storage and calls from source. E07-S04 now depends on both, so the
walkthrough cannot be claimed before them.

Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
main
Daniel Covington hace 3 días
padre
commit
0576f7d8ed
Se han modificado 1 ficheros con 57 adiciones y 1 borrados
  1. +57
    -1
      newLang/planning/epics-and-stories.md

+ 57
- 1
newLang/planning/epics-and-stories.md Ver fichero

@@ -555,6 +555,33 @@ compiler/runtime `interfaces.s`, class descriptors, code generation, ABI tests.
approved debug policy promises detection.
- `objects.n8` covers multiple interfaces end to end.

### E06-S07 — Interface expressions in code generation (P0)

**Depends on:** E06-S05, E05-S04, E04-S06

**Acceptance criteria:**

- A concrete-to-interface assignment in a statement, argument, return or
initializer emits the E06-S04 conversion path and stores all four bytes of
the object/table pair; a plain pointer copy is never emitted in its place.
- `null` in an interface context produces the canonical null interface value,
and a call through it takes the documented fault path rather than dispatch.
- Interface-typed locals, parameters, returns and fields hold and copy the full
four bytes, including through array element assignment and struct-style
copies.
- A source-level interface call emits the `if_call` trampoline with the
interface value pointer in A/X and the compile-time slot in Y, and passes
arguments and receives one- and two-byte returns correctly.
- A new on-machine fixture with two classes implementing one interface
dispatches the same call to different methods, and one class implementing two
interfaces dispatches through both, all compiled from source rather than
assembled by hand.
- Misuse stays a stable compile-time diagnostic: assigning an unrelated class
to an interface, calling an interface member the interface does not declare,
and reaching a private member through an interface each report their
catalogued code with no PRG emitted.
- MAP output names the interface tables and slots the emitted code references.

---

## E07 — Vim and Disk Workflow
@@ -600,7 +627,7 @@ integration fixtures, generated `build/` artifacts.

### E07-S04 — Edit/compile/run walkthrough (P1)

**Depends on:** E07-S03, E06-S06
**Depends on:** E07-S03, E06-S06, E06-S07, E07-S05

**Acceptance criteria:**

@@ -609,6 +636,35 @@ integration fixtures, generated `build/` artifacts.
- Failure recovery for syntax errors and output collisions is documented.
- No step requires modifying `vim/` or a reference disk.

### E07-S05 — On-machine compiler driver PRG (P0)

**Depends on:** E07-S01, E04-S01, E04-S06, E02-S04

**Acceptance criteria:**

- `build/n128c.prg` is produced by a documented build script and is the exact
file `scripts/prepare-disk.ps1` injects as `n128c` and
`scripts/launch-compiler.ps1` autostarts, so the shipped disk and the
launcher cannot drift from the driver.
- Started on `x128` (by hand or through the compiler launcher) the driver takes
one source file name, loads it from the session disk through the buffered
PETSCII reader with no host-side conversion, runs lexer, parser and code
generation, and writes the output PRG named after the source.
- The driver writes the ERR and MAP outputs for the same run where the
corresponding stories produce them, and prints a one-screen summary naming
the source, the output, and the diagnostic count.
- A clean source produces a PRG that runs on `x128`; a source with syntax or
semantic errors produces the catalogued diagnostics in the ERR file, a
non-zero diagnostic count, and no output PRG.
- Missing source, unreadable source and an existing output file each end with
the documented message and leave the previous output intact rather than a
partial file.
- A test drives the driver through `scripts/launch-compiler.ps1` on a copied
development image and checks the PRG, ERR and MAP artifacts and the summary.
- `docs/editor-workflow.md` documents the command syntax and the recovery steps
for a failed compile, and E07-S04's walkthrough can be completed with no
undocumented command.

---

## E08 — Hardening and Release


Cargando…
Cancelar
Guardar

Powered by TurnKey Linux.