forth: Phase 5 memory + unsigned compare (Hayes 268→342, 53%)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled

This commit is contained in:
2026-04-24 22:56:26 +00:00
parent 8e1466032a
commit 3ab01b271d
5 changed files with 216 additions and 15 deletions

View File

@@ -85,7 +85,14 @@ Representation:
- [x] Drive Hayes Core pass-rate up
### Phase 5 — Core Extension + optional word sets
- [ ] Full Core + Core Extension
- [x] Memory: `CREATE`, `HERE`, `ALLOT`, `,`, `C,`, `CELL+`, `CELLS`, `ALIGN`, `ALIGNED`, `2!`, `2@`
- [x] Unsigned compare: `U<`, `U>`
- [ ] Mixed/double-cell math: `S>D`, `M*`, `UM*`, `UM/MOD`, `FM/MOD`, `SM/REM`, `*/`, `*/MOD`
- [ ] Double-cell ops: `D+`, `D-`, `D=`, `D<`, `D0=`, `2DUP`, `2DROP`, `2OVER`, `2SWAP` (already), plus `D>S`, `DABS`, `DNEGATE`
- [ ] Number formatting: `<#`, `#`, `#S`, `#>`, `HOLD`, `SIGN`, `.R`, `U.`, `U.R`
- [ ] Parsing/dictionary: `WORD`, `FIND`, `EXECUTE`, `'`, `[']`, `LITERAL`, `POSTPONE`, `>BODY`, `DOES>`
- [ ] Source/state: `SOURCE`, `>IN`, `EVALUATE`, `STATE`, `[`, `]`
- [ ] Misc Core: `WITHIN`, `MAX`/`MIN` (already), `ABORT`, `ABORT"`, `EXIT`, `UNLOOP`
- [ ] File Access word set (via SX IO)
- [ ] String word set (`SLITERAL`, `COMPARE`, `SEARCH`)
- [ ] Target: 100% Hayes Core
@@ -99,6 +106,16 @@ Representation:
_Newest first._
- **Phase 5 — memory primitives + unsigned compare; Hayes 268→342 (53%).**
Added `CREATE`/`HERE`/`ALLOT`/`,`/`C,`/`CELL+`/`CELLS`/`ALIGN`/`ALIGNED`/
`2!`/`2@`/`U<`/`U>`. Generalised `@`/`!`/`+!` to dispatch on address
type: string addresses still go through `state.vars` (VARIABLE/VALUE
cells) while integer addresses now fall through to `state.mem`
letting CREATE-allocated cells coexist with existing variables.
Decomposed the original "Full Core + Core Extension" box into
smaller unticked sub-bullets so iterations land per cluster.
Hayes: 342 pass / 292 error / 4 fail (53%). 237/237 internal.
- **Phase 4 close — LSHIFT/RSHIFT, 32-bit arith truncation, early
binding; Hayes 174→268 (42%).** Added `LSHIFT` / `RSHIFT` as logical
shifts on 32-bit unsigned values, converted through