feat(v4): a believed GONE is handed to the word in (GONE-HOOK) (MESH.md 9a)

COLD takes out a hook it forgets.  The system changed, so dict_hash did:
hosted, all three ISAs, word_count=318 dict_hash=0x1b5c633fd6bdd143.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rajames
2026-10-16 11:04:28 -04:00
co-authored by Claude Opus 5.5
parent d154342314
commit 450dea9c24
6 changed files with 45 additions and 4 deletions
+14 -2
View File
@@ -80,18 +80,29 @@ macro R-CLEAR RSTACK-DEPTH b! a !b endmacro
OK: drop 1 jump (FINISH)
GO: drop 0 jump (FINISH)
\ ( -- ) a GONE has been believed: the word whose xt is in (GONE-HOOK), if
\ 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.
: (DOWN)
(GONE-HOOK) b! @b if NONE (ONE) a! @ SWAP push ;
NONE: drop ;
\ ( -- flag ) A GONE has been taken: its seven words are in (IN), the
\ node it is about in (ONE), and (S-WIRE) is the wire it came by. It is
\ believed only if it came by the port that leads to this node's centre
\ and says it is from the centre (MESH.md 7b.4): the way to the node is
\ then forgotten, and the flag is -1. Otherwise nothing is done, and 0.
\ (As first built only what it said it was from was looked at, and one
\ that came by another port was believed.)
\ that came by another port was believed.) Believed, it is handed on:
\ (DOWN).
: (GONE?)
(CENTRE) if NOT (IN)+1 a! @ xor if FROM drop 0 ;
NOT: ;
FROM: drop (ROUTE-DEFAULT) a! @ (PORT) - (S-WIRE) a! @ xor if YES drop 0 ;
YES: drop (ONE) a! @ NO-ROUTE -1 ;
YES: drop (ONE) a! @ NO-ROUTE (DOWN) -1 ;
\ ( -- ) WAITING (MESH.md 7d.4). A node with nothing to do passes on
\ what has come for other nodes, (SERVE), and then goes through what has
@@ -419,6 +430,7 @@ set HDR-NFA here ", (LOST) #, 8 #, HDR-NFA #, HDR-LINK set HDR-LINK here :
set HDR-NFA here ", (REFUSED) #, 8 #, HDR-NFA #, HDR-LINK set HDR-LINK here : (REFUSED)' (REFUSED) ;
set HDR-NFA here ", (WORD-DEFINED) #, 8 #, HDR-NFA #, HDR-LINK set HDR-LINK here : (WORD-DEFINED)' (WORD-DEFINED) ;
set HDR-NFA here ", (WORD-FORGOTTEN) #, 8 #, HDR-NFA #, HDR-LINK set HDR-LINK here : (WORD-FORGOTTEN)' (WORD-FORGOTTEN) ;
set HDR-NFA here ", (GONE-HOOK) #, 8 #, HDR-NFA #, HDR-LINK set HDR-LINK here : (GONE-HOOK)' (GONE-HOOK) ;
set HDR-NFA here ", QUIT #, 0 #, HDR-NFA #, HDR-LINK set HDR-LINK here
: QUIT R-CLEAR (RESET) CR 0 jump (DONE)