remove separate string buffer in s:dedup

FossilOrigin-Name: 911dc4298e164218551636b4d8a9790baa30eb107ecf61b82bba72ceb4d7724f
This commit is contained in:
crc 2023-11-21 19:16:26 +00:00
parent 16853e969d
commit 6cea9a634f
3 changed files with 735 additions and 787 deletions

View file

@ -50,5 +50,6 @@
- new example: vocabulary.retro
- remove need to lookup & call err:notfound by nga-c
- use C preprocessor to help with readability in arg. processing
- remove separate temp. string buffer in `s:dedup`
================================================================

View file

@ -8,7 +8,6 @@ String deduplication for RetroForth.
'init s:keep fll:create 's:dedup.data var-n
{{
'Temp d:create #1024 allot
't1 var
't2 var
---reveal---
@ -22,8 +21,7 @@ String deduplication for RetroForth.
@s:dedup.data [ dup @t1 s:eq? [ !t2 ] &drop choose ]
fll:for-each @t2 ;
:s:dedup (s-s)
&Temp s:copy &Temp
dup s:dedup.defined? &s:dedup.find &s:dedup.register
s:temp dup s:dedup.defined? &s:dedup.find &s:dedup.register
choose ;
:s:unique? (s-f) s:dedup.defined? ;
}}

File diff suppressed because it is too large Load diff