1 ! Copyright (C) 2008 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: accessors kernel sequences sets arrays
4 compiler.cfg.linear-scan.live-intervals
5 compiler.cfg.linear-scan.allocation ;
6 IN: compiler.cfg.linear-scan.debugger
8 : check-assigned ( live-intervals -- )
11 [ "Not all intervals have registers" throw ] unless
14 : split-children ( live-interval -- seq )
16 [ split-before>> ] [ split-after>> ] bi
17 [ split-children ] bi@
21 : check-linear-scan ( live-intervals machine-registers -- )
22 [ [ clone ] map ] dip allocate-registers
23 [ split-children ] map concat check-assigned ;