feat(v4): the system hands no GONE on; (GONE-HOOK) goes (MESH step 7, increment 2)
Ruling 7 as amended: the kernel tells a node's going, so the system's
hand-on is not used. (GONE-HOOK), (DOWN) and (RUN) go from quit.f18, and
COLD's hook-clearing from system.f18; the cell is free again. The tests of
the hand-on go with it (mesh: the hand-on checks and the fourth disturbed
exchange; depth sweep: path 10, as before 529ba0fc). A believed GONE going
no further is still checked. test_host_unit.c's message for GONE down the
graph now says the kernel tells. MESH.md: 9a.6 items 5 and 7, and step 7's
record of both increments.
Suite EXIT 0; depth sweep 230 runs, 0 failures; mkcapsule lint 0
violations. Hosted and bare metal, all three ISAs: word_count=317
dict_hash=0xfec8c47cfc6f437f.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
9138ebd8bb
commit
6cb8f1285f
@@ -83,7 +83,6 @@ constant (MSG) 14664
|
||||
constant (OUT) 14312
|
||||
constant (WORD-DEFINED) 14701
|
||||
constant (WORD-FORGOTTEN) 14700
|
||||
constant (GONE-HOOK) 14691
|
||||
constant BLOCK# -1
|
||||
constant BUFFER# -2
|
||||
constant UPDATE# -3
|
||||
|
||||
@@ -83,7 +83,6 @@ constant (MSG) 14664
|
||||
constant (OUT) 14312
|
||||
constant (WORD-DEFINED) 14701
|
||||
constant (WORD-FORGOTTEN) 14700
|
||||
constant (GONE-HOOK) 14691
|
||||
constant BLOCK# -1
|
||||
constant BUFFER# -2
|
||||
constant UPDATE# -3
|
||||
|
||||
@@ -80,39 +80,19 @@ 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.
|
||||
\ 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
|
||||
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
|
||||
\ 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.) Believed, it is handed on:
|
||||
\ (DOWN).
|
||||
\ that came by another port was believed.) A node does not hand a GONE
|
||||
\ on: the kernel tells each node a node's going (MESH.md 9a.2, ruling 7).
|
||||
: (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 (DOWN) -1 ;
|
||||
YES: drop (ONE) a! @ NO-ROUTE -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
|
||||
@@ -440,7 +420,6 @@ 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)
|
||||
|
||||
@@ -135,8 +135,7 @@ set HDR-NFA here ", WARM #, 0 #, HDR-NFA #, HDR-LINK set HDR-LINK here
|
||||
|
||||
\ ( -- ) the system as it was when the capsule had just been loaded:
|
||||
\ everything defined since is gone, there is one vocabulary, numbers are
|
||||
\ decimal, the block buffers are empty. A word in (GONE-HOOK) that COLD
|
||||
\ forgets is taken out of it (quit.f18, (DOWN)). Then as WARM.
|
||||
\ decimal, the block buffers are empty. Then as WARM.
|
||||
set HDR-NFA here ", COLD #, 0 #, HDR-NFA #, HDR-LINK set HDR-LINK here
|
||||
: COLD
|
||||
(BOOT) a! @ DP a! !
|
||||
@@ -145,10 +144,6 @@ set HDR-NFA here ", COLD #, 0 #, HDR-NFA #, HDR-LINK set HDR-LINK here
|
||||
(LATEST) CONTEXT a! ! (LATEST) CURRENT a! ! 0 VOC-LINK a! !
|
||||
10 BASE a! ! 0 SCR a! ! 2 (LOG-LEVEL) a! ! 0 (ACL-HOOK) a! ! EMPTY-BUFFERS
|
||||
(BOOT) a! @ 2/ 2/ (FORGOTTEN) \ the kernel's records of what has gone go too (dict.f18)
|
||||
(GONE-HOOK) a! @ (BOOT) b! @b 2/ 2/ inv 1 + + \ the hook's xt less the sealed HERE, in cells
|
||||
-if CLEAR drop jump KEPT \ below the sealed system: it stays (0 is below)
|
||||
CLEAR: drop 0 (GONE-HOOK) a! ! \ at or above it: forgotten with what COLD forgets
|
||||
KEPT:
|
||||
$54524F46 (EMIT4) $39372D48 (EMIT4) $6C6F4320 (EMIT4) $74532064 (EMIT4) $747261 (EMIT4) CR
|
||||
$74737953 (EMIT4) $69206D65 (EMIT4) $6974696E (EMIT4) $7A696C61 (EMIT4) $2E6465 (EMIT4) CR
|
||||
jump ABORT
|
||||
|
||||
Reference in New Issue
Block a user