fix(v4): (DOWN) calls the GONE hook and puts (ONE) back; the hand-on swept
Found by the depth sweep: a hook that sent a message about another node overwrote (ONE), which AWAIT reads after believing a GONE, so the wait went on. (DOWN) now calls the hook through (RUN) and restores (ONE). AWAIT ended by a GONE that is handed on: works to 26 values and 21 calls deep, then a stack error and nothing else, at both widths. Removal sweep: node 11 or 12 removed, or the wire cut, at every step: 0 wrong. hosted dict_hash=0x248b4edc47f4357e on all three ISAs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
3506747d5a
commit
529ba0fc48
@@ -84,10 +84,20 @@ macro R-CLEAR RSTACK-DEPTH b! a !b endmacro
|
||||
\ there is one, is given the number of the node that is gone, in (ONE), so
|
||||
\ that the GONE goes on down the birth graph (MESH.md 9a.2, ruling 7;
|
||||
\ capsules/v4/centre.4th, GONE-DOWN). 0 there, as at switch-on: nothing.
|
||||
\ As (DEFINED) does (dict.f18): the xt goes on the return stack and ;
|
||||
\ goes there, so the word returns to whoever called this.
|
||||
\ The word is called, not jumped to, and (ONE) is put back when it
|
||||
\ returns: what called this -- AWAIT, with the node it waits on -- reads
|
||||
\ (ONE) after, and a GONE the word sends writes it. (Found by the depth
|
||||
\ sweep of MESH.md 9a.6: a word that handed on a GONE about another node
|
||||
\ left AWAIT waiting for ever.)
|
||||
|
||||
\ ( n xt -- ) the word whose xt it is, given n. It returns to whoever
|
||||
\ called this, as (DEFINED) does (dict.f18).
|
||||
: (RUN) push ;
|
||||
|
||||
: (DOWN)
|
||||
(GONE-HOOK) b! @b if NONE (ONE) a! @ SWAP push ;
|
||||
(GONE-HOOK) b! @b if NONE
|
||||
drop (ONE) a! @ dup push (GONE-HOOK) b! @b (RUN)
|
||||
pop (ONE) a! ! ;
|
||||
NONE: drop ;
|
||||
|
||||
\ ( -- flag ) A GONE has been taken: its seven words are in (IN), the
|
||||
|
||||
Reference in New Issue
Block a user