summaryrefslogtreecommitdiff
path: root/src/test/java/com/seaofnodes/simple/spill
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/com/seaofnodes/simple/spill')
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/BrainFuckTest-testBrainFuck.smp46
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testAlloc0.smp1
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testAlloc2.smp1
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testArray1.smp8
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testBasic1.smp1
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testBrainfuck.smp43
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testCast.smp1
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testFlags1.smp5
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testFlags2.smp6
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testFltArg.smp1
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testMergeSort.smp46
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testNewtonFloat.smp11
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testNewtonInteger.smp10
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testString.smp35
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter21AllocTest-testArray1.smp9
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter21AllocTest-testNewtonFloat.smp13
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter21AllocTest-testString.smp35
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter21Test-testAntiDeps1.smp10
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter21Test-testArgCount-2.smp6
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter21Test-testArgCount.smp6
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter21Test-testFibExport.smp10
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter21Test-testInfinite.smp1
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter21Test-testLoop2.smp9
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter21Test-testNewtonExport.smp10
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter21Test-testPerson.smp9
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter21Test-testSieve.smp30
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter21Test-testStringExport.smp33
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter22Test-testHelloWorld.smp4
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter22Test-testInfiniteReturn.smp1
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter22Test-testNarrowCReturns.smp12
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter22Test-testPerson.smp8
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter22Test-testSextFail.smp4
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter22Test-testSextFail2.smp5
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter22Test-testSextSuccess.smp5
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter23AllocTest-testString.smp34
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter23Test-testAnd.smp11
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter23Test-testAndPtr.smp12
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter23Test-testCondSideEffAnd.smp17
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter23Test-testCondSideEffOr.smp24
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter23Test-testFRefFields.smp20
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter23Test-testFuncCall.smp16
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter23Test-testMethod.smp17
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter23Test-testOr.smp13
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter23Test-testOrRhsLoopLocal.smp10
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter23Test-testOrRhsLoopMemory.smp11
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter24AllocTest-testBubbleSort.smp217
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter24AllocTest-testNewtonInteger.smp11
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter24AllocTest-testStackArguments.smp5
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack1.smp10
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack10-2.smp1
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack10.smp3
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack11-2.smp1
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack11.smp3
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack12-2.smp1
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack12.smp3
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack13-2.smp1
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack13.smp3
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack2.smp10
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack3.smp11
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack4.smp10
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack5.smp15
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack9-2.smp1
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack9.smp3
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/MergeSortTest-testMergeSort0.smp35
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/README.ja.md50
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/README.md78
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/cohorts.tsv200
67 files changed, 1292 insertions, 0 deletions
diff --git a/src/test/java/com/seaofnodes/simple/spill/BrainFuckTest-testBrainFuck.smp b/src/test/java/com/seaofnodes/simple/spill/BrainFuckTest-testBrainFuck.smp
new file mode 100644
index 00000000..71af2b7a
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/BrainFuckTest-testBrainFuck.smp
@@ -0,0 +1,46 @@
+// -*- mode: java; -*-
+val brain_fuck = { ->
+ var !program = "++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.";
+ int d = 0;
+ u8[] !output = new u8[0];
+ u8[] !data = new u8[100];
+
+ for( int pc = 0; pc < program#; pc++ ) {
+ var command = program[pc];
+ if (command == 62) {
+ d++;
+ } else if (command == 60) {
+ d--;
+ } else if (command == 43) {
+ data[d]++;
+ } else if (command == 45) {
+ data[d]--;
+ } else if (command == 46) {
+ // Output a byte; increase the output array size
+ var old = output;
+ output = new u8[output# + 1];
+ for( int i = 0; i < old#; i++ )
+ output[i] = old[i];
+ output[old#] = data[d]; // Add the extra byte on the end
+ } else if (command == 44) {
+ data[d] = 42;
+ } else if (command == 91) {
+ if (data[d] == 0) {
+ for( int d = 1; d > 0; ) {
+ command = program[++pc];
+ if (command == 91) d++;
+ if (command == 93) d--;
+ }
+ }
+ } else if (command == 93) {
+ if (data[d]) {
+ for( int d = 1; d > 0; ) {
+ command = program[--pc];
+ if (command == 93) d++;
+ if (command == 91) d--;
+ }
+ }
+ }
+ }
+ return output;
+};
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testAlloc0.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testAlloc0.smp
new file mode 100644
index 00000000..d85e39e5
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testAlloc0.smp
@@ -0,0 +1 @@
+return new u8[arg];
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testAlloc2.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testAlloc2.smp
new file mode 100644
index 00000000..864bcdc8
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testAlloc2.smp
@@ -0,0 +1 @@
+int[] !xs = new int[3]; xs[arg]=1; return xs[arg&1];
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testArray1.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testArray1.smp
new file mode 100644
index 00000000..7f3bd007
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testArray1.smp
@@ -0,0 +1,8 @@
+int[] !ary = new int[arg];
+// Fill [0,1,2,3,4,...]
+for( int i=0; i<ary#; i++ )
+ ary[i] = i;
+// Fill [0,1,3,6,10,...]
+for( int i=0; i<ary#-1; i++ )
+ ary[i+1] += ary[i];
+return ary[1] * 1000 + ary[3]; // 1 * 1000 + 6
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testBasic1.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testBasic1.smp
new file mode 100644
index 00000000..671e5b74
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testBasic1.smp
@@ -0,0 +1 @@
+return arg | 2;
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testBrainfuck.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testBrainfuck.smp
new file mode 100644
index 00000000..4e5ab81d
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testBrainfuck.smp
@@ -0,0 +1,43 @@
+u8[] !program = new u8[106];program[0] = 43;program[1] = 43;program[2] = 43;program[3] = 43;program[4] = 43;program[5] = 43;program[6] = 43;program[7] = 43;program[8] = 91;program[9] = 62;program[10] = 43;program[11] = 43;program[12] = 43;program[13] = 43;program[14] = 91;program[15] = 62;program[16] = 43;program[17] = 43;program[18] = 62;program[19] = 43;program[20] = 43;program[21] = 43;program[22] = 62;program[23] = 43;program[24] = 43;program[25] = 43;program[26] = 62;program[27] = 43;program[28] = 60;program[29] = 60;program[30] = 60;program[31] = 60;program[32] = 45;program[33] = 93;program[34] = 62;program[35] = 43;program[36] = 62;program[37] = 43;program[38] = 62;program[39] = 45;program[40] = 62;program[41] = 62;program[42] = 43;program[43] = 91;program[44] = 60;program[45] = 93;program[46] = 60;program[47] = 45;program[48] = 93;program[49] = 62;program[50] = 62;program[51] = 46;program[52] = 62;program[53] = 45;program[54] = 45;program[55] = 45;program[56] = 46;program[57] = 43;program[58] = 43;program[59] = 43;program[60] = 43;program[61] = 43;program[62] = 43;program[63] = 43;program[64] = 46;program[65] = 46;program[66] = 43;program[67] = 43;program[68] = 43;program[69] = 46;program[70] = 62;program[71] = 62;program[72] = 46;program[73] = 60;program[74] = 45;program[75] = 46;program[76] = 60;program[77] = 46;program[78] = 43;program[79] = 43;program[80] = 43;program[81] = 46;program[82] = 45;program[83] = 45;program[84] = 45;program[85] = 45;program[86] = 45;program[87] = 45;program[88] = 46;program[89] = 45;program[90] = 45;program[91] = 45;program[92] = 45;program[93] = 45;program[94] = 45;program[95] = 45;program[96] = 45;program[97] = 46;program[98] = 62;program[99] = 62;program[100] = 43;program[101] = 46;program[102] = 62;program[103] = 43;program[104] = 43;program[105] = 46;
+int d = 0;
+u8[] !output = new u8[0];
+u8[] !data = new u8[100];
+
+for( int pc = 0; pc < program#; pc++ ) {
+ var command = program[pc];
+ if (command == 62) {
+ d++;
+ } else if (command == 60) {
+ d--;
+ } else if (command == 43) {
+ data[d]++;
+ } else if (command == 45) {
+ data[d]--;
+ } else if (command == 46) {
+ // Output a byte; increase the output array size
+ var old = output;
+ output = new u8[output# + 1];
+ for( int i = 0; i < old#; i++ )
+ output[i] = old[i];
+ output[old#] = data[d]; // Add the extra byte on the end
+ } else if (command == 44) {
+ data[d] = 42;
+ } else if (command == 91) {
+ if (data[d] == 0) {
+ for( int d = 1; d > 0; ) {
+ command = program[++pc];
+ if (command == 91) d++;
+ if (command == 93) d--;
+ }
+ }
+ } else if (command == 93) {
+ if (data[d]) {
+ for( int d = 1; d > 0; ) {
+ command = program[--pc];
+ if (command == 93) d++;
+ if (command == 91) d--;
+ }
+ }
+ }
+}
+return output;
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testCast.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testCast.smp
new file mode 100644
index 00000000..d1368767
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testCast.smp
@@ -0,0 +1 @@
+struct _Bar { int x; }; var b = arg ? new _Bar; return b ? b.x++ + b.x++ : -1;
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testFlags1.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testFlags1.smp
new file mode 100644
index 00000000..f630e959
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testFlags1.smp
@@ -0,0 +1,5 @@
+bool b1 = arg == 1;
+bool b2 = arg == 2;
+if (b2) if (b1) return 1;
+if (b1) return 2;
+return 0;
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testFlags2.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testFlags2.smp
new file mode 100644
index 00000000..70bfc226
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testFlags2.smp
@@ -0,0 +1,6 @@
+bool b1 = arg == 1;
+while (arg > 0) {
+ arg--;
+ if (b1) arg--;
+}
+return arg;
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testFltArg.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testFltArg.smp
new file mode 100644
index 00000000..caa11f12
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testFltArg.smp
@@ -0,0 +1 @@
+return {int i, flt f, int j->return i+f+j;};
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testMergeSort.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testMergeSort.smp
new file mode 100644
index 00000000..417eba72
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testMergeSort.smp
@@ -0,0 +1,46 @@
+// based on the top-down version from https://en.wikipedia.org/wiki/Merge_sort
+
+val _merge_sort = { int[] a, int[] b, int n ->
+ _copy_array(a, 0, n, b);
+ _split_merge(a, 0, n, b);
+};
+
+val _split_merge = { int[] b, int begin, int end, int[] a ->
+ if (end - begin <= 1)
+ return 0;
+ int middle = (end + begin) / 2;
+ _split_merge(a, begin, middle, b);
+ _split_merge(a, middle, end, b);
+ _merge(b, begin, middle, end, a);
+ return 0;
+};
+
+val _merge = { int[] b, int begin, int middle, int end, int[] a ->
+ int i = begin, j = middle;
+
+ for (int k = begin; k < end; k++) {
+ // && and ||
+ bool cond = false;
+ if (i < middle) {
+ if (j >= end) cond = true;
+ else if (a[i] <= a[j]) cond = true;
+ }
+ if (cond) b[k] = a[i++];
+ else b[k] = a[j++];
+ }
+};
+
+val _copy_array = { int[] a, int begin, int end, int[] b ->
+ for (int k = begin; k < end; k++)
+ b[k] = a[k];
+};
+
+int[] !a = new int[arg];
+int[] !b = new int[a#];
+
+for (int i = 0; i < a#; i++)
+ a[i] = a# - i;
+
+_merge_sort(a, b, a#);
+
+return a;
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testNewtonFloat.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testNewtonFloat.smp
new file mode 100644
index 00000000..fd76478f
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testNewtonFloat.smp
@@ -0,0 +1,11 @@
+// Newtons approximation to the square root
+val _sqrt = { flt x ->
+ flt guess = x;
+ while( 1 ) {
+ flt next = (x/guess + guess)/2;
+ if( next == guess ) return guess;
+ guess = next;
+ }
+};
+flt farg = arg;
+return _sqrt(farg) + _sqrt(farg+2.0);
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testNewtonInteger.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testNewtonInteger.smp
new file mode 100644
index 00000000..8912dcd9
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testNewtonInteger.smp
@@ -0,0 +1,10 @@
+// Newtons approximation to the square root
+val _sqrt = { int x ->
+ int guess = x;
+ while( 1 ) {
+ int next = (x/guess + guess)/2;
+ if( next == guess ) return guess;
+ guess = next;
+ }
+};
+return _sqrt(arg) + _sqrt(arg+2);
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testString.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testString.smp
new file mode 100644
index 00000000..951cdc32
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter20Test-testString.smp
@@ -0,0 +1,35 @@
+struct _String {
+ u8[] cs;
+ new _String={ u8[] b -> cs=b; };
+ int _hashCode;
+};
+
+val _equals = { !_String !self, !_String s ->
+ if( self == s ) return true;
+ if( self.cs# != s.cs# ) return false;
+ for( int i=0; i< self.cs#; i++ )
+ if( self.cs[i] != s.cs[i] )
+ return false;
+ return true;
+};
+
+val _hashCode = { !_String self ->
+ self._hashCode
+ ? self._hashCode
+ : (self._hashCode = _hashCodeString(self));
+};
+
+val _hashCodeString = { !_String self ->
+ int hash=0;
+ if( self.cs ) {
+ for( int i=0; i< self.cs#; i++ )
+ hash = hash*31 + self.cs[i];
+ }
+ if( !hash ) hash = 123456789;
+ return hash;
+};
+
+!_String !s = new _String(new u8[17]);
+s.cs[0] = 67; // C
+s.cs[1] = 108; // l
+_hashCode(s);
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter21AllocTest-testArray1.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter21AllocTest-testArray1.smp
new file mode 100644
index 00000000..6b10f92c
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter21AllocTest-testArray1.smp
@@ -0,0 +1,9 @@
+// -*- mode: java; -*-
+int[] !ary = new int[arg];
+// Fill [0,1,2,3,4,...]
+for( int i=0; i<ary#; i++ )
+ ary[i] = i;
+// Fill [0,1,3,6,10,...]
+for( int i=0; i<ary#-1; i++ )
+ ary[i+1] += ary[i];
+return ary[1] * 1000 + ary[3]; // 1 * 1000 + 6
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter21AllocTest-testNewtonFloat.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter21AllocTest-testNewtonFloat.smp
new file mode 100644
index 00000000..58449f9c
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter21AllocTest-testNewtonFloat.smp
@@ -0,0 +1,13 @@
+// -*- mode: java; -*-
+// Newtons approximation to the square root
+val _test_sqrt = { flt x ->
+ flt epsilon = 1e-15;
+ flt guess = x;
+ while( 1 ) {
+ flt next = (x/guess + guess)/2;
+ if( guess-epsilon <= next & next <= guess+epsilon ) return guess;
+ //if( guess==next ) return guess;
+ guess = next;
+ }
+};
+flt farg = arg; return _test_sqrt(farg) + _test_sqrt(farg+2.0);
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter21AllocTest-testString.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter21AllocTest-testString.smp
new file mode 100644
index 00000000..a18a5b88
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter21AllocTest-testString.smp
@@ -0,0 +1,35 @@
+// -*- mode: java; -*-
+struct _String {
+ u8[] cs;
+ int _hashCode;
+ new _String = { u8[] data -> cs=data; };
+};
+
+// Compare two Strings
+val equals = { !_String !self, !_String s ->
+ if( self == s ) return true;
+ if( self.cs# != s.cs# ) return false;
+ for( int i=0; i< self.cs#; i++ )
+ if( self.cs[i] != s.cs[i] )
+ return false;
+ return true;
+};
+
+// Return the String hashCode (cached, and never 0)
+val hashCode = { !_String self ->
+ self._hashCode
+ ? self._hashCode
+ : (self._hashCode = _hashCodeString(self));
+};
+
+val _hashCodeString = { !_String self ->
+ int hash=0;
+ if( self.cs )
+ for( int i=0; i< self.cs#; i++ )
+ hash = hash*31 + self.cs[i];
+ if( !hash ) hash = 123456789;
+ return hash;
+};
+
+// This fixture exports its API, not the last declaration as a result.
+return 0;
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter21Test-testAntiDeps1.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter21Test-testAntiDeps1.smp
new file mode 100644
index 00000000..315cc5b6
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter21Test-testAntiDeps1.smp
@@ -0,0 +1,10 @@
+struct _S { int f; };
+var v0 = new _S;
+!_S? !v1;
+if (arg) v1 = new _S;
+if (v1) {
+ v0.f = v1.f;
+} else {
+ v0.f = 2;
+}
+return v0;
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter21Test-testArgCount-2.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter21Test-testArgCount-2.smp
new file mode 100644
index 00000000..20a05445
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter21Test-testArgCount-2.smp
@@ -0,0 +1,6 @@
+// -*- mode: java; -*-
+val addAll = { int i0, flt f1, int i2, flt f3, int i4, flt f5, int i6, flt f7, int x8, flt f9, int i10, flt f11, int i12, flt f13, int i14, flt f15 ->
+ return
+ i0 + f1+ i2+ f3+ i4+ f5+ i6+ f7+ x8 +f9 +
+ i10+f11+i12+f13+i14+f15;
+};
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter21Test-testArgCount.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter21Test-testArgCount.smp
new file mode 100644
index 00000000..6b6bc0ae
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter21Test-testArgCount.smp
@@ -0,0 +1,6 @@
+// -*- mode: java; -*-
+val addAll = { int i0, flt f1, int i2, flt f3, int i4, flt f5, int i6, flt f7, int x8, flt f9, int i10, flt f11, int i12, flt f13, int i14, flt f15, int x16, flt f17 int x18, flt f19 ->
+ return
+ i0 + f1+ i2+ f3+ i4+ f5+ i6+ f7+ x8 +f9 +
+ i10+f11+i12+f13+i14+f15+x16+f17+x18+f19 ;
+};
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter21Test-testFibExport.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter21Test-testFibExport.smp
new file mode 100644
index 00000000..149872a7
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter21Test-testFibExport.smp
@@ -0,0 +1,10 @@
+val fib = {int n ->
+ int f1=1;
+ int f2=1;
+ while( n-- > 1 ){
+ int temp = f1+f2;
+ f1=f2;
+ f2=temp;
+ }
+ return f2;
+};
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter21Test-testInfinite.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter21Test-testInfinite.smp
new file mode 100644
index 00000000..1804ad59
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter21Test-testInfinite.smp
@@ -0,0 +1 @@
+struct _S { int i; }; !_S !s = new _S; while(1) s.i++;
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter21Test-testLoop2.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter21Test-testLoop2.smp
new file mode 100644
index 00000000..cc54f790
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter21Test-testLoop2.smp
@@ -0,0 +1,9 @@
+int i = 0;
+while(true) {
+ i += 1;
+ if( i==0 ) continue;
+ if( i==1 ) continue;
+ if( i==2 ) break;
+ continue;
+}
+return i;
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter21Test-testNewtonExport.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter21Test-testNewtonExport.smp
new file mode 100644
index 00000000..2786558e
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter21Test-testNewtonExport.smp
@@ -0,0 +1,10 @@
+val test_sqrt = { flt x ->
+ flt epsilon = 1e-15;
+ flt guess = x;
+ while( 1 ) {
+ flt next = (x/guess + guess)/2;
+ if( guess-epsilon <= next & next <= guess+epsilon ) return guess;
+ //if( guess==next ) return guess;
+ guess = next;
+ }
+};
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter21Test-testPerson.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter21Test-testPerson.smp
new file mode 100644
index 00000000..09285034
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter21Test-testPerson.smp
@@ -0,0 +1,9 @@
+// -*-java-*-
+struct Person {
+ int age;
+};
+
+val fcn = { !Person?[] ps, int x ->
+ if( ps[x] )
+ ps[x].age++;
+};
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter21Test-testSieve.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter21Test-testSieve.smp
new file mode 100644
index 00000000..beb0b3ad
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter21Test-testSieve.smp
@@ -0,0 +1,30 @@
+val sieve = { int N ->
+ // The main Sieve array
+ bool[] !ary = new bool[N];
+ // The primes less than N
+ u32[] !primes = new u32[N>>1];
+ // Number of primes so far, searching at index p
+ int nprimes = 0, p=2;
+ // Find primes while p^2 < N
+ while( p*p < N ) {
+ // skip marked non-primes
+ while( ary[p] ) p++;
+ // p is now a prime
+ primes[nprimes++] = p;
+ // Mark out the rest non-primes
+ for( int i = p + p; i < ary#; i+= p )
+ ary[i] = true;
+ p++;
+ }
+
+ // Now just collect the remaining primes, no more marking
+ for( ; p < N; p++ )
+ if( !ary[p] )
+ primes[nprimes++] = p;
+
+ // Copy/shrink the result array
+ u32[] !rez = new u32[nprimes];
+ for( int j=0; j < nprimes; j++ )
+ rez[j] = primes[j];
+ return rez;
+};
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter21Test-testStringExport.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter21Test-testStringExport.smp
new file mode 100644
index 00000000..ee5a0560
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter21Test-testStringExport.smp
@@ -0,0 +1,33 @@
+struct String {
+ u8[] cs;
+ int _hashCode;
+ new String = { u8[] data -> cs=data; };
+};
+
+// Compare two Strings
+val equals = { !String !self, !String s ->
+ if( self == s ) return true;
+ if( self.cs# != s.cs# ) return false;
+ for( int i=0; i< self.cs#; i++ )
+ if( self.cs[i] != s.cs[i] )
+ return false;
+ return true;
+};
+
+// Return the String hashCode (cached, and never 0)
+val hashCode = { !String self ->
+ self._hashCode
+ ? self._hashCode
+ : (self._hashCode = _hashCodeString(self));
+};
+
+val _hashCodeString = { !String self ->
+ int hash=0;
+ for( int i=0; i< self.cs#; i++ )
+ hash = hash*31 + self.cs[i];
+ if( !hash ) hash = 123456789;
+ return hash;
+};
+
+// This fixture exports its API, not the last declaration as a result.
+return 0;
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter22Test-testHelloWorld.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter22Test-testHelloWorld.smp
new file mode 100644
index 00000000..1bcac36d
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter22Test-testHelloWorld.smp
@@ -0,0 +1,4 @@
+{i32 i64 u32 -> u32} write="C";
+val _p={u8[~] str -> i64 ptr=str; return write(1,ptr,str#);};
+_p("Hello, World!");
+return 0;
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter22Test-testInfiniteReturn.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter22Test-testInfiniteReturn.smp
new file mode 100644
index 00000000..cc549808
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter22Test-testInfiniteReturn.smp
@@ -0,0 +1 @@
+struct _S { int i; }; !_S !s = new _S; while(1) s.i++; return s.i;
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter22Test-testNarrowCReturns.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter22Test-testNarrowCReturns.smp
new file mode 100644
index 00000000..21293a7a
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter22Test-testNarrowCReturns.smp
@@ -0,0 +1,12 @@
+{i8} c_i8="C"; {u8} c_u8="C";
+{i16} c_i16="C"; {u16} c_u16="C";
+{i32} c_i32="C"; {u32} c_u32="C";
+{int} c_i64="C";
+val test_i8={->return c_i8();};
+val test_u8={->return c_u8();};
+val test_i16={->return c_i16();};
+val test_u16={->return c_u16();};
+val test_i32={->return c_i32();};
+val test_u32={->return c_u32();};
+val test_i64={->return c_i64();};
+val test_cmp={->return c_i32()==-1;};
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter22Test-testPerson.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter22Test-testPerson.smp
new file mode 100644
index 00000000..f860091d
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter22Test-testPerson.smp
@@ -0,0 +1,8 @@
+struct Person {
+ i32 age;
+};
+
+val fcn = { !Person?[] ps, int x ->
+ if( ps[x] )
+ ps[x].age++;
+};
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter22Test-testSextFail.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter22Test-testSextFail.smp
new file mode 100644
index 00000000..ec9c6d50
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter22Test-testSextFail.smp
@@ -0,0 +1,4 @@
+struct _Person { i32 age;};
+!_Person !p = new _Person;
+p.age = (arg<<17)>>17;
+return 0;
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter22Test-testSextFail2.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter22Test-testSextFail2.smp
new file mode 100644
index 00000000..d5264aa2
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter22Test-testSextFail2.smp
@@ -0,0 +1,5 @@
+
+ struct _Person { i32 age;};
+ !_Person !p = new _Person;
+ p.age = (arg<<48)>>48;
+ return 0;
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter22Test-testSextSuccess.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter22Test-testSextSuccess.smp
new file mode 100644
index 00000000..c4398a89
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter22Test-testSextSuccess.smp
@@ -0,0 +1,5 @@
+// Should fold away sign extend
+struct _Person { i8 age;};
+!_Person !p = new _Person;
+p.age = (arg<<48)>>48;
+return 0;
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter23AllocTest-testString.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter23AllocTest-testString.smp
new file mode 100644
index 00000000..49c80a99
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter23AllocTest-testString.smp
@@ -0,0 +1,34 @@
+// -*- mode: java; -*-
+struct _String {
+ u8[] cs;
+ int _hashCode;
+ new _String = { u8[] data -> cs=data; };
+};
+
+// Compare two Strings
+val equals = { !_String !self, !_String s ->
+ if( self == s ) return true;
+ if( self.cs# != s.cs# ) return false;
+ for( int i=0; i< self.cs#; i++ )
+ if( self.cs[i] != s.cs[i] )
+ return false;
+ return true;
+};
+
+// Return the String hashCode (cached, and never 0)
+val hashCode = { !_String self ->
+ self._hashCode
+ ? self._hashCode
+ : (self._hashCode = _hashCodeString(self));
+};
+
+val _hashCodeString = { !_String self ->
+ int hash=0;
+ for( int i=0; i< self.cs#; i++ )
+ hash = hash*31 + self.cs[i];
+ if( !hash ) hash = 123456789;
+ return hash;
+};
+
+// This fixture exports its API, not the last declaration as a result.
+return 0;
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter23Test-testAnd.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter23Test-testAnd.smp
new file mode 100644
index 00000000..da85ef0e
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter23Test-testAnd.smp
@@ -0,0 +1,11 @@
+{i32 i64 u32 -> u32} write="C";
+val _p={u8[~] str -> i64 ptr=str; return write(1,ptr,str#);};
+int a = 1;
+int b = 1;
+
+if(a && b) {
+ _p("And");
+} else {
+ _p("Or");
+}
+return 0;
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter23Test-testAndPtr.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter23Test-testAndPtr.smp
new file mode 100644
index 00000000..a1e4e9ab
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter23Test-testAndPtr.smp
@@ -0,0 +1,12 @@
+{i32 i64 u32 -> u32} write="C";
+val _p={u8[~] str -> i64 ptr=str; return write(1,ptr,str#);};
+struct _S { !_S? !fld; new _S={ !_S? f -> fld=f; }; };
+
+val ptr = arg == 1 ? null : new _S(arg==1 ? null : new _S(null));
+if( ptr && ptr.fld ) {
+ _p("true");
+} else {
+ _p("false");
+}
+
+return 0;
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter23Test-testCondSideEffAnd.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter23Test-testCondSideEffAnd.smp
new file mode 100644
index 00000000..1a6b5cf3
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter23Test-testCondSideEffAnd.smp
@@ -0,0 +1,17 @@
+{i32 i64 u32 -> u32} write="C";
+val _p={u8[~] str -> i64 ptr=str; return write(1,ptr,str#);};
+int a = 1;
+int b = 1;
+
+int x=1;
+int y=1;
+int z=0;
+
+int g = x++ && y++ && z++;
+
+if(x == 2 && y == 2 && z == 1 && g == 0) {
+ _p("Effected");
+} else {
+ _p("Not effected");
+}
+return 0;
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter23Test-testCondSideEffOr.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter23Test-testCondSideEffOr.smp
new file mode 100644
index 00000000..f2bb16c5
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter23Test-testCondSideEffOr.smp
@@ -0,0 +1,24 @@
+{i32 i64 u32 -> u32} write="C";
+val _p={u8[~] str -> i64 ptr=str; return write(1,ptr,str#);};
+int a = 1;
+int b = 1;
+
+int x = -1;
+int y=1;
+int z= -1;
+
+int g = x++ || y++ || z++;
+
+int switch = 0;
+if(x == 4 || y == 4 || z == 4) {
+ switch = -1;
+} else {
+ switch = 1;
+}
+int cd = 1;
+if((x == 0 && y == 1 && z==-1) && switch && g) {
+ _p("Effected");
+} else {
+ _p("Not effected");
+}
+return 0;
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter23Test-testFRefFields.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter23Test-testFRefFields.smp
new file mode 100644
index 00000000..eac0a542
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter23Test-testFRefFields.smp
@@ -0,0 +1,20 @@
+// A hypothetical scanner class
+struct _Scan {
+ int !x;
+ u8[~] buf;
+ new _Scan={ u8[~] b -> buf=b; };
+ // Skip whitespace
+ val skip = { ->
+ while( buf[x] <= ' ' )
+ x++;
+ };
+ // Peek a character; if matched consume it, else false.
+ val peek = { u8 c ->
+ skip();
+ if( buf[x] != c ) return false;
+ x++;
+ return true;
+ };
+};
+!_Scan !s = new _Scan(" q");
+return s.peek('q');
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter23Test-testFuncCall.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter23Test-testFuncCall.smp
new file mode 100644
index 00000000..8a7b90d9
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter23Test-testFuncCall.smp
@@ -0,0 +1,16 @@
+{i32 i64 u32 -> u32} write="C";
+val _p={u8[~] str -> i64 ptr=str; return write(1,ptr,str#);};
+// -*- mode: java; -*-
+int a = 1;
+int b = 1;
+
+var _sq = { int x ->
+ x*x;
+};
+
+if(a && _sq(0)) {
+ _p("And");
+} else {
+ _p("Or");
+}
+return 0;
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter23Test-testMethod.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter23Test-testMethod.smp
new file mode 100644
index 00000000..ced649e3
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter23Test-testMethod.smp
@@ -0,0 +1,17 @@
+// A hypothetical scanner class
+struct _Scan {
+ int !x;
+ u8[~] buf;
+ new _Scan={ u8[~] b -> buf=b; };
+ // Skip whitespace
+ val skip = { ->
+ while( buf[x] <= ' ' )
+ x++;
+ };
+ val require = { u8 ch ->
+ skip();
+ buf[x++]==ch;
+ };
+};
+!_Scan !s = new _Scan(" [1,2]");
+return s.require('[');
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter23Test-testOr.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter23Test-testOr.smp
new file mode 100644
index 00000000..dbab1ae5
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter23Test-testOr.smp
@@ -0,0 +1,13 @@
+{i32 i64 u32 -> u32} write="C";
+val _p={u8[~] str -> i64 ptr=str; return write(1,ptr,str#);};
+int a = 1;
+int b = 0;
+
+if(a++ || b++ ) {
+ if(b == 0 && a == 2) {
+ _p("Or");
+ }
+} else{
+ _p("And");
+}
+return 0;
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter23Test-testOrRhsLoopLocal.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter23Test-testOrRhsLoopLocal.smp
new file mode 100644
index 00000000..c4e4f9b5
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter23Test-testOrRhsLoopLocal.smp
@@ -0,0 +1,10 @@
+struct _S { int f; };
+int x=0;
+int result=arg&1;
+if(!result) {
+ !_S !s=new _S;
+ while(x<3) x++;
+ s.f=++x;
+ result=s.f;
+}
+return x*10+result;
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter23Test-testOrRhsLoopMemory.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter23Test-testOrRhsLoopMemory.smp
new file mode 100644
index 00000000..79478408
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter23Test-testOrRhsLoopMemory.smp
@@ -0,0 +1,11 @@
+struct _S { int f; };
+!_S !s=new _S;
+int result=arg&1;
+if(!result) {
+ !_S !t=new _S;
+ while(s.f<3) s.f++;
+ s.f++;
+ t.f=s.f;
+ result=t.f;
+}
+return s.f*10+result;
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter24AllocTest-testBubbleSort.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter24AllocTest-testBubbleSort.smp
new file mode 100644
index 00000000..f292254e
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter24AllocTest-testBubbleSort.smp
@@ -0,0 +1,217 @@
+
+ i32 errno = "C";
+ // fd buf len -> len
+ { i32 i64 u32 -> u32 } write = "C";
+ // fd buf len -> len
+ { i32 i64 u32 -> u32 } read = "C";
+ // status
+ { i32 -> i32 } _exit = "C";
+ // addr len prot flags fd off -> void*
+ { i64 i64 i32 i32 i32 i32 -> i64 } mmap = "C";
+ // mmap flags
+ i32 PROT_EXEC = 4;
+ i32 PROT_READ = 1;
+ i32 PROT_WRITE= 2;
+ i32 PROT_NONE = 0;
+ i32 MAP_PRIVATE = 2;
+ i32 MAP_ANON = 32;
+
+ val _copy = { u8[] dst, int doff, u8[~] src, int soff, int len ->
+ for( int i=0; i<len; i++ )
+ dst[i+doff] = src[i+soff];
+ return dst;
+ };
+ struct _aryu8 {
+ u32 !len = 0;
+ u8[] !buf;
+ new _aryu8={ u8[] b -> buf=b; };
+ // Grow as needed
+ val _grow = { int len2 ->
+ if( len+len2 < buf# ) return self;
+ int newlen = buf# * 2;
+ while( len+len2 >= newlen ) newlen *= 2;
+ u8[] !buf2 = new u8[newlen];
+ _copy(buf2,0,buf,0,buf#);
+ buf = buf2;
+ self;
+ };
+
+ // Add a character to aryu8
+ val add = { u8 c ->
+ _grow(1).buf[len++] = c;
+ self;
+ };
+
+ // Add a plain array to the aryu8
+ val addAry = { u8[~] ary ->
+ _grow(ary#);
+ _copy(buf,len,ary,0,ary#);
+ len += ary#;
+ self;
+ };
+
+ // Remove x chars from the tail.
+ val undo = { int x ->
+ len = len >= x ? len-x : 0;
+ self;
+ };
+
+ // Print ASCII number into aryu8
+ val num = { i64 x ->
+ if( !x ) { add('0'); return self; }
+ if( x < 0 ) { add('-'); x = -x; }
+ i64 ten = 1, log = 0;
+ while( ten <= x ) { ten *= 10; log++; }
+ for( int i=0; i<log; i++ ) {
+ ten /= 10;
+ i64 q = x/ten;
+ u8 digit = q+'0';
+ add(digit);
+ x -= q*ten;
+ }
+ self;
+ };
+
+ // Write to fd, returns the number of bytes written (len).
+ val write = { i32 fd -> i64 ptr = buf; write(fd,ptr,len); };
+ };
+struct _Scan {
+ int !x;
+ u8[~] buf;
+ new _Scan={ u8[~] b -> buf=b; };
+
+ // Skip whitespace
+ val skip = { ->
+ while( buf[x] <= ' ' )
+ x++;
+ return self;
+ };
+
+ // True if find required character, and skip it; else False.
+ val match = { u8 c ->
+ skip();
+ if( buf[x] != c ) return false;
+ x++;
+ return true;
+ };
+
+ // Parse a simple number
+ val number = { ->
+ skip();
+ bool neg = match('-');
+ i64 n = 0;
+ while( '0' <= buf[x] & buf[x] <= '9' )
+ n = n*10 + (buf[x++] - '0');
+ return neg ? -n : n;
+ };
+ };
+struct _aryi64 {
+ u32 !len = 0;
+ i64[] !buf;
+ new _aryi64={ i64[] b -> buf=b; };
+ // Grow as needed
+ val _grow = { int len2 ->
+ if( len+len2 < buf# ) return self;
+ int newlen = buf# * 2;
+ while( len+len2 >= newlen ) newlen *= 2;
+ i64[] !buf2 = new i64[newlen];
+ for( int i=0; i<buf#; i++ )
+ buf2[i] = buf[i];
+ buf = buf2;
+ self;
+ };
+
+ // Add a i64 to aryu8
+ val add = { i64 c ->
+ _grow(1).buf[len++] = c;
+ self;
+ };
+
+ // Write to aryu8
+ val str = { ->
+ // TODO: clunky default constructor syntax
+ var str = new _aryu8(new u8[1]).add('[');
+ for( int i=0; i<len; i++ )
+ str.num(buf[i]).add(',').add(' ');
+ str.undo(2).add(']');
+ };
+ };
+ val _parseAryI64 = { u8[~] str ->
+ !_Scan !s = new _Scan(str);
+ if( !s.match('[') ) return null;
+ // Array of parsed results
+ var nums = new _aryi64(new i64[1]);
+ // Parse a list of numbers
+ if( !s.match(']') ) { // Handle the empty list
+ // Parse "123, " until a something else
+ while( s.x < s.buf# ) {
+ nums.add(s.number());
+ if( !s.match(',') )
+ break;
+ };
+ if( !s.match(']') ) return null; // Close the list
+ }
+ return nums;
+ };
+
+
+ // Print string to stdout
+ val _p = { u8[~] str ->
+ i64 ptr = str; // cast array base to i64
+ return write(1,ptr,str#);
+ };
+
+ // Return stdin as a u8[]
+ val _stdin = { ->
+ var buf = new u8[8*1024];
+ i64 ptr = buf;
+ int len = 0;
+ while( true ) {
+ int rez = read(0,ptr,buf#);
+ if( rez < 0 ) _exit(errno);
+ len += rez;
+ if( rez < buf# )
+ break;
+ _exit(-2); // Need to implement
+ }
+ // Compress
+ var dst = new u8[len];
+ return _copy(dst,0,buf,0,len);
+ };
+ // -*- mode: java; -*-
+
+// An implementation of
+// https://sampleprograms.io/projects/bubble-sort/
+//
+// Bubble sort, with reading (parsing) and writing (formatting) the data.
+
+val _sort = { !_aryi64 nums ->
+ var done = false;
+ while( !done ) {
+ done = true;
+ for( var i = 0; i < nums.len-1; i++ )
+ if( nums.buf[i] > nums.buf[i+1] ) {
+ int tmp = nums.buf[i];
+ nums.buf[i] = nums.buf[i+1];
+ nums.buf[i+1] = tmp; // Swap
+ done = false;
+ }
+ }
+};
+
+// Read from stdin a line of the form "[ 4, 3, 2, 1]" and print it sorted.
+val main = { ->
+ // Parse array of numbers from stdin
+ var nums = _parseAryI64( _stdin() );
+ if( !nums ) {
+ _p("stdin must look like [4, 3, 2, 1]");
+ return 1;
+ }
+
+ // Bubble sort array of integers
+ _sort(nums);
+
+ // Print a list of numbers to stdout
+ nums.str().write(1);
+ return 0;
+};
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter24AllocTest-testNewtonInteger.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter24AllocTest-testNewtonInteger.smp
new file mode 100644
index 00000000..572e4ad7
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter24AllocTest-testNewtonInteger.smp
@@ -0,0 +1,11 @@
+// Newtons approximation to the square root
+val _sqrt = { int x ->
+ int guess = x;
+ while( 1 ) {
+ int next = (x/guess + guess)/2;
+ if( next == guess ) return guess;
+ guess = next;
+ }
+};
+int cast_int = arg+2;
+return _sqrt(arg) + _sqrt(cast_int);
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter24AllocTest-testStackArguments.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter24AllocTest-testStackArguments.smp
new file mode 100644
index 00000000..b7d52dc5
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter24AllocTest-testStackArguments.smp
@@ -0,0 +1,5 @@
+val addAll = { int i0, flt f1, int i2, flt f3, int i4, flt f5, int i6, flt f7, int x8, flt f9, int i10, flt f11, int i12, flt f13, int i14, flt f15, int x16, flt f17 int x18, flt f19 ->
+ return
+ i0 + f1+ i2+ f3+ i4+ f5+ i6+ f7+ x8 +f9 +
+ i10+f11+i12+f13+i14+f15+x16+f17+x18+f19 ;
+};
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack1.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack1.smp
new file mode 100644
index 00000000..ded92426
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack1.smp
@@ -0,0 +1,10 @@
+{i32 i64 u32 -> u32} write="C";
+val _p={u8[~] str -> i64 ptr=str; return write(1,ptr,str#);};
+int something_specific = 11;
+
+if (10 < something_specific < 20) {
+ _p("In Range");
+} else {
+ _p("Out of Range");
+}
+return 0;
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack10-2.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack10-2.smp
new file mode 100644
index 00000000..d9fb38d5
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack10-2.smp
@@ -0,0 +1 @@
+return (0 < 1) == (1>0);
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack10.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack10.smp
new file mode 100644
index 00000000..f92e5b00
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack10.smp
@@ -0,0 +1,3 @@
+var stack10 = { int x ->
+ (x < 1) == (1>x);
+};
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack11-2.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack11-2.smp
new file mode 100644
index 00000000..b5aac70b
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack11-2.smp
@@ -0,0 +1 @@
+return 0 < arg < arg+1 < 4;
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack11.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack11.smp
new file mode 100644
index 00000000..f50e3512
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack11.smp
@@ -0,0 +1,3 @@
+var stack11 = { int x ->
+ 0 < x < x+1 < 4;
+};
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack12-2.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack12-2.smp
new file mode 100644
index 00000000..575d1b4e
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack12-2.smp
@@ -0,0 +1 @@
+return 0 != arg != 2;
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack12.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack12.smp
new file mode 100644
index 00000000..b4f36c2e
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack12.smp
@@ -0,0 +1,3 @@
+var stack12 = { int x ->
+ 0 != x != 2;
+};
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack13-2.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack13-2.smp
new file mode 100644
index 00000000..9bde9687
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack13-2.smp
@@ -0,0 +1 @@
+return 0 == arg == 1;
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack13.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack13.smp
new file mode 100644
index 00000000..ae7b38a3
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack13.smp
@@ -0,0 +1,3 @@
+var stack13 = { int x ->
+ 0 == x == 1;
+};
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack2.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack2.smp
new file mode 100644
index 00000000..5590c42f
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack2.smp
@@ -0,0 +1,10 @@
+{i32 i64 u32 -> u32} write="C";
+val _p={u8[~] str -> i64 ptr=str; return write(1,ptr,str#);};
+int score = 75;
+
+if (60 <= score < 90) {
+ _p("In Range");
+} else {
+_p("Out of range");
+}
+return 0;
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack3.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack3.smp
new file mode 100644
index 00000000..4700f8ce
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack3.smp
@@ -0,0 +1,11 @@
+{i32 i64 u32 -> u32} write="C";
+val _p={u8[~] str -> i64 ptr=str; return write(1,ptr,str#);};
+var _sq = { int x ->
+ x*x;
+};
+
+int score = 5;
+
+val str = (_sq(2) <= score < _sq(3)) ? "In Range" : "Out of range";
+_p(str);
+return 0;
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack4.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack4.smp
new file mode 100644
index 00000000..47623b30
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack4.smp
@@ -0,0 +1,10 @@
+{i32 i64 u32 -> u32} write="C";
+val _p={u8[~] str -> i64 ptr=str; return write(1,ptr,str#);};
+int something_specific = 9;
+
+if (10 < something_specific < 20) {
+ _p("In Range");
+} else {
+ _p("Out of Range");
+}
+return 0;
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack5.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack5.smp
new file mode 100644
index 00000000..3c2c4208
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack5.smp
@@ -0,0 +1,15 @@
+{i32 i64 u32 -> u32} write="C";
+val _p={u8[~] str -> i64 ptr=str; return write(1,ptr,str#);};
+var _sq = { int x ->
+ x*x;
+};
+
+int score = 5;
+
+if (_sq(2) <= score < _sq(3)) {
+_p("In Range");
+} else {
+_p("Out of range");
+}
+
+return 0;
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack9-2.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack9-2.smp
new file mode 100644
index 00000000..f54558f5
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack9-2.smp
@@ -0,0 +1 @@
+return (0 < 1) == 1;
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack9.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack9.smp
new file mode 100644
index 00000000..15979be6
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter24Test-testStack9.smp
@@ -0,0 +1,3 @@
+var stack9 = { int x ->
+ (x < 1) == 1;
+};
diff --git a/src/test/java/com/seaofnodes/simple/spill/MergeSortTest-testMergeSort0.smp b/src/test/java/com/seaofnodes/simple/spill/MergeSortTest-testMergeSort0.smp
new file mode 100644
index 00000000..e6478eeb
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/MergeSortTest-testMergeSort0.smp
@@ -0,0 +1,35 @@
+ val merge_sort = { int[] a ->
+ int[] !b = new int[a#];
+ copy_array (a, 0, a#, b);
+ split_merge(a, 0, a#, b);
+ };
+
+ val split_merge = { int[] b, int begin, int end, int[] a ->
+ if (end - begin <= 1)
+ return 0;
+ int middle = (end + begin) / 2;
+ split_merge(a, begin, middle, b);
+ split_merge(a, middle, end, b);
+ merge(b, begin, middle, end, a);
+ return 0;
+ };
+
+ val merge = { int[] b, int begin, int middle, int end, int[] a ->
+ int i = begin, j = middle;
+
+ for (int k = begin; k < end; k++) {
+ // && and ||
+ bool cond = false;
+ if (i < middle) {
+ if (j >= end) cond = true;
+ else if (a[i] <= a[j]) cond = true;
+ }
+ if (cond) b[k] = a[i++];
+ else b[k] = a[j++];
+ }
+ };
+
+ val copy_array = { int[] a, int begin, int end, int[] b ->
+ for (int k = begin; k < end; k++)
+ b[k] = a[k];
+ };
diff --git a/src/test/java/com/seaofnodes/simple/spill/README.ja.md b/src/test/java/com/seaofnodes/simple/spill/README.ja.md
new file mode 100644
index 00000000..5ae019dd
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/README.ja.md
@@ -0,0 +1,50 @@
+# 過去の割り当てコホート
+
+[English](README.md) | 日本語
+
+この文書は [Historical allocation cohorts](README.md) の日本語訳です。
+
+`cohorts.tsv` は、第24章の `SpillStats` で測定した212件のコンパイル項目を固定したものです。
+コホート20〜24の項目数は、それぞれ39、52、24、30、67です。
+ソースファイルは内容で重複を除き、最初に参照したテストの名前を付けています。
+マニフェストには、テストの識別情報、ターゲット、ABI、元の停止フェーズを保持しています。
+`Win64` は、第25章で使う ABI の表記 `win64` に変更しています。
+引数の型は i64、再実行のシードは全項目で123です。
+
+これらの入力は、この最終監査で新たな正しさの回帰テストを追加する前に、
+第24章のテストから取得しました。比較のための安定したコーパスです。
+変更する場合は、比較可能性が失われる理由を説明する必要があります。
+人工的なアロケータの回帰テストや命令の回帰テストでの割り当ては、これらのコホートには含めません。
+
+第25章では、以前のソースをすべて無変更で解析できるわけではありません。適応のための変更を明記します。
+
+- String、Scan、連結された S のコンストラクタでは、`new S { field=...; }` を、
+ 宣言されたコンストラクタとその引数に置き換えています。
+ レシーバーを明示するスキャナ関数は、操作を保ったままインスタンスメソッドにしています。
+- 保存した `Chapter21Test-testStringExport`、`Chapter21AllocTest-testString`、
+ `Chapter23AllocTest-testString` のソースは、必須の非 null フィールド `cs` を初期化するために、
+ `new String = { u8[] data -> cs=data; };` を宣言しています。
+ これによって10件の再実行項目(4件、3件、3件)を修正していますが、
+ 等価性・ハッシュの本体やマニフェストの構成項目は変えていません。
+ これらの適応済みソースが新しい比較基準です。以前のコンストラクタなしのフィクスチャと
+ 同一入力として、その集計値を比較することはできません。
+- 短絡評価の右辺で初期化する2つのループは、同等のガード付きブロックにしています。
+ 割り当て、副作用、最終結果を保持しています。
+- 単純な I/O のケースには、以前の `write` の束縛と表示用の補助関数を直接含めています。
+ Bubble Sort には、名前空間の接頭辞を平坦化し、コンストラクタを明示し、
+ 置換用バッファを可変にした、以前のライブラリの本体を含めています。
+ これにより、第25章で大幅に改訂した例に差し替えるのではなく、以前のワークロードを保持しています。
+- 元の Newton の浮動小数点数版2種類を含め、ほかのソース本文は保持しています。
+
+すべての項目を **RegAlloc まで**再実行し、スケジューリング済みのレジスタ制約を確認します。
+過去のフェーズの列は来歴情報であり、第25章で以前のネイティブ実行ハーネスを動かすことを約束するものではありません。
+適応済み Bubble Sort は、割り当ての比較可能性のために、過去の `i32 errno="C"` 宣言を保持しています。
+直接のデータ束縛は現在、3つのターゲットすべてでエンコードできますが、
+errno がスレッドローカルまたはアクセサ経由の libc とは、この宣言をリンクできません。
+現在のシステムライブラリのコードは、代わりに `libc.errno()` を使います。
+このコーパスを、過去のランタイムの実行カバレッジとして数えてはいけません。
+
+その後 `SpillStats` は、シード456で現在のシステムライブラリをエンコーディングまでコンパイルし、
+既存のシードとネイティブ検査を使って Chapter25Test を実行します。
+これらを合わせてコホート25とします。ライブラリまたはテストが失敗すると、レポートも失敗します。
+部分的な集計値では改善を示せません。現在のコンパイラの実行検証は、通常の章全体のテストスイートが担います。
diff --git a/src/test/java/com/seaofnodes/simple/spill/README.md b/src/test/java/com/seaofnodes/simple/spill/README.md
new file mode 100644
index 00000000..b5ab9d80
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/README.md
@@ -0,0 +1,78 @@
+# Historical allocation cohorts
+
+English | [日本語](README.ja.md)
+
+`cohorts.tsv` freezes 199 compilation entries matching Chapter 24's
+`SpillStats`: 39, 52, 26, 24, and 58 entries for cohorts 20-24. The source files
+are deduplicated by contents and named for their first referring test. The
+manifest preserves test identity, target, ABI, and the original stopping phase.
+`Win64` becomes `win64`, the Chapter 25 ABI spelling. Argument type is i64 and
+the replay seed is 123 throughout.
+
+The original 212 entries were captured from the Chapter 24 tests before the
+allocator audit's new correctness regressions. The 2026-10-07 refresh adds
+Chapter22Test.testNarrowCReturns on x86 SystemV and Win64, matching the two
+entries already measured in Chapters 22-24. The source is unchanged; only the
+manifest's ABI spelling changes. The [cross-chapter matrix](../../../../../../../../docs/regalloc-spills.md)
+checks matching test/CPU/ABI membership, including repeated compilations.
+The same refresh removes all 15 Jig entries: six from cohort 23 and nine from
+cohort 24. Jig methods are ignored scratch pads for debugging, not regression
+tests or allocation benchmarks. Their frozen source copies were removed too.
+These inputs are a stable comparison corpus; changing one
+requires explaining the resulting break in comparability. Synthetic allocator
+and instruction regressions do not contribute allocations to these cohorts.
+
+Chapter 25 cannot parse all earlier sources unchanged. Adaptations are explicit:
+
+- String, Scan, and linked S constructors replace `new S { field=...; }` with
+ declared constructors and arguments. The explicit-receiver scanner functions
+ become instance methods, preserving their operations.
+- The saved `Chapter21Test-testStringExport`, `Chapter21AllocTest-testString`,
+ and `Chapter23AllocTest-testString` sources declare
+ `new String = { u8[] data -> cs=data; };` to initialize the required non-null
+ `cs` field. This repairs ten replay entries (four, three, and three), without
+ changing their equality/hash bodies or manifest membership. These adapted
+ sources are a new comparison baseline; their totals cannot be compared as
+ identical inputs with the earlier constructor-free fixtures.
+- The two short-circuit RHS initializer loops become equivalent guarded blocks,
+ preserving allocation, side effects, and the final result. Their RHS assigns
+ the field value directly: Simple's `||` returns an operand, not a normalized
+ boolean. The 2026-10-07 cleanup removes an erroneous `!!` in those adaptations;
+ both fixtures return 44 for even arguments and 1 for odd arguments.
+- Simple I/O cases include the old `write` binding and print helper directly.
+ Bubble Sort includes the old library bodies, with namespace prefixes flattened,
+ explicit constructors, and mutable replacement buffers. This retains the old
+ workload instead of substituting Chapter 25's substantially revised example.
+- Local implementation names are private in eleven fixtures: the four Newton
+ variants that call their helper from the top level, Chapter 20's MergeSort,
+ String and Cast programs, and Chapter 22's three sign-extension programs and
+ InfiniteReturn. Their helpers/classes acquire an underscore prefix; operations,
+ inputs and final results are unchanged. This avoids exporting implementation
+ functions and allocation factories solely because Chapter 25 treats top-level
+ declarations as module members. Export/API fixtures, including NewtonExport,
+ StringExport, Person and the C-return wrappers, retain their public names.
+ These visibility adaptations change the generated workload and are recorded
+ separately from the allocator improvement in the cross-chapter comparison.
+- The remaining visibility cleanup makes local classes/functions private in
+ AntiDeps1, Infinite, the Chapter 21/23 allocation String cases, the Chapter 23
+ scanner/pointer/short-circuit/function cases, and Stack3/Stack5. Bubble Sort's
+ copied library implementation is private; its `main` stays public. The three
+ adapted String API fixtures end in `return 0;`, avoiding an accidental return
+ of the last declared function. Their equality/hash APIs stay public, and the
+ named StringExport fixture also keeps its public String factory. No cohort
+ entries, workload operations, or intentional export APIs are removed.
+- Other source texts are retained.
+
+All entries replay **through RegAlloc**, checking scheduled register constraints.
+The historical phase column is provenance, not a promise to run those old native
+harnesses in Chapter 25. The adapted Bubble Sort retains its historical
+`i32 errno="C"` declaration for allocation comparability. Direct data bindings
+now encode on all three targets, but this declaration cannot link to a libc
+whose errno is thread-local or accessor-based. Current system-library code uses
+`libc.errno()` instead. Do not count this corpus as historical runtime coverage.
+
+`SpillStats` then compiles the current system library through encoding at seed
+456, and runs Chapter25Test with its existing seeds and native checks. Together
+these form cohort 25. A library or test failure makes the report fail; partial
+totals cannot establish an improvement. The ordinary full chapter suite remains
+the execution validation for the current compiler.
diff --git a/src/test/java/com/seaofnodes/simple/spill/cohorts.tsv b/src/test/java/com/seaofnodes/simple/spill/cohorts.tsv
new file mode 100644
index 00000000..83b19d2a
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/cohorts.tsv
@@ -0,0 +1,200 @@
+# cohort test cpu abi original phase source
+Chapter20 Chapter20Test.testMergeSort x86_64_v2 SystemV RegAlloc Chapter20Test-testMergeSort.smp
+Chapter20 Chapter20Test.testMergeSort riscv SystemV RegAlloc Chapter20Test-testMergeSort.smp
+Chapter20 Chapter20Test.testMergeSort arm SystemV RegAlloc Chapter20Test-testMergeSort.smp
+Chapter20 Chapter20Test.testNewtonInteger x86_64_v2 SystemV RegAlloc Chapter20Test-testNewtonInteger.smp
+Chapter20 Chapter20Test.testNewtonInteger riscv SystemV RegAlloc Chapter20Test-testNewtonInteger.smp
+Chapter20 Chapter20Test.testNewtonInteger arm SystemV RegAlloc Chapter20Test-testNewtonInteger.smp
+Chapter20 Chapter20Test.testCast x86_64_v2 SystemV RegAlloc Chapter20Test-testCast.smp
+Chapter20 Chapter20Test.testCast riscv SystemV RegAlloc Chapter20Test-testCast.smp
+Chapter20 Chapter20Test.testCast arm SystemV RegAlloc Chapter20Test-testCast.smp
+Chapter20 Chapter20Test.testNewtonFloat x86_64_v2 SystemV RegAlloc Chapter20Test-testNewtonFloat.smp
+Chapter20 Chapter20Test.testNewtonFloat riscv SystemV RegAlloc Chapter20Test-testNewtonFloat.smp
+Chapter20 Chapter20Test.testNewtonFloat arm SystemV RegAlloc Chapter20Test-testNewtonFloat.smp
+Chapter20 Chapter20Test.testBrainfuck x86_64_v2 SystemV RegAlloc Chapter20Test-testBrainfuck.smp
+Chapter20 Chapter20Test.testBrainfuck riscv SystemV RegAlloc Chapter20Test-testBrainfuck.smp
+Chapter20 Chapter20Test.testBrainfuck arm SystemV RegAlloc Chapter20Test-testBrainfuck.smp
+Chapter20 Chapter20Test.testAlloc0 x86_64_v2 SystemV RegAlloc Chapter20Test-testAlloc0.smp
+Chapter20 Chapter20Test.testAlloc0 riscv SystemV RegAlloc Chapter20Test-testAlloc0.smp
+Chapter20 Chapter20Test.testAlloc0 arm SystemV RegAlloc Chapter20Test-testAlloc0.smp
+Chapter20 Chapter20Test.testAlloc2 x86_64_v2 SystemV RegAlloc Chapter20Test-testAlloc2.smp
+Chapter20 Chapter20Test.testAlloc2 riscv SystemV RegAlloc Chapter20Test-testAlloc2.smp
+Chapter20 Chapter20Test.testAlloc2 arm SystemV RegAlloc Chapter20Test-testAlloc2.smp
+Chapter20 Chapter20Test.testArray1 x86_64_v2 SystemV RegAlloc Chapter20Test-testArray1.smp
+Chapter20 Chapter20Test.testArray1 riscv SystemV RegAlloc Chapter20Test-testArray1.smp
+Chapter20 Chapter20Test.testArray1 arm SystemV RegAlloc Chapter20Test-testArray1.smp
+Chapter20 Chapter20Test.testBasic1 x86_64_v2 SystemV RegAlloc Chapter20Test-testBasic1.smp
+Chapter20 Chapter20Test.testBasic1 riscv SystemV RegAlloc Chapter20Test-testBasic1.smp
+Chapter20 Chapter20Test.testBasic1 arm SystemV RegAlloc Chapter20Test-testBasic1.smp
+Chapter20 Chapter20Test.testFlags1 x86_64_v2 SystemV RegAlloc Chapter20Test-testFlags1.smp
+Chapter20 Chapter20Test.testFlags1 riscv SystemV RegAlloc Chapter20Test-testFlags1.smp
+Chapter20 Chapter20Test.testFlags1 arm SystemV RegAlloc Chapter20Test-testFlags1.smp
+Chapter20 Chapter20Test.testFlags2 x86_64_v2 SystemV RegAlloc Chapter20Test-testFlags2.smp
+Chapter20 Chapter20Test.testFlags2 riscv SystemV RegAlloc Chapter20Test-testFlags2.smp
+Chapter20 Chapter20Test.testFlags2 arm SystemV RegAlloc Chapter20Test-testFlags2.smp
+Chapter20 Chapter20Test.testFltArg x86_64_v2 SystemV RegAlloc Chapter20Test-testFltArg.smp
+Chapter20 Chapter20Test.testFltArg riscv SystemV RegAlloc Chapter20Test-testFltArg.smp
+Chapter20 Chapter20Test.testFltArg arm SystemV RegAlloc Chapter20Test-testFltArg.smp
+Chapter20 Chapter20Test.testString x86_64_v2 SystemV RegAlloc Chapter20Test-testString.smp
+Chapter20 Chapter20Test.testString riscv SystemV RegAlloc Chapter20Test-testString.smp
+Chapter20 Chapter20Test.testString arm SystemV RegAlloc Chapter20Test-testString.smp
+Chapter21 Chapter21Test.testFibExport x86_64_v2 win64 Export Chapter21Test-testFibExport.smp
+Chapter21 Chapter21Test.testFibExport riscv SystemV Export Chapter21Test-testFibExport.smp
+Chapter21 Chapter21Test.testFibExport arm SystemV Export Chapter21Test-testFibExport.smp
+Chapter21 Chapter21Test.testAntiDeps1 x86_64_v2 SystemV Encoding Chapter21Test-testAntiDeps1.smp
+Chapter21 Chapter21Test.testAntiDeps1 riscv SystemV Encoding Chapter21Test-testAntiDeps1.smp
+Chapter21 Chapter21Test.testAntiDeps1 arm SystemV Encoding Chapter21Test-testAntiDeps1.smp
+Chapter21 Chapter21Test.testLoop2 x86_64_v2 win64 Encoding Chapter21Test-testLoop2.smp
+Chapter21 Chapter21Test.testLoop2 riscv SystemV Encoding Chapter21Test-testLoop2.smp
+Chapter21 Chapter21Test.testLoop2 arm SystemV Encoding Chapter21Test-testLoop2.smp
+Chapter21 Chapter21Test.testSieve x86_64_v2 win64 Export Chapter21Test-testSieve.smp
+Chapter21 Chapter21Test.testSieve riscv SystemV Export Chapter21Test-testSieve.smp
+Chapter21 Chapter21Test.testSieve arm SystemV Export Chapter21Test-testSieve.smp
+Chapter21 Chapter21Test.testArgCount x86_64_v2 win64 Export Chapter21Test-testArgCount.smp
+Chapter21 Chapter21Test.testArgCount riscv SystemV Export Chapter21Test-testArgCount-2.smp
+Chapter21 Chapter21Test.testArgCount arm SystemV Export Chapter21Test-testArgCount-2.smp
+Chapter21 Chapter21Test.testStringExport x86_64_v2 win64 Export Chapter21Test-testStringExport.smp
+Chapter21 Chapter21Test.testInfinite x86_64_v2 SystemV Encoding Chapter21Test-testInfinite.smp
+Chapter21 Chapter21Test.testInfinite riscv SystemV Encoding Chapter21Test-testInfinite.smp
+Chapter21 Chapter21Test.testInfinite arm SystemV Encoding Chapter21Test-testInfinite.smp
+Chapter21 Chapter21Test.testArray1 x86_64_v2 SystemV Encoding Chapter20Test-testArray1.smp
+Chapter21 Chapter21Test.testArray1 riscv SystemV Encoding Chapter20Test-testArray1.smp
+Chapter21 Chapter21Test.testArray1 arm SystemV Encoding Chapter20Test-testArray1.smp
+Chapter21 Chapter21Test.testBasic1 x86_64_v2 SystemV Encoding Chapter20Test-testBasic1.smp
+Chapter21 Chapter21Test.testBasic1 riscv SystemV Encoding Chapter20Test-testBasic1.smp
+Chapter21 Chapter21Test.testBasic1 arm SystemV Encoding Chapter20Test-testBasic1.smp
+Chapter21 Chapter21Test.testNewtonExport x86_64_v2 win64 Export Chapter21Test-testNewtonExport.smp
+Chapter21 Chapter21Test.testNewtonExport riscv SystemV Export Chapter21Test-testNewtonExport.smp
+Chapter21 Chapter21Test.testNewtonExport arm SystemV Export Chapter21Test-testNewtonExport.smp
+Chapter21 Chapter21Test.testPerson x86_64_v2 win64 Export Chapter21Test-testPerson.smp
+Chapter21 Chapter21Test.testPerson riscv SystemV Export Chapter21Test-testPerson.smp
+Chapter21 Chapter21Test.testPerson arm SystemV Export Chapter21Test-testPerson.smp
+Chapter21 Chapter21Test.testString x86_64_v2 SystemV Encoding Chapter21Test-testStringExport.smp
+Chapter21 Chapter21Test.testString riscv SystemV Encoding Chapter21Test-testStringExport.smp
+Chapter21 Chapter21Test.testString arm SystemV Encoding Chapter21Test-testStringExport.smp
+Chapter21 Chapter21AllocTest.testNewtonInteger x86_64_v2 win64 Encoding Chapter20Test-testNewtonInteger.smp
+Chapter21 Chapter21AllocTest.testNewtonInteger riscv SystemV Encoding Chapter20Test-testNewtonInteger.smp
+Chapter21 Chapter21AllocTest.testNewtonInteger arm SystemV Encoding Chapter20Test-testNewtonInteger.smp
+Chapter21 Chapter21AllocTest.testNewtonFloat x86_64_v2 SystemV Encoding Chapter21AllocTest-testNewtonFloat.smp
+Chapter21 Chapter21AllocTest.testNewtonFloat riscv SystemV Encoding Chapter21AllocTest-testNewtonFloat.smp
+Chapter21 Chapter21AllocTest.testNewtonFloat arm SystemV Encoding Chapter21AllocTest-testNewtonFloat.smp
+Chapter21 Chapter21AllocTest.testArray1 x86_64_v2 SystemV Encoding Chapter21AllocTest-testArray1.smp
+Chapter21 Chapter21AllocTest.testArray1 riscv SystemV Encoding Chapter21AllocTest-testArray1.smp
+Chapter21 Chapter21AllocTest.testArray1 arm SystemV Encoding Chapter21AllocTest-testArray1.smp
+Chapter21 Chapter21AllocTest.testString x86_64_v2 SystemV Encoding Chapter21AllocTest-testString.smp
+Chapter21 Chapter21AllocTest.testString riscv SystemV Encoding Chapter21AllocTest-testString.smp
+Chapter21 Chapter21AllocTest.testString arm SystemV Encoding Chapter21AllocTest-testString.smp
+Chapter22 Chapter22Test.testSextFail x86_64_v2 win64 Encoding Chapter22Test-testSextFail.smp
+Chapter22 Chapter22Test.testSextFail riscv SystemV Encoding Chapter22Test-testSextFail.smp
+Chapter22 Chapter22Test.testSextFail arm SystemV Encoding Chapter22Test-testSextFail.smp
+Chapter22 Chapter22Test.testSextFail riscv SystemV Export Chapter22Test-testSextFail.smp
+Chapter22 Chapter22Test.testSextFail arm SystemV Export Chapter22Test-testSextFail.smp
+Chapter22 Chapter22Test.testSextSuccess riscv SystemV Export Chapter22Test-testSextSuccess.smp
+Chapter22 Chapter22Test.testSextSuccess arm SystemV Export Chapter22Test-testSextSuccess.smp
+Chapter22 Chapter22Test.testSextSuccess x86_64_v2 win64 Encoding Chapter22Test-testSextSuccess.smp
+Chapter22 Chapter22Test.testSextSuccess riscv SystemV Encoding Chapter22Test-testSextSuccess.smp
+Chapter22 Chapter22Test.testSextSuccess arm SystemV Encoding Chapter22Test-testSextSuccess.smp
+Chapter22 Chapter22Test.testInfiniteReturn x86_64_v2 SystemV Encoding Chapter22Test-testInfiniteReturn.smp
+Chapter22 Chapter22Test.testInfiniteReturn riscv SystemV Encoding Chapter22Test-testInfiniteReturn.smp
+Chapter22 Chapter22Test.testInfiniteReturn arm SystemV Encoding Chapter22Test-testInfiniteReturn.smp
+Chapter22 Chapter22Test.testSextFail2 riscv SystemV Export Chapter22Test-testSextFail2.smp
+Chapter22 Chapter22Test.testSextFail2 arm SystemV Export Chapter22Test-testSextFail2.smp
+Chapter22 Chapter22Test.testSextFail2 x86_64_v2 win64 Encoding Chapter22Test-testSextFail2.smp
+Chapter22 Chapter22Test.testSextFail2 riscv SystemV Encoding Chapter22Test-testSextFail2.smp
+Chapter22 Chapter22Test.testSextFail2 arm SystemV Encoding Chapter22Test-testSextFail2.smp
+Chapter22 Chapter22Test.testPerson x86_64_v2 win64 Export Chapter22Test-testPerson.smp
+Chapter22 Chapter22Test.testPerson riscv SystemV Export Chapter22Test-testPerson.smp
+Chapter22 Chapter22Test.testPerson arm SystemV Export Chapter22Test-testPerson.smp
+Chapter22 Chapter22Test.testHelloWorld x86_64_v2 win64 Export Chapter22Test-testHelloWorld.smp
+Chapter22 Chapter22Test.testHelloWorld riscv SystemV Export Chapter22Test-testHelloWorld.smp
+Chapter22 Chapter22Test.testHelloWorld arm SystemV Export Chapter22Test-testHelloWorld.smp
+Chapter23 Chapter23Test.testAnd x86_64_v2 win64 Export Chapter23Test-testAnd.smp
+Chapter23 Chapter23Test.testAnd riscv SystemV Export Chapter23Test-testAnd.smp
+Chapter23 Chapter23Test.testAnd arm SystemV Export Chapter23Test-testAnd.smp
+Chapter23 Chapter23Test.testOr x86_64_v2 win64 Export Chapter23Test-testOr.smp
+Chapter23 Chapter23Test.testOr riscv SystemV Export Chapter23Test-testOr.smp
+Chapter23 Chapter23Test.testOr arm SystemV Export Chapter23Test-testOr.smp
+Chapter23 Chapter23Test.testCondSideEffAnd x86_64_v2 win64 Export Chapter23Test-testCondSideEffAnd.smp
+Chapter23 Chapter23Test.testCondSideEffAnd riscv SystemV Export Chapter23Test-testCondSideEffAnd.smp
+Chapter23 Chapter23Test.testCondSideEffAnd arm SystemV Export Chapter23Test-testCondSideEffAnd.smp
+Chapter23 Chapter23Test.testFRefFields x86_64_v2 win64 Encoding Chapter23Test-testFRefFields.smp
+Chapter23 Chapter23Test.testAndPtr riscv SystemV Export Chapter23Test-testAndPtr.smp
+Chapter23 Chapter23Test.testAndPtr arm SystemV Export Chapter23Test-testAndPtr.smp
+Chapter23 Chapter23Test.testOrRhsLoopLocal riscv SystemV Export Chapter23Test-testOrRhsLoopLocal.smp
+Chapter23 Chapter23Test.testMethod x86_64_v2 win64 Encoding Chapter23Test-testMethod.smp
+Chapter23 Chapter23Test.testOrRhsLoopMemory riscv SystemV Export Chapter23Test-testOrRhsLoopMemory.smp
+Chapter23 Chapter23Test.testCondSideEffOr x86_64_v2 win64 Export Chapter23Test-testCondSideEffOr.smp
+Chapter23 Chapter23Test.testCondSideEffOr riscv SystemV Export Chapter23Test-testCondSideEffOr.smp
+Chapter23 Chapter23Test.testCondSideEffOr arm SystemV Export Chapter23Test-testCondSideEffOr.smp
+Chapter23 Chapter23Test.testFuncCall x86_64_v2 win64 Export Chapter23Test-testFuncCall.smp
+Chapter23 Chapter23Test.testFuncCall riscv SystemV Export Chapter23Test-testFuncCall.smp
+Chapter23 Chapter23Test.testFuncCall arm SystemV Export Chapter23Test-testFuncCall.smp
+Chapter23 Chapter23AllocTest.testString x86_64_v2 SystemV Encoding Chapter23AllocTest-testString.smp
+Chapter23 Chapter23AllocTest.testString riscv SystemV Encoding Chapter23AllocTest-testString.smp
+Chapter23 Chapter23AllocTest.testString arm SystemV Encoding Chapter23AllocTest-testString.smp
+Chapter24 Chapter24Test.testAnd x86_64_v2 win64 Export Chapter23Test-testAnd.smp
+Chapter24 Chapter24Test.testAnd riscv SystemV Export Chapter23Test-testAnd.smp
+Chapter24 Chapter24Test.testAnd arm SystemV Export Chapter23Test-testAnd.smp
+Chapter24 Chapter24Test.testOr x86_64_v2 win64 Export Chapter23Test-testOr.smp
+Chapter24 Chapter24Test.testOr riscv SystemV Export Chapter23Test-testOr.smp
+Chapter24 Chapter24Test.testOr arm SystemV Export Chapter23Test-testOr.smp
+Chapter24 Chapter24Test.testCondSideEffAnd x86_64_v2 win64 Export Chapter23Test-testCondSideEffAnd.smp
+Chapter24 Chapter24Test.testCondSideEffAnd riscv SystemV Export Chapter23Test-testCondSideEffAnd.smp
+Chapter24 Chapter24Test.testCondSideEffAnd arm SystemV Export Chapter23Test-testCondSideEffAnd.smp
+Chapter24 Chapter24Test.testFRefFields x86_64_v2 win64 Encoding Chapter23Test-testFRefFields.smp
+Chapter24 Chapter24Test.testAndPtr riscv SystemV Export Chapter23Test-testAndPtr.smp
+Chapter24 Chapter24Test.testAndPtr arm SystemV Export Chapter23Test-testAndPtr.smp
+Chapter24 Chapter24Test.testMethod x86_64_v2 win64 Encoding Chapter23Test-testMethod.smp
+Chapter24 Chapter24Test.testStack1 x86_64_v2 win64 Export Chapter24Test-testStack1.smp
+Chapter24 Chapter24Test.testStack1 riscv SystemV Export Chapter24Test-testStack1.smp
+Chapter24 Chapter24Test.testStack1 arm SystemV Export Chapter24Test-testStack1.smp
+Chapter24 Chapter24Test.testStack2 x86_64_v2 win64 Export Chapter24Test-testStack2.smp
+Chapter24 Chapter24Test.testStack2 riscv SystemV Export Chapter24Test-testStack2.smp
+Chapter24 Chapter24Test.testStack2 arm SystemV Export Chapter24Test-testStack2.smp
+Chapter24 Chapter24Test.testStack3 x86_64_v2 win64 Export Chapter24Test-testStack3.smp
+Chapter24 Chapter24Test.testStack3 riscv SystemV Export Chapter24Test-testStack3.smp
+Chapter24 Chapter24Test.testStack3 arm SystemV Export Chapter24Test-testStack3.smp
+Chapter24 Chapter24Test.testStack4 x86_64_v2 win64 Export Chapter24Test-testStack4.smp
+Chapter24 Chapter24Test.testStack4 riscv SystemV Export Chapter24Test-testStack4.smp
+Chapter24 Chapter24Test.testStack4 arm SystemV Export Chapter24Test-testStack4.smp
+Chapter24 Chapter24Test.testStack5 x86_64_v2 win64 Export Chapter24Test-testStack5.smp
+Chapter24 Chapter24Test.testStack5 riscv SystemV Export Chapter24Test-testStack5.smp
+Chapter24 Chapter24Test.testStack5 arm SystemV Export Chapter24Test-testStack5.smp
+Chapter24 Chapter24Test.testStack9 x86_64_v2 win64 Export Chapter24Test-testStack9.smp
+Chapter24 Chapter24Test.testStack9 riscv SystemV Export Chapter24Test-testStack9-2.smp
+Chapter24 Chapter24Test.testStack9 arm SystemV Export Chapter24Test-testStack9-2.smp
+Chapter24 Chapter24Test.testCondSideEffOr x86_64_v2 win64 Export Chapter23Test-testCondSideEffOr.smp
+Chapter24 Chapter24Test.testCondSideEffOr riscv SystemV Export Chapter23Test-testCondSideEffOr.smp
+Chapter24 Chapter24Test.testCondSideEffOr arm SystemV Export Chapter23Test-testCondSideEffOr.smp
+Chapter24 Chapter24Test.testStack10 x86_64_v2 win64 Export Chapter24Test-testStack10.smp
+Chapter24 Chapter24Test.testStack10 riscv SystemV Export Chapter24Test-testStack10-2.smp
+Chapter24 Chapter24Test.testStack10 arm SystemV Export Chapter24Test-testStack10-2.smp
+Chapter24 Chapter24Test.testStack11 x86_64_v2 win64 Export Chapter24Test-testStack11.smp
+Chapter24 Chapter24Test.testStack11 riscv SystemV Export Chapter24Test-testStack11-2.smp
+Chapter24 Chapter24Test.testStack11 arm SystemV Export Chapter24Test-testStack11-2.smp
+Chapter24 Chapter24Test.testStack12 x86_64_v2 win64 Export Chapter24Test-testStack12.smp
+Chapter24 Chapter24Test.testStack12 riscv SystemV Export Chapter24Test-testStack12-2.smp
+Chapter24 Chapter24Test.testStack12 arm SystemV Export Chapter24Test-testStack12-2.smp
+Chapter24 Chapter24Test.testStack13 x86_64_v2 win64 Export Chapter24Test-testStack13.smp
+Chapter24 Chapter24Test.testStack13 riscv SystemV Export Chapter24Test-testStack13-2.smp
+Chapter24 Chapter24Test.testStack13 arm SystemV Export Chapter24Test-testStack13-2.smp
+Chapter24 Chapter24Test.testFuncCall x86_64_v2 win64 Export Chapter23Test-testFuncCall.smp
+Chapter24 Chapter24Test.testFuncCall riscv SystemV Export Chapter23Test-testFuncCall.smp
+Chapter24 Chapter24Test.testFuncCall arm SystemV Export Chapter23Test-testFuncCall.smp
+Chapter24 Chapter24AllocTest.testNewtonInteger x86_64_v2 win64 Encoding Chapter24AllocTest-testNewtonInteger.smp
+Chapter24 Chapter24AllocTest.testNewtonInteger riscv SystemV Encoding Chapter24AllocTest-testNewtonInteger.smp
+Chapter24 Chapter24AllocTest.testNewtonInteger arm SystemV Encoding Chapter24AllocTest-testNewtonInteger.smp
+Chapter24 Chapter24AllocTest.testStackArguments x86_64_v2 win64 Export Chapter24AllocTest-testStackArguments.smp
+Chapter24 Chapter24AllocTest.testStackArguments riscv SystemV Export Chapter24AllocTest-testStackArguments.smp
+Chapter24 Chapter24AllocTest.testStackArguments arm SystemV Export Chapter24AllocTest-testStackArguments.smp
+Chapter24 Chapter24AllocTest.testBubbleSort x86_64_v2 win64 Encoding Chapter24AllocTest-testBubbleSort.smp
+Chapter24 Chapter24AllocTest.testBubbleSort riscv SystemV Encoding Chapter24AllocTest-testBubbleSort.smp
+Chapter24 Chapter24AllocTest.testBubbleSort arm SystemV Encoding Chapter24AllocTest-testBubbleSort.smp
+Chapter21 BrainFuckTest.testBrainFuck x86_64_v2 win64 Export BrainFuckTest-testBrainFuck.smp
+Chapter21 BrainFuckTest.testBrainFuck riscv SystemV Export BrainFuckTest-testBrainFuck.smp
+Chapter21 BrainFuckTest.testBrainFuck arm SystemV Export BrainFuckTest-testBrainFuck.smp
+Chapter21 MergeSortTest.testMergeSort0 x86_64_v2 win64 Export MergeSortTest-testMergeSort0.smp
+Chapter21 MergeSortTest.testMergeSort0 riscv SystemV Export MergeSortTest-testMergeSort0.smp
+Chapter21 MergeSortTest.testMergeSort0 arm SystemV Encoding MergeSortTest-testMergeSort0.smp
+Chapter22 Chapter22Test.testNarrowCReturns x86_64_v2 SystemV Export Chapter22Test-testNarrowCReturns.smp
+Chapter22 Chapter22Test.testNarrowCReturns x86_64_v2 win64 Export Chapter22Test-testNarrowCReturns.smp