feat(v4): v3's whole POST, Task 8 round -- the rules, and v4 where the rulings put it (#189)
v3's whole POST on v4 at 983 of 1010 (the table's own count with its drops), from 850.
What remains is capacity ("Dictionary full", the 100-900-deep stacks): next, as ruled.
Found and fixed under the rulings (docs/v4.0.0/POST-PARITY.md):
- IS and DEFER@ refuse a word DEFER did not make, as v3: error 22, "Not deferred".
v4's IS stored into any word -- POST's `42 IS DUP` broke DUP for every case after it.
DEFER marks its word with flag 128 (dict.f18).
- SMUDGE and HIDDEN are compile-only, as v3's table: at the prompt v4's hid the newest word.
- Q./ by zero gives 0 and no error (ruled: v3's table); error 11 retired. The ROM's,
the test's reference and its hand-assembled copy changed alike.
- FENCE is v3's: it protects what is defined so far. The variable is (FENCE).
- The line's length is (#SRC), no longer SPAN: an EXPECT in a line cut the rest of
the line off, and 0 EXPECT could not leave SPAN 0 (FORTH-83).
- POST gains V4_POST_HEAD: the values left and how the output begins -- the form of a
printout whose values are the run's own (TOP-WORDS, WORD-ENTROPY).
post_all_rules.py: the rest of the whole table where it is not taken as v3 ran it --
v4's units for the cases that wrote through HERE as a byte address (CMOVE>, BLANK,
ERASE, FILL wrote into the system's code), the standard's results (COMPARE, SEARCH,
BASE output, THRU, >BODY with FIND's address), v3's descriptions where v3 printed
otherwise, and the cases dropped with their reasons (SP@/SP! by D-2, DABS/DMIN
underflow, CMOVE>.bounds, THRU.negative_end).
make -C v4 test: all v4 tests passed (both widths, mesh-boot, inference).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
This commit is contained in:
@@ -173,7 +173,7 @@ macro R-CLEAR RSTACK-DEPTH b! a !b endmacro
|
||||
if TAKEN drop (UNTAKEN) jump M \ not taken: the wire was cut since it was looked at
|
||||
TAKEN: drop
|
||||
0 (MSG)+6 a! @ TIB + C! \ a zero after the text
|
||||
(MSG)+6 a! @ SPAN a! !
|
||||
(MSG)+6 a! @ (#SRC) a! !
|
||||
(DONE-PORT) a! @ (KEEP) a! ! \ the room for its answer is kept from here
|
||||
(CONSOLE) a! @ if P0 jump P1 \ where what it prints goes: the console,
|
||||
P0: drop (MSG)+1 a! @ \ or whoever sent it;
|
||||
@@ -183,7 +183,7 @@ macro R-CLEAR RSTACK-DEPTH b! a !b endmacro
|
||||
jump (LINE)
|
||||
|
||||
\ ( -- ) THE TEXT, INTERPRETED. It is in TIB with a zero after it and its
|
||||
\ length in SPAN, and the return stack is empty. It is interpreted with one
|
||||
\ length in (#SRC), and the return stack is empty. It is interpreted with one
|
||||
\ return entry under it, this word's call of INTERPRET; whatever is on the
|
||||
\ data stack stays there.
|
||||
: (LINE)
|
||||
@@ -400,12 +400,12 @@ set HDR-NFA here ", PORT! #id, #, 0 #, HDR-NFA #, HDR-LINK set HDR-LINK he
|
||||
|
||||
\ ( -- ) WHAT IS IN THE DICTIONARY NOW IS THE SYSTEM: COLD comes back to
|
||||
\ it and FORGET will not go below it. Whoever has loaded a node's capsules
|
||||
\ has it do this (system.f18, (BOOT) and FENCE).
|
||||
\ has it do this (system.f18, (BOOT) and (FENCE)).
|
||||
set HDR-NFA here ", (SEAL) #id, #, 0 #, HDR-NFA #, HDR-LINK set HDR-LINK here
|
||||
: (SEAL)
|
||||
DP a! @ (BOOT) a! !
|
||||
(LATEST) a! @ (BOOT)+1 a! !
|
||||
DP a! @ 3 + 2/ 2/ FENCE a! !
|
||||
DP a! @ 3 + 2/ 2/ (FENCE) a! !
|
||||
(NEXT-ID) a! @ (BOOT-ID) a! ! ;
|
||||
|
||||
\ FORTH-79: clear the return stack, set execution mode, return control to
|
||||
@@ -475,7 +475,7 @@ set HDR-NFA here ", ABORT #id, #, 0 #, HDR-NFA #, HDR-LINK set HDR-LINK he
|
||||
-1 + if M5 -1 + if M6 -1 + if M7 -1 + if M8 -1 + if M9
|
||||
-1 + if M10 -1 + if M11 -1 + if M12 -1 + if M13 -1 + if M14
|
||||
-1 + if M15 -1 + if M16 -1 + if M17 -1 + if M18
|
||||
-1 + if M19 -1 + if M20 -1 + if M21
|
||||
-1 + if M19 -1 + if M20 -1 + if M21 -1 + if M22
|
||||
drop 2 jump (DONE)
|
||||
M1: drop $6167654E (EMIT4) $65766974 (EMIT4) $756F6320 (EMIT4) $746E (EMIT4) CR 2 jump (DONE)
|
||||
M2: drop $20746F4E (EMIT4) $756E2061 (EMIT4) $7265626D (EMIT4) CR 2 jump (DONE)
|
||||
@@ -499,6 +499,7 @@ set HDR-NFA here ", ABORT #id, #, 0 #, HDR-NFA #, HDR-LINK set HDR-LINK he
|
||||
M19: drop $7373654D (EMIT4) $20656761 (EMIT4) $75666572 (EMIT4) $646573 (EMIT4) CR 2 jump (DONE)
|
||||
M20: drop $65646F4E (EMIT4) $6E6F6720 (EMIT4) $65 (EMIT4) CR 2 jump (DONE)
|
||||
M21: drop $65746E49 (EMIT4) $70757272 (EMIT4) $646574 (EMIT4) CR 2 jump (DONE)
|
||||
M22: drop $20746F4E (EMIT4) $65666564 (EMIT4) $64657272 (EMIT4) CR 2 jump (DONE)
|
||||
|
||||
\ The table the loader gives the node: six words, one for each kind of
|
||||
\ fault in the node's order, each a jump. A jump fills its word, so they
|
||||
|
||||
Reference in New Issue
Block a user