compiler.cfg.linear-scan.assignment: insert-copy did the wrong thing if the second interval had been split. Fixes compilation of 'trilerp'

db4
Slava Pestov 2009-06-30 21:07:39 -05:00
parent 1acf243cce
commit 612e4b99b0
2 changed files with 6 additions and 1 deletions

View File

@ -50,9 +50,12 @@ ERROR: already-spilled ;
: handle-spill ( live-interval -- )
dup spill-to>> [ [ record-spill ] [ insert-spill ] bi ] [ drop ] if ;
: next-interval ( live-interval -- live-interval' )
split-next>> dup split-before>> [ next-interval ] [ ] ?if ;
: insert-copy ( live-interval -- )
{
[ split-next>> reg>> ]
[ next-interval reg>> ]
[ reg>> ]
[ vreg>> reg-class>> ]
[ end>> ]

View File

@ -16,3 +16,5 @@ USING: math.vectors tools.test ;
[ { 1.75 2.125 } ] [ { 1.0 2.5 } { 2.5 1.0 } { 0.5 0.25 } vlerp ] unit-test
[ 1.125 ] [ 0.0 1.0 2.0 4.0 { 0.5 0.25 } bilerp ] unit-test
[ 17 ] [ 0 1 2 3 4 5 6 7 { 1 2 3 } trilerp ] unit-test