1 IN: compiler.cfg.stacks.uninitialized.tests
2 USING: compiler.cfg.stacks.uninitialized 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 ;
7 : test-uninitialized ( -- )
10 compute-uninitialized-sets ;
17 T{ ##replace f 0 D 0 }
18 T{ ##replace f 0 D 1 }
19 T{ ##replace f 0 D 2 }
31 [ ] [ test-uninitialized ] unit-test
33 [ V{ D 0 D 1 D 2 } ] [ 1 get uninitialized-locs ] unit-test
34 [ V{ R 0 } ] [ 2 get uninitialized-locs ] unit-test
36 ! When merging, if a location is uninitialized in one branch and
37 ! initialized in another, we have to consider it uninitialized,
38 ! since it cannot be safely read from by a ##peek, or traced by GC.
47 T{ ##call f namestack }
59 [ ] [ test-uninitialized ] unit-test
61 [ V{ D 0 } ] [ 3 get uninitialized-locs ] unit-test