Fix alias anlaysis bug: result of ##box-alien and ##box-float did not get an AC, so calling hi-tag would not compile

db4
Slava Pestov 2008-11-03 01:52:55 -06:00
parent 3230e0010f
commit 08b277e892
2 changed files with 18 additions and 0 deletions
basis/compiler/cfg/alias-analysis

View File

@ -3,6 +3,14 @@ compiler.cfg.alias-analysis cpu.architecture tools.test
kernel ;
IN: compiler.cfg.alias-analysis.tests
[ ] [
{
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
[ ] [
{
T{ ##load-indirect f V int-regs 1 "hello" }

View File

@ -229,6 +229,16 @@ M: ##allot analyze-aliases*
#! object.
dup dst>> set-new-ac ;
M: ##box-float analyze-aliases*
#! A freshly allocated object is distinct from any other
#! object.
dup dst>> set-new-ac ;
M: ##box-alien analyze-aliases*
#! A freshly allocated object is distinct from any other
#! object.
dup dst>> set-new-ac ;
M: ##read analyze-aliases*
dup dst>> set-heap-ac
dup [ dst>> ] [ insn-slot# ] [ insn-object ] tri