feat(v4): every word but the ten is called, so it can be checked
Plan 2026-10-20 (ENGINE step 4), Task A2, for #189. Captain Bob, 2026-11-13: "The ten"; "Accept it". - compile.f18 (COMPILE,): a word is copied in line only when it is flagged in-line and compile-only (24) -- the ten that work on the return stack, >R R> R@ I J LEAVE and the later UNLOOP 2>R 2R> 2R@. Every other word, in-line ones too, is a call the hook at `call` sees. - EXECUTE calls the xt: `call xt` (opcode 3, slot 0) and a ; in (EXEC), run. INTERPRET runs a word by (GO): `call xt` and `jump (IL)` in (RUNX), entered by a jump, at the old return-stack depth. - host_map.h: (EXEC) BUF0_W-22, (RUNX) BUF0_W-115, from what was free. - Its cost, accepted: one return entry at the bottom of a chain (30 deep from the prompt, not 31) and one per explicit EXECUTE while its word runs; the hosted boot +2.4% (2.917 s to 2.987 s), instructions +0.4%. - Tests first (logs/20261113-045122/a2): inline_words_are_called, residue_stays_inline, execute_passes_the_hook, rstack_kept_across_call, abandoned_definition_not_called -- 3 of 1096 failed before. The depth checks moved to the new figures; SEE shows the calls; two layout checks use in-line test words; 2>R 2R@ 2R> checked in test_host_quit. - DECOMPOSITION.md EXECUTE, the plan's A2 and rulings, FABRIC-3 XLVIII.22. Suite: test, test-32 99 programs 0 failures; v4-checks 79 under the sanitizers 0 failures, the hosted builds alike; hosted POST 539/539. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
This commit is contained in:
@@ -179,10 +179,16 @@ acceptance. Only Part A is written in tasks below; it does not depend on Q1 to Q
|
||||
|
||||
**Interfaces:** Consumes A1's hook (the test sets it to observe).
|
||||
|
||||
- [ ] **Step 1: Failing tests** `inline_words_are_called` (for each callable in-line word of `V3-PARITY.md` 1f, a definition using it produces a call the hook sees), `residue_stays_inline` (`>R R> R@ I J LEAVE` compile in line), `execute_passes_the_hook` (`' DUP EXECUTE` seen once; Review Focus 1, from inside a definition that goes on after), `rstack_kept_across_call` (Review Focus 2), `abandoned_definition_not_called` (Review Focus 4).
|
||||
- [ ] **Step 2:** Run — FAIL.
|
||||
- [ ] **Step 3:** The compiler's in-line table becomes the six; `EXECUTE` calls the xt. Regenerate the maps (`make -C v4 sysmap`).
|
||||
- [ ] **Step 4:** Suite passes; POST 538/538; record the new `dict_hash` (equal at both widths' products as before).
|
||||
- [x] **Step 1: Failing tests** `inline_words_are_called` (for each callable in-line word of `V3-PARITY.md` 1f, a definition using it produces a call the hook sees), `residue_stays_inline` (`>R R> R@ I J LEAVE` compile in line), `execute_passes_the_hook` (`' DUP EXECUTE` seen once; Review Focus 1, from inside a definition that goes on after), `rstack_kept_across_call` (Review Focus 2), `abandoned_definition_not_called` (Review Focus 4).
|
||||
- [x] **Step 2:** Run — FAIL.
|
||||
- [x] **Step 3:** The compiler's in-line table becomes the six; `EXECUTE` calls the xt. Regenerate the maps (`make -C v4 sysmap`).
|
||||
**Ruled 2026-11-13 (Captain Bob): "The ten"** -- four later words also work on the return stack
|
||||
(`UNLOOP 2>R 2R> 2R@`, `words.f18`, `forth.f18`) and stay in line with the six: every word flagged
|
||||
in-line *and* compile-only (24), decided by the flag. **And "Accept it"**: a call at the bottom of a
|
||||
chain costs one return entry (words nest from the prompt 30 deep, not 31, at 32 entries), and each
|
||||
explicit `EXECUTE` one while its word runs (recursion through `EXECUTE` gets half as deep). The
|
||||
interpreter runs a word by `(GO)` (`compile.f18`), at the old depth.
|
||||
- [x] **Step 4:** Suite passes; POST 538/538; record the new `dict_hash` (equal at both widths' products as before). (POST is 539 since #190.)
|
||||
- [ ] **Step 5:** Full acceptance (three boots, test-32; boot times before and after, Review Focus 5); commit `feat(v4): every word but the six is called, so it can be checked`, then the logs.
|
||||
|
||||
Phase 1's plan is written when Part A is accepted and Q1 to Q5 are ruled.
|
||||
|
||||
Reference in New Issue
Block a user