1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-23 12:28:06 +11:00

Remove WORD( and PREV

They're only used once.
This commit is contained in:
Virgil Dupras 2020-12-09 17:17:53 -05:00
parent 594b3c3348
commit dda80801d5
2 changed files with 6 additions and 11 deletions

17
blk.fs
View File

@ -1870,7 +1870,6 @@ SYSVARS 0x0c + :** C<*
LOOP THEN 2DROP ; LOOP THEN 2DROP ;
: MOVE, ( a u -- ) H@ OVER ALLOT SWAP MOVE ; : MOVE, ( a u -- ) H@ OVER ALLOT SWAP MOVE ;
( ----- 368 ) ( ----- 368 )
: PREV 3 - DUP @ - ;
: [entry] ( w -- ) : [entry] ( w -- )
C@+ ( w+1 len ) TUCK MOVE, ( len ) C@+ ( w+1 len ) TUCK MOVE, ( len )
( write prev value ) ( write prev value )
@ -1881,19 +1880,15 @@ SYSVARS 0x0c + :** C<*
: CREATE (entry) 2 ( cellWord ) C, ; : CREATE (entry) 2 ( cellWord ) C, ;
: VARIABLE CREATE 2 ALLOT ; : VARIABLE CREATE 2 ALLOT ;
( ----- 369 ) ( ----- 369 )
: WORD(
DUP 1- C@ ( name len field )
127 AND ( 0x7f. remove IMMEDIATE flag )
3 + ( fixed header len )
-
;
: FORGET : FORGET
' DUP ( w w ) ' DUP ( w w )
( HERE must be at the end of prev's word, that is, at the ( HERE must be at the end of prev's word, that is, at the
beginning of w. ) beginning of w. )
WORD( HERE ! ( w ) DUP 1- C@ ( name len field )
PREV CURRENT ! 0x7f AND ( remove IMMEDIATE flag )
; 3 + ( fixed header len )
- HERE ! ( w )
( get prev addr ) 3 - DUP @ - CURRENT ! ;
: EMPTY LIT" _sys" FIND IF DUP HERE ! CURRENT ! THEN ; : EMPTY LIT" _sys" FIND IF DUP HERE ! CURRENT ! THEN ;
( ----- 370 ) ( ----- 370 )
: DOES> : DOES>

Binary file not shown.