1 USING: compiler.cfg.stacks.uninitialized compiler.cfg.debugger
2 compiler.cfg.registers compiler.cfg.instructions compiler.cfg
3 compiler.cfg.predecessors cpu.architecture tools.test kernel vectors
4 namespaces accessors sequences ;
5 IN: compiler.cfg.stacks.uninitialized.tests
7 : test-uninitialized ( -- )
9 compute-uninitialized-sets ;
16 T{ ##replace f 0 D 0 }
17 T{ ##replace f 0 D 1 }
18 T{ ##replace f 0 D 2 }
30 [ ] [ test-uninitialized ] unit-test
32 [ V{ D 0 D 1 D 2 } ] [ 1 get uninitialized-locs ] unit-test
33 [ V{ R 0 } ] [ 2 get uninitialized-locs ] unit-test
35 ! When merging, if a location is uninitialized in one branch and
36 ! initialized in another, we have to consider it uninitialized,
37 ! since it cannot be safely read from by a ##peek, or traced by GC.
46 T{ ##call f namestack }
58 [ ] [ test-uninitialized ] unit-test
60 [ V{ D 0 } ] [ 3 get uninitialized-locs ] unit-test