compiler.cfg.*: refactoring away the compute-global-sets word

db4
Björn Lindqvist 2014-12-31 02:44:48 +01:00
parent 79d294e4bf
commit 0432b17409
2 changed files with 10 additions and 14 deletions

View File

@ -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 ;

View File

@ -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 ;