diff --git a/basis/compiler/cfg/linear-scan/assignment/assignment.factor b/basis/compiler/cfg/linear-scan/assignment/assignment.factor index ea717f9218..ab03882757 100644 --- a/basis/compiler/cfg/linear-scan/assignment/assignment.factor +++ b/basis/compiler/cfg/linear-scan/assignment/assignment.factor @@ -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>> ] diff --git a/basis/math/vectors/vectors-tests.factor b/basis/math/vectors/vectors-tests.factor index 968af6a3aa..3e56644d3e 100644 --- a/basis/math/vectors/vectors-tests.factor +++ b/basis/math/vectors/vectors-tests.factor @@ -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 \ No newline at end of file