make some small optimizations to some fll: words
FossilOrigin-Name: 767c0b08d5e9ddd854a15027d025aa1b89f5359c67718b0bf51e2a06c2996f71
This commit is contained in:
parent
a0ae942d31
commit
3eec5480ab
5 changed files with 731 additions and 732 deletions
|
@ -22,5 +22,6 @@
|
||||||
- use strlcpy() in tools/retro-muri.c
|
- use strlcpy() in tools/retro-muri.c
|
||||||
- quieter output when building
|
- quieter output when building
|
||||||
- remove old Python build + packaging code
|
- remove old Python build + packaging code
|
||||||
|
- small optimizations in fll: vocabulary
|
||||||
|
|
||||||
================================================================
|
================================================================
|
||||||
|
|
|
@ -18,10 +18,10 @@ String deduplication for RetroForth.
|
||||||
@s:dedup.data [ @t1 s:eq? @t2 or !t2 ] fll:for-each @t2 ;
|
@s:dedup.data [ @t1 s:eq? @t2 or !t2 ] fll:for-each @t2 ;
|
||||||
:s:dedup.find (s-s)
|
:s:dedup.find (s-s)
|
||||||
!t1 #0 !t2
|
!t1 #0 !t2
|
||||||
@s:dedup.data [ dup @t1 s:eq? [ !t2 ] [ drop ] choose ]
|
@s:dedup.data [ dup @t1 s:eq? [ !t2 ] &drop choose ]
|
||||||
fll:for-each @t2 ;
|
fll:for-each @t2 ;
|
||||||
:s:dedup (s-s)
|
:s:dedup (s-s)
|
||||||
dup s:dedup.defined? [ s:dedup.find ] [ s:dedup.register ]
|
dup s:dedup.defined? &s:dedup.find &s:dedup.register
|
||||||
choose ;
|
choose ;
|
||||||
:s:unique? (s-f) s:dedup.defined? ;
|
:s:unique? (s-f) s:dedup.defined? ;
|
||||||
}}
|
}}
|
||||||
|
|
|
@ -16,6 +16,6 @@ and things that will be standard in the future.
|
||||||
#0 &d:lookup store
|
#0 &d:lookup store
|
||||||
#0 &d:lookup n:inc store ;
|
#0 &d:lookup n:inc store ;
|
||||||
|
|
||||||
'interface/future.retro 'd:use-hashes d:set-source
|
'interface/future.retro 'd:use-hashes d:set-source
|
||||||
'interface/future.retro 'd:use-strings d:set-source
|
'interface/future.retro 'd:use-strings d:set-source
|
||||||
~~~
|
~~~
|
||||||
|
|
|
@ -75,7 +75,7 @@ a pointer to the final cons cell.
|
||||||
---reveal---
|
---reveal---
|
||||||
:fll:to-end (p-p)
|
:fll:to-end (p-p)
|
||||||
dup !r [ cdr@ dup &END -eq? dup
|
dup !r [ cdr@ dup &END -eq? dup
|
||||||
[ over !r ] [ nip ] choose ] while @r ;
|
[ over !r ] &nip choose ] while @r ;
|
||||||
}}
|
}}
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ An issue with this: it does not currently check the length to
|
||||||
make sure that the index is valid.
|
make sure that the index is valid.
|
||||||
|
|
||||||
~~~
|
~~~
|
||||||
:fll:to-index (pn-p) [ cdr@ ] times ;
|
:fll:to-index (pn-p) &cdr@ times ;
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
|
|
||||||
|
|
1452
vm/nga-c/image.c
1452
vm/nga-c/image.c
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue