compiler.cfg.utilities: adding connect-bbs and make-edges
parent
00e2d9f116
commit
628c87c5b1
|
@ -177,13 +177,6 @@ IN: compiler.cfg.stacks.vacant.tests
|
|||
|
||||
{ { 0 { -1 } } } [ cfg1 output-stack-map first ] unit-test
|
||||
|
||||
: connect-bbs ( from to -- )
|
||||
[ [ successors>> ] dip suffix! drop ]
|
||||
[ predecessors>> swap suffix! drop ] 2bi ;
|
||||
|
||||
: make-edges ( block-map edgelist -- )
|
||||
[ [ of ] with map first2 connect-bbs ] with each ;
|
||||
|
||||
! Same cfg structure as the bug1021:run-test word but with
|
||||
! non-datastack instructions mostly omitted.
|
||||
: bug1021-cfg ( -- cfg )
|
||||
|
|
|
@ -86,3 +86,10 @@ IN: compiler.cfg.utilities
|
|||
|
||||
: apply-passes ( obj passes -- )
|
||||
[ execute( x -- ) ] with each ;
|
||||
|
||||
: connect-bbs ( from to -- )
|
||||
[ [ successors>> ] dip suffix! drop ]
|
||||
[ predecessors>> swap suffix! drop ] 2bi ;
|
||||
|
||||
: make-edges ( block-map edgelist -- )
|
||||
[ [ of ] with map first2 connect-bbs ] with each ;
|
||||
|
|
Loading…
Reference in New Issue