summaryrefslogtreecommitdiff
path: root/chapter22/src/test/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'chapter22/src/test/java/com')
-rw-r--r--chapter22/src/test/java/com/seaofnodes/simple/Chapter22Test.java1
-rw-r--r--chapter22/src/test/java/com/seaofnodes/simple/Eval2.java3
-rw-r--r--chapter22/src/test/java/com/seaofnodes/simple/fuzzer/ScriptGenerator.java2
-rw-r--r--chapter22/src/test/java/com/seaofnodes/simple/progs/helloWorld.smp2
4 files changed, 5 insertions, 3 deletions
diff --git a/chapter22/src/test/java/com/seaofnodes/simple/Chapter22Test.java b/chapter22/src/test/java/com/seaofnodes/simple/Chapter22Test.java
index 106932f5..dccf00bc 100644
--- a/chapter22/src/test/java/com/seaofnodes/simple/Chapter22Test.java
+++ b/chapter22/src/test/java/com/seaofnodes/simple/Chapter22Test.java
@@ -28,7 +28,6 @@ public class Chapter22Test {
assertEquals(stop, code._stop.toString());
}
-
@Test
public void testCoRecur() {
String src = """
diff --git a/chapter22/src/test/java/com/seaofnodes/simple/Eval2.java b/chapter22/src/test/java/com/seaofnodes/simple/Eval2.java
index ecea97dd..38da6898 100644
--- a/chapter22/src/test/java/com/seaofnodes/simple/Eval2.java
+++ b/chapter22/src/test/java/com/seaofnodes/simple/Eval2.java
@@ -407,7 +407,8 @@ public abstract class Eval2 {
// Since never can close the type cycle, without cyclic types, have
// to handle FRefs even here
if( tmp.isFRef() )
- tmp = tmp.makeFrom(((TypeMemPtr)Parser.TYPES.get(tmp._obj._name))._obj);
+ //tmp = tmp.makeFrom(((TypeMemPtr)Parser.TYPES.get(tmp._obj._name))._obj);
+ throw Utils.TODO();
Object[] xs = (Object[])x; // Array of fields
if( tmp._obj.isAry() ) {
diff --git a/chapter22/src/test/java/com/seaofnodes/simple/fuzzer/ScriptGenerator.java b/chapter22/src/test/java/com/seaofnodes/simple/fuzzer/ScriptGenerator.java
index f119fa1a..c9f7d801 100644
--- a/chapter22/src/test/java/com/seaofnodes/simple/fuzzer/ScriptGenerator.java
+++ b/chapter22/src/test/java/com/seaofnodes/simple/fuzzer/ScriptGenerator.java
@@ -97,7 +97,7 @@ public class ScriptGenerator {
private static final List<TypeInt> INTTYPES = new ArrayList<>();
static {
- for( var e : Parser.defaultTypes().entrySet() ) {
+ for( var e : Parser.PRIMS.entrySet() ) {
if( e.getValue() instanceof TypeInteger ) {
INTTYPES.add(new TypeInt(e.getKey()));
}
diff --git a/chapter22/src/test/java/com/seaofnodes/simple/progs/helloWorld.smp b/chapter22/src/test/java/com/seaofnodes/simple/progs/helloWorld.smp
new file mode 100644
index 00000000..0234aa73
--- /dev/null
+++ b/chapter22/src/test/java/com/seaofnodes/simple/progs/helloWorld.smp
@@ -0,0 +1,2 @@
+// -*- mode: java; -*-
+sys.libc.write(1,"Hello, World!\n",14);