mirror of
https://git.sr.ht/~crc_/retroforth
synced 2024-11-16 19:48:56 +01:00
remove separate string buffer in s:dedup
FossilOrigin-Name: 911dc4298e164218551636b4d8a9790baa30eb107ecf61b82bba72ceb4d7724f
This commit is contained in:
parent
16853e969d
commit
6cea9a634f
3 changed files with 735 additions and 787 deletions
|
@ -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`
|
||||
|
||||
================================================================
|
||||
|
|
|
@ -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? ;
|
||||
}}
|
||||
|
|
1517
vm/nga-c/image.c
1517
vm/nga-c/image.c
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue