compiler.cfg.builder.blocks: removes assignments to basic-block variable
Now it isn't used at all in the cfg creation step.db4
parent
9df955e199
commit
b27634bff7
|
@ -5,22 +5,21 @@ IN: compiler.cfg.builder.blocks
|
|||
<<
|
||||
STRING: ex-emit-trivial-block
|
||||
USING: compiler.cfg.builder.blocks make prettyprint ;
|
||||
<basic-block> set-basic-block [ [ gensym ##call, ] emit-trivial-block ] { } make drop basic-block get .
|
||||
begin-stack-analysis <basic-block> dup set-basic-block [ gensym ##call, drop ] emit-trivial-block predecessors>> first .
|
||||
T{ basic-block
|
||||
{ id 2040412 }
|
||||
{ instructions
|
||||
V{ T{ ##call { word ( gensym ) } } T{ ##branch } }
|
||||
}
|
||||
{ successors
|
||||
V{
|
||||
T{ basic-block { predecessors V{ ~circularity~ } } }
|
||||
}
|
||||
}
|
||||
{ predecessors
|
||||
V{
|
||||
T{ basic-block
|
||||
{ id 2040413 }
|
||||
{ instructions
|
||||
V{
|
||||
T{ ##call { word ( gensym ) } }
|
||||
T{ ##branch }
|
||||
}
|
||||
}
|
||||
{ successors
|
||||
V{ T{ basic-block { id 2040414 } } }
|
||||
}
|
||||
{ instructions V{ T{ ##branch } } }
|
||||
{ successors V{ ~circularity~ } }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
USING: accessors compiler.cfg compiler.cfg.builder.blocks
|
||||
compiler.cfg.instructions compiler.cfg.stacks.local
|
||||
compiler.cfg.utilities compiler.test kernel make namespaces sequences
|
||||
compiler.cfg.utilities compiler.test kernel namespaces sequences
|
||||
tools.test ;
|
||||
IN: compiler.cfg.builder.blocks.tests
|
||||
|
||||
|
|
|
@ -1,19 +1,17 @@
|
|||
! Copyright (C) 2009, 2010 Slava Pestov.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: accessors arrays compiler.cfg compiler.cfg.instructions
|
||||
compiler.cfg.stacks compiler.cfg.stacks.local compiler.cfg.utilities fry kernel
|
||||
make math namespaces sequences ;
|
||||
compiler.cfg.stacks compiler.cfg.stacks.local compiler.cfg.utilities
|
||||
kernel make math namespaces sequences ;
|
||||
SLOT: in-d
|
||||
SLOT: out-d
|
||||
IN: compiler.cfg.builder.blocks
|
||||
|
||||
: set-basic-block ( basic-block -- )
|
||||
[ basic-block set ]
|
||||
[ instructions>> building set ]
|
||||
[ begin-local-analysis ] tri ;
|
||||
[ instructions>> building set ] [ begin-local-analysis ] bi ;
|
||||
|
||||
: end-basic-block ( block -- )
|
||||
[ end-local-analysis ] when* building off basic-block off ;
|
||||
[ end-local-analysis ] when* building off ;
|
||||
|
||||
: (begin-basic-block) ( block -- block' )
|
||||
<basic-block> swap [ over connect-bbs ] when* dup set-basic-block ;
|
||||
|
|
|
@ -254,7 +254,7 @@ SYMBOL: foo
|
|||
! emit-branch
|
||||
{ 77 } [
|
||||
{ T{ #call { word + } } }
|
||||
V{ } 77 insns>block dup basic-block set
|
||||
V{ } 77 insns>block
|
||||
emit-branch
|
||||
first predecessors>>
|
||||
first predecessors>>
|
||||
|
@ -377,9 +377,7 @@ SYMBOL: foo
|
|||
T{ ##return }
|
||||
}
|
||||
} [
|
||||
[
|
||||
<basic-block> dup set-basic-block end-word
|
||||
] V{ } make drop instructions>>
|
||||
<basic-block> dup set-basic-block end-word instructions>>
|
||||
] unit-test
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue