]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/compiler/cfg/linear-scan/resolve/resolve-tests.factor
Delete empty unit tests files, remove 1- and 1+, reorder IN: lines in a lot of places...
[factor.git] / basis / compiler / cfg / linear-scan / resolve / resolve-tests.factor
index 68f7544e8e12a472eae9640a875f64060ed45f0c..47c1f0ae76e673c6bc0b211708494cd933bf33e7 100644 (file)
@@ -1,58 +1,67 @@
-IN: compiler.cfg.linear-scan.resolve.tests
 USING: compiler.cfg.linear-scan.resolve tools.test kernel namespaces
-compiler.cfg.instructions cpu.architecture make
+accessors
+compiler.cfg
+compiler.cfg.instructions cpu.architecture make sequences
 compiler.cfg.linear-scan.allocation.state ;
+IN: compiler.cfg.linear-scan.resolve.tests
 
 [
     {
-        { { T{ spill-slot f 0 } int-regs } { 1 int-regs } }
+        { { T{ spill-slot f 0 } int-rep } { 1 int-rep } }
     }
 ] [
     [
-        0 <spill-slot> 1 int-regs add-mapping
+        0 <spill-slot> 1 int-rep add-mapping
     ] { } make
 ] unit-test
 
 [
     {
-        T{ _reload { dst 1 } { class int-regs } { n 0 } }
+        T{ _reload { dst 1 } { rep int-rep } { n 0 } }
     }
 ] [
     [
-        { T{ spill-slot f 0 } int-regs } { 1 int-regs } >insn
+        { T{ spill-slot f 0 } int-rep } { 1 int-rep } >insn
     ] { } make
 ] unit-test
 
 [
     {
-        T{ _spill { src 1 } { class int-regs } { n 0 } }
+        T{ _spill { src 1 } { rep int-rep } { n 0 } }
     }
 ] [
     [
-        { 1 int-regs } { T{ spill-slot f 0 } int-regs } >insn
+        { 1 int-rep } { T{ spill-slot f 0 } int-rep } >insn
     ] { } make
 ] unit-test
 
 [
     {
-        T{ _copy { src 1 } { dst 2 } { class int-regs } }
+        T{ ##copy { src 1 } { dst 2 } { rep int-rep } }
     }
 ] [
     [
-        { 1 int-regs } { 2 int-regs } >insn
+        { 1 int-rep } { 2 int-rep } >insn
     ] { } make
 ] unit-test
 
-H{ { int-regs 10 } { float-regs 20 } } clone spill-counts set
+cfg new 8 >>spill-area-size cfg set
 H{ } clone spill-temps set
 
 [
-    {
-        T{ _spill { src 0 } { class int-regs } { n 10 } }
-        T{ _copy { dst 0 } { src 1 } { class int-regs } }
-        T{ _reload { dst 1 } { class int-regs } { n 10 } }
-    }
+    t
 ] [
-    { { { 0 int-regs } { 1 int-regs } } { { 1 int-regs } { 0 int-regs } } }
-    mapping-instructions
-] unit-test
\ No newline at end of file
+    { { { 0 int-rep } { 1 int-rep } } { { 1 int-rep } { 0 int-rep } } }
+    mapping-instructions {
+        {
+            T{ _spill { src 0 } { rep int-rep } { n 8 } }
+            T{ ##copy { dst 0 } { src 1 } { rep int-rep } }
+            T{ _reload { dst 1 } { rep int-rep } { n 8 } }
+        }
+        {
+            T{ _spill { src 1 } { rep int-rep } { n 8 } }
+            T{ ##copy { dst 1 } { src 0 } { rep int-rep } }
+            T{ _reload { dst 0 } { rep int-rep } { n 8 } }
+        }
+    } member?
+] unit-test