compiler.crossref: memoize dependency evaluation
parent
c438e84bd0
commit
015a9d365d
|
@ -23,15 +23,16 @@ compiled-generic-crossref [ H{ } clone ] initialize
|
||||||
[ drop word? ] assoc-filter
|
[ drop word? ] assoc-filter
|
||||||
[ [ drop (compiled-usages) ] { } assoc>map ] keep suffix ;
|
[ [ drop (compiled-usages) ] { } assoc>map ] keep suffix ;
|
||||||
|
|
||||||
: dependencies-satisfied? ( word -- ? )
|
: dependencies-satisfied? ( word cache -- ? )
|
||||||
"dependency-checks" word-prop [ satisfied? ] all? ;
|
[ "dependency-checks" word-prop ] dip
|
||||||
|
'[ _ [ satisfied? ] cache ] all? ;
|
||||||
|
|
||||||
: outdated-conditional-usages ( assoc -- assocs )
|
: outdated-conditional-usages ( assoc -- assocs )
|
||||||
[
|
H{ } clone '[
|
||||||
drop
|
drop
|
||||||
compiled-usage
|
compiled-usage
|
||||||
[ nip conditional-dependency dependency>= ] assoc-filter
|
[ nip conditional-dependency dependency>= ] assoc-filter
|
||||||
[ drop dependencies-satisfied? not ] assoc-filter
|
[ drop _ dependencies-satisfied? not ] assoc-filter
|
||||||
] { } assoc>map ;
|
] { } assoc>map ;
|
||||||
|
|
||||||
: compiled-generic-usage ( word -- assoc )
|
: compiled-generic-usage ( word -- assoc )
|
||||||
|
|
Loading…
Reference in New Issue