compiler.cfg.linear-scan.assignment: spill slot representation logic was backwards, just like Factor
parent
428ba9fd0f
commit
38bafd2be8
|
@ -93,7 +93,7 @@ SYMBOL: machine-live-outs
|
||||||
init-unhandled ;
|
init-unhandled ;
|
||||||
|
|
||||||
: insert-spill ( live-interval -- )
|
: insert-spill ( live-interval -- )
|
||||||
[ reg>> ] [ first-use rep>> ] [ spill-to>> ] tri ##spill ;
|
[ reg>> ] [ last-use rep>> ] [ spill-to>> ] tri ##spill ;
|
||||||
|
|
||||||
: handle-spill ( live-interval -- )
|
: handle-spill ( live-interval -- )
|
||||||
dup spill-to>> [ insert-spill ] [ drop ] if ;
|
dup spill-to>> [ insert-spill ] [ drop ] if ;
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
USING: compiler.units compiler.test kernel kernel.private memory
|
USING: compiler.units compiler.test kernel kernel.private memory
|
||||||
math math.private tools.test math.floats.private math.order fry
|
math math.private tools.test math.floats.private math.order fry
|
||||||
;
|
specialized-arrays sequences ;
|
||||||
|
QUALIFIED-WITH: alien.c-types c
|
||||||
|
SPECIALIZED-ARRAY: c:float
|
||||||
IN: compiler.tests.float
|
IN: compiler.tests.float
|
||||||
|
|
||||||
[ 5.0 ] [ [ 5.0 ] compile-call gc gc gc ] unit-test
|
[ 5.0 ] [ [ 5.0 ] compile-call gc gc gc ] unit-test
|
||||||
|
@ -116,3 +118,19 @@ IN: compiler.tests.float
|
||||||
[ t ] [ 3.0 0/0. \ min check-compiled-binary-op ] unit-test
|
[ t ] [ 3.0 0/0. \ min check-compiled-binary-op ] unit-test
|
||||||
[ t ] [ 0/0. 3.0 \ max check-compiled-binary-op ] unit-test
|
[ t ] [ 0/0. 3.0 \ max check-compiled-binary-op ] unit-test
|
||||||
[ t ] [ 3.0 0/0. \ max check-compiled-binary-op ] unit-test
|
[ t ] [ 3.0 0/0. \ max check-compiled-binary-op ] unit-test
|
||||||
|
|
||||||
|
! Test vector ops
|
||||||
|
[ 30.0 ] [
|
||||||
|
float-array{ 1 2 3 4 } float-array{ 1 2 3 4 }
|
||||||
|
[ { float-array float-array } declare [ * ] [ + ] 2map-reduce ] compile-call
|
||||||
|
] unit-test
|
||||||
|
|
||||||
|
[ 30.0 ] [
|
||||||
|
float-array{ 1 2 3 4 }
|
||||||
|
[ { float-array } declare dup [ * ] [ + ] 2map-reduce ] compile-call
|
||||||
|
] unit-test
|
||||||
|
|
||||||
|
[ 30.0 ] [
|
||||||
|
float-array{ 1 2 3 4 }
|
||||||
|
[ { float-array } declare [ dup * ] [ + ] map-reduce ] compile-call
|
||||||
|
] unit-test
|
||||||
|
|
|
@ -128,7 +128,7 @@ CONSTANT: vector-words
|
||||||
@
|
@
|
||||||
[ dup [ class ] { } map-as ] dip '[ _ declare @ ]
|
[ dup [ class ] { } map-as ] dip '[ _ declare @ ]
|
||||||
{
|
{
|
||||||
[ "print-mr" get [ nip test-mr mr. ] [ 2drop ] if ]
|
[ "print-mr" get [ nip regs. ] [ 2drop ] if ]
|
||||||
[ "print-checks" get [ [ . ] bi@ ] [ 2drop ] if ]
|
[ "print-checks" get [ [ . ] bi@ ] [ 2drop ] if ]
|
||||||
[ [ [ call ] dip call ] call( quot quot -- result ) ]
|
[ [ [ call ] dip call ] call( quot quot -- result ) ]
|
||||||
[ [ [ call ] dip compile-call ] call( quot quot -- result ) ]
|
[ [ [ call ] dip compile-call ] call( quot quot -- result ) ]
|
||||||
|
|
Loading…
Reference in New Issue