properties fixes

This commit is contained in:
mgcaret 2020-11-11 15:42:55 -08:00
parent 953e2c985e
commit 188e80756b
3 changed files with 23 additions and 4 deletions

View File

@ -8,6 +8,15 @@ true value of-verbose?
db" OF base"
\ OF816 constants, these should follow macros.include
binary
10000000 constant (f_immed)
01000000 constant (f_conly)
00100000 constant (f_prot)
00010000 constant (f_tempd)
00001000 constant (f_smudg)
hex
\ Reverse engineer the leading JSLs for these words
: (function) ;
@ -24,6 +33,7 @@ alias (alias) (function)
\ ALIAS will have 5C in the low byte, and we maybe need to fix that...
\ in SLOF most of these are only used by the debug.fs
\ except the ones needed to support instance values
\ so most of these should be removed since no plans to implement debug.fs
' (function) 1+ @ \ ( <colon> )
' (function) 1+ /n + @ \ ( ... <semicolon> )
' (defer) 1+ @ \ ( ... <defer> )

View File

@ -319,6 +319,10 @@ defer find-node
\ fixed for OF816
: (.print-alias) ( lfa -- )
\ Don't print smudged alias
dup lfa>xt c@ (f_smudg) and IF
drop EXIT
THEN
dup lfa>name
\ Don't print name property
2dup s" name" string=ci IF 2drop drop

View File

@ -43,11 +43,12 @@ true value encode-first?
\ >r @ r> ! EXIT THEN @ REPEAT 2drop ELSE r> drop THEN ;
\ : prune ( name len -- ) last (prune) ;
\ OF816: just smudge it, hopefully properties don't change that often
: prune ( name len -- ) context @ search-wordlist 0= if exit then
dup c@ 20 and if
drop \ protected
: prune ( name len -- )
get-current search-wordlist 0= if ." no prune!" cr exit then
dup c@ (f_prot) (f_smudg) or and if
drop \ protected or smudged already
else
dup c@ 8 or swap c!
dup c@ (f_smudg) or swap c!
then
;
@ -136,6 +137,10 @@ true value encode-first?
;
: .property ( lfa -- )
\ Don't print smudged alias
dup lfa>xt c@ (f_smudg) and IF
drop EXIT
THEN
dup cr indent @ 0 ?do space loop
lfa>name 2dup type nip
indent-prop swap -