compiler.cfg.*: refactoring away the compute-global-sets word
parent
79d294e4bf
commit
0432b17409
|
@ -46,13 +46,3 @@ M: dead-analysis transfer-set
|
||||||
drop
|
drop
|
||||||
[ kill-set assoc-union ]
|
[ kill-set assoc-union ]
|
||||||
[ replace-set assoc-union ] bi ;
|
[ replace-set assoc-union ] bi ;
|
||||||
|
|
||||||
! Main word
|
|
||||||
: compute-global-sets ( cfg -- )
|
|
||||||
{
|
|
||||||
[ compute-anticip-sets ]
|
|
||||||
[ compute-live-sets ]
|
|
||||||
[ compute-pending-sets ]
|
|
||||||
[ compute-dead-sets ]
|
|
||||||
[ compute-avail-sets ]
|
|
||||||
} cleave ;
|
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors biassocs compiler.cfg compiler.cfg.registers
|
USING: accessors biassocs compiler.cfg compiler.cfg.registers
|
||||||
compiler.cfg.stacks.finalize compiler.cfg.stacks.global
|
compiler.cfg.stacks.finalize compiler.cfg.stacks.global
|
||||||
compiler.cfg.stacks.height compiler.cfg.stacks.local kernel math
|
compiler.cfg.stacks.height compiler.cfg.stacks.local compiler.cfg.utilities
|
||||||
namespaces sequences ;
|
kernel math namespaces sequences ;
|
||||||
IN: compiler.cfg.stacks
|
IN: compiler.cfg.stacks
|
||||||
|
|
||||||
: begin-stack-analysis ( -- )
|
: begin-stack-analysis ( -- )
|
||||||
|
@ -17,8 +17,14 @@ IN: compiler.cfg.stacks
|
||||||
|
|
||||||
: end-stack-analysis ( -- )
|
: end-stack-analysis ( -- )
|
||||||
cfg get
|
cfg get
|
||||||
[ compute-global-sets ]
|
{
|
||||||
[ finalize-stack-shuffling ] bi ;
|
compute-anticip-sets
|
||||||
|
compute-live-sets
|
||||||
|
compute-pending-sets
|
||||||
|
compute-dead-sets
|
||||||
|
compute-avail-sets
|
||||||
|
finalize-stack-shuffling
|
||||||
|
} apply-passes ;
|
||||||
|
|
||||||
: ds-drop ( -- ) -1 inc-d ;
|
: ds-drop ( -- ) -1 inc-d ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue