compiler.tree.recursive: more use of hash-sets.
parent
9d43e21563
commit
ff9af6423f
|
@ -68,9 +68,9 @@ M: node node-call-graph 2drop ;
|
||||||
|
|
||||||
SYMBOLS: not-loops recursive-nesting ;
|
SYMBOLS: not-loops recursive-nesting ;
|
||||||
|
|
||||||
: not-a-loop ( label -- ) not-loops get conjoin ;
|
: not-a-loop ( label -- ) not-loops get adjoin ;
|
||||||
|
|
||||||
: not-a-loop? ( label -- ? ) not-loops get key? ;
|
: not-a-loop? ( label -- ? ) not-loops get in? ;
|
||||||
|
|
||||||
: non-tail-calls ( call-graph-node -- seq )
|
: non-tail-calls ( call-graph-node -- seq )
|
||||||
calls>> [ tail?>> not ] filter ;
|
calls>> [ tail?>> not ] filter ;
|
||||||
|
@ -112,7 +112,7 @@ SYMBOL: changed?
|
||||||
inline recursive
|
inline recursive
|
||||||
|
|
||||||
: detect-loops ( call-graph -- )
|
: detect-loops ( call-graph -- )
|
||||||
H{ } clone not-loops set
|
HS{ } clone not-loops set
|
||||||
V{ } clone recursive-nesting set
|
V{ } clone recursive-nesting set
|
||||||
[ visit-back-edges ]
|
[ visit-back-edges ]
|
||||||
[ '[ _ detect-cross-frame-calls ] while-changing ]
|
[ '[ _ detect-cross-frame-calls ] while-changing ]
|
||||||
|
|
Loading…
Reference in New Issue