compiler.cfg: the id slot of basic-block appears to not be needed

db4
Björn Lindqvist 2015-04-13 23:22:41 +02:00 committed by John Benediktsson
parent 5cd44dc07c
commit aa6fbf475e
3 changed files with 9 additions and 11 deletions

View File

@ -4,7 +4,6 @@ USING: accessors kernel layouts math namespaces vectors ;
IN: compiler.cfg
TUPLE: basic-block < identity-tuple
{ id integer }
number
{ instructions vector }
{ successors vector }
@ -13,13 +12,10 @@ number
: <basic-block> ( -- bb )
basic-block new
\ basic-block counter >>id
V{ } clone >>instructions
V{ } clone >>successors
V{ } clone >>predecessors ;
M: basic-block hashcode* nip id>> ;
TUPLE: cfg
{ entry basic-block }
word

View File

@ -50,7 +50,7 @@ IN: compiler.cfg.intrinsics.simd.tests
: test-compiler-env ( -- x )
H{ } clone
T{ basic-block { id 0 } }
T{ basic-block }
[ \ basic-block pick set-at ]
[ 0 swap associate \ ds-heights pick set-at ]
[ 0 swap associate \ rs-heights pick set-at ] tri

View File

@ -11,4 +11,6 @@ V{ } 2 test-bb
0 { 1 1 } edges
1 2 edge
[ t ] [ 0 get block>cfg linearization-order [ id>> ] map all-unique? ] unit-test
{ { 0 1 2 } } [
0 get block>cfg linearization-order [ number>> ] map
] unit-test