1 USING: accessors arrays assocs combinators.extras compiler.cfg
2 compiler.cfg.instructions compiler.cfg.linear-scan.allocation
3 compiler.cfg.linear-scan.allocation.state
4 compiler.cfg.linear-scan.live-intervals compiler.cfg.utilities cpu.architecture
5 cpu.x86.assembler.operands heaps kernel layouts namespaces sequences system
7 IN: compiler.cfg.linear-scan.allocation.state.tests
11 V{ T{ live-interval-state { reg-class int-regs } { vreg 123 } } }
13 f machine-registers init-allocator
14 T{ live-interval-state { reg-class int-regs } { vreg 123 } }
15 [ add-active ] keep active-intervals-for
24 T{ live-interval-state
26 { reg-class int-regs }
33 f machine-registers init-allocator
34 T{ live-interval-state { reg-class int-regs } { vreg 123 } } add-active
60 25 XMM1 machine-registers float-regs free-positions
61 [ add-use-position ] keep
66 { { { "prutt" 12 } } } [
67 30 "prutt" { { "prutt" 12 } } [ add-use-position ] keep
73 { { 3 4 } T{ spill-slot { n 32 } } }
74 { { 1234 4 } T{ spill-slot } }
75 { { 45 16 } T{ spill-slot { n 16 } } }
78 { { 3 8 } T{ spill-slot { n 32 } } }
79 { { 1234 8 } T{ spill-slot } }
80 { { 45 16 } T{ spill-slot { n 16 } } }
83 H{ } clone spill-slots set
84 f f <basic-block> <cfg> cfg set
85 { 1234 45 3 } { int-rep double-2-rep tagged-rep }
86 [ assign-spill-slot drop ] 2each
91 H{ } clone spill-slots set
92 f f <basic-block> <cfg> cfg set
93 55 int-rep assign-spill-slot spill-slots get values first eq?
99 T{ live-interval-state
101 { reg-class int-regs }
109 3 f f { } 0 insns>block <cfg> [ align-spill-area ] keep
110 spill-area-align>> cell =
113 ! inactive-intervals-for
115 V{ T{ live-interval-state { reg-class int-regs } { vreg 123 } } }
117 f machine-registers init-allocator
118 T{ live-interval-state { reg-class int-regs } { vreg 123 } }
119 [ add-inactive ] keep inactive-intervals-for
122 ! interval/sync-point-key
123 { { 33 1/0.0 1/0.0 } } [
124 T{ sync-point { n 33 } } interval/sync-point-key
131 T{ cfg { spill-area-size 16 } }
133 H{ } clone spill-slots set
134 T{ cfg { spill-area-size 0 } } cfg set
135 [ 8 next-spill-slot ] twice
139 ! >unhandled-min-heap
142 { { 5 1/0. 1/0. } T{ sync-point { n 5 } } }
145 T{ live-interval-state { start 20 } { end 28 } }
149 T{ live-interval-state { start 20 } { end 30 } }
153 T{ live-interval-state { start 33 } { end 999 } }
155 { { 33 1/0. 1/0. } T{ sync-point { n 33 } } }
156 { { 100 1/0. 1/0. } T{ sync-point { n 100 } } }
160 T{ live-interval-state { start 20 } { end 30 } }
161 T{ live-interval-state { start 20 } { end 28 } }
162 T{ live-interval-state { start 33 } { end 999 } }
163 T{ sync-point { n 5 } }
164 T{ sync-point { n 33 } }
165 T{ sync-point { n 100 } }
167 >unhandled-min-heap heap-pop-all
172 T{ live-interval-state { start 20 } { end 30 } }
173 T{ live-interval-state { start 20 } { end 30 } }
174 } >unhandled-min-heap heap-size