]> gitweb.factorcode.org Git - factor.git/blob - basis/compiler/cfg/stacks/vacant/vacant-tests.factor
compiler.*: removing the check-d and check-r slots from gc-map and adjusting code...
[factor.git] / basis / compiler / cfg / stacks / vacant / vacant-tests.factor
1 USING: accessors arrays assocs compiler.cfg
2 compiler.cfg.dataflow-analysis.private compiler.cfg.instructions
3 compiler.cfg.linearization compiler.cfg.registers
4 compiler.cfg.utilities compiler.cfg.stacks.vacant kernel math sequences sorting
5 tools.test vectors ;
6 IN: compiler.cfg.stacks.vacant.tests
7
8 {
9     { { } { } }
10 } [
11     { { 4 { 3 2 1 -3 0 -2 -1 } } { 0 { -1 } } } state>gc-data
12 ] unit-test
13
14 { { { 1 0 0 } { 0 } } } [
15     { { 3 { 0 } } { 1 { } } } state>gc-data
16 ] unit-test
17
18 ! visit-insn should set the gc info.
19 { { 0 0 } { } } [
20     { { 2 { } } { 0 { } } }
21     T{ ##alien-invoke { gc-map T{ gc-map } } }
22     [ gc-map>> set-gc-map ] keep gc-map>> [ scrub-d>> ] [ scrub-r>> ] bi
23 ] unit-test