]> gitweb.factorcode.org Git - factor.git/blob - basis/compiler/cfg/gc-checks/gc-checks-tests.factor
compiler.cfg: virtual registers are integers now, and representations are stored...
[factor.git] / basis / compiler / cfg / gc-checks / gc-checks-tests.factor
1 IN: compiler.cfg.gc-checks.tests
2 USING: compiler.cfg.gc-checks compiler.cfg.debugger
3 compiler.cfg.registers compiler.cfg.instructions compiler.cfg
4 compiler.cfg.predecessors cpu.architecture tools.test kernel vectors
5 namespaces accessors sequences ;
6
7 : test-gc-checks ( -- )
8     H{ } clone representations set
9     cfg new 0 get >>entry
10     compute-predecessors
11     insert-gc-checks
12     drop ;
13
14 V{
15     T{ ##inc-d f 3 }
16     T{ ##replace f 0 D 1 }
17 } 0 test-bb
18
19 V{
20     T{ ##box-float f 0 1 }
21 } 1 test-bb
22
23 0 1 edge
24
25 [ ] [ test-gc-checks ] unit-test
26
27 [ V{ D 0 D 2 } ] [ 1 get instructions>> first uninitialized-locs>> ] unit-test