fix(vm): a text run from inside a line no longer takes the line's place -- LOAD and THRU go on with the rest of it
FABRIC-3.md XXXIV.1, traced and fixed. vm_interpret() copied each text into the VM's one input buffer and reset the position. LOAD runs its block by calling it, so the block replaced the line LOAD was on and nothing after LOAD or THRU on that line was ever interpreted; the same for -->, a capsule's EXEC and a message kernel-Hermes delivers. vm_interpret() now keeps what the outer text had not yet read when it is called from inside another, and puts it back after, as FORTH-79's LOAD keeps the input stream it interrupts. In the kernel's VM and the hosted one alike. POST: LOAD.rest_of_line (1 LOAD 0 0 /) and THRU.rest_of_line (1 2 THRU 0 0 /) failed without the fix (logs/20261014-061222) and pass with it. Three-ISA acceptance: logs/20261014-061508 (amd64), -061624 (aarch64), -061837 (riscv64), 1052 tests, none failed, zuse prompt, hash 0x08873e0f44b7cb2a unchanged. The hosted binary: 100 LOAD 1 + . gives 8. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
9772ee8b68
commit
c15589b39e
Reference in New Issue
Block a user