2008-10-22 19:37:47 -04:00
|
|
|
USING: compiler.cfg.instructions compiler.cfg.registers
|
2008-12-08 15:58:00 -05:00
|
|
|
compiler.cfg.alias-analysis compiler.cfg.debugger
|
|
|
|
cpu.architecture tools.test kernel ;
|
2008-10-22 19:37:47 -04:00
|
|
|
IN: compiler.cfg.alias-analysis.tests
|
|
|
|
|
2008-11-03 02:52:55 -05:00
|
|
|
[ ] [
|
|
|
|
{
|
|
|
|
T{ ##peek f V int-regs 2 D 1 f }
|
|
|
|
T{ ##box-alien f V int-regs 1 V int-regs 2 }
|
|
|
|
T{ ##slot-imm f V int-regs 3 V int-regs 1 0 3 }
|
|
|
|
} alias-analysis drop
|
|
|
|
] unit-test
|
|
|
|
|
2008-10-22 19:37:47 -04:00
|
|
|
[ ] [
|
|
|
|
{
|
2009-01-29 02:44:58 -05:00
|
|
|
T{ ##load-reference f V int-regs 1 "hello" }
|
2008-10-22 19:37:47 -04:00
|
|
|
T{ ##slot-imm f V int-regs 0 V int-regs 1 0 3 }
|
|
|
|
} alias-analysis drop
|
|
|
|
] unit-test
|
|
|
|
|
|
|
|
[
|
|
|
|
{
|
|
|
|
T{ ##peek f V int-regs 1 D 1 f }
|
|
|
|
T{ ##peek f V int-regs 2 D 2 f }
|
|
|
|
T{ ##replace f V int-regs 1 D 0 f }
|
|
|
|
}
|
|
|
|
] [
|
|
|
|
{
|
|
|
|
T{ ##peek f V int-regs 1 D 1 f }
|
|
|
|
T{ ##peek f V int-regs 2 D 2 f }
|
|
|
|
T{ ##replace f V int-regs 2 D 0 f }
|
|
|
|
T{ ##replace f V int-regs 1 D 0 f }
|
|
|
|
} alias-analysis
|
|
|
|
] unit-test
|
|
|
|
|
|
|
|
[
|
|
|
|
{
|
|
|
|
T{ ##peek f V int-regs 1 D 1 f }
|
|
|
|
T{ ##peek f V int-regs 2 D 0 f }
|
|
|
|
T{ ##copy f V int-regs 3 V int-regs 2 f }
|
|
|
|
T{ ##copy f V int-regs 4 V int-regs 1 f }
|
2008-10-23 06:27:54 -04:00
|
|
|
T{ ##replace f V int-regs 3 D 0 f }
|
|
|
|
T{ ##replace f V int-regs 4 D 1 f }
|
2008-10-22 19:37:47 -04:00
|
|
|
}
|
|
|
|
] [
|
|
|
|
{
|
|
|
|
T{ ##peek f V int-regs 1 D 1 f }
|
|
|
|
T{ ##peek f V int-regs 2 D 0 f }
|
|
|
|
T{ ##replace f V int-regs 1 D 0 f }
|
|
|
|
T{ ##replace f V int-regs 2 D 1 f }
|
|
|
|
T{ ##peek f V int-regs 3 D 1 f }
|
|
|
|
T{ ##peek f V int-regs 4 D 0 f }
|
|
|
|
T{ ##replace f V int-regs 3 D 0 f }
|
|
|
|
T{ ##replace f V int-regs 4 D 1 f }
|
|
|
|
} alias-analysis
|
|
|
|
] unit-test
|