compiler.cfg.builder.*: the when* checks aren't needed

locals-and-roots
Björn Lindqvist 2016-04-30 09:27:27 +02:00
parent 6f440404c3
commit b8e0d5e278
2 changed files with 6 additions and 4 deletions

View File

@ -11,10 +11,10 @@ SLOT: out-d
dup begin-local-analysis instructions>> building set ; dup begin-local-analysis instructions>> building set ;
: end-basic-block ( block -- ) : end-basic-block ( block -- )
[ end-local-analysis ] when* building off ; end-local-analysis building off ;
: (begin-basic-block) ( block -- block' ) : (begin-basic-block) ( block -- block' )
<basic-block> swap [ over connect-bbs ] when* dup set-basic-block ; <basic-block> dup set-basic-block [ connect-bbs ] keep ;
: begin-basic-block ( block -- block' ) : begin-basic-block ( block -- block' )
dup end-basic-block (begin-basic-block) ; dup end-basic-block (begin-basic-block) ;
@ -54,6 +54,6 @@ SLOT: out-d
sift [ f ] [ sift [ f ] [
dup first second height-state set dup first second height-state set
[ first ] map [ first ] map
f begin-basic-block <basic-block> dup set-basic-block
[ connect-Nto1-bbs ] keep [ connect-Nto1-bbs ] keep
] if-empty ; ] if-empty ;

View File

@ -335,7 +335,9 @@ SYMBOL: foo
{ {
V{ T{ ##call { word set-slot } } T{ ##branch } } V{ T{ ##call { word set-slot } } T{ ##branch } }
} [ } [
[ f call-node-1 emit-node ] V{ } make drop [
<basic-block> dup set-basic-block call-node-1 emit-node
] V{ } make drop
predecessors>> first instructions>> predecessors>> first instructions>>
] cfg-unit-test ] cfg-unit-test