summaryrefslogtreecommitdiff
path: root/chapter28b/src/test/java/com/seaofnodes
diff options
context:
space:
mode:
Diffstat (limited to 'chapter28b/src/test/java/com/seaofnodes')
-rw-r--r--chapter28b/src/test/java/com/seaofnodes/simple/Eval2.java5
-rw-r--r--chapter28b/src/test/java/com/seaofnodes/simple/PhaseTest.java4
-rw-r--r--chapter28b/src/test/java/com/seaofnodes/simple/SeparateCompilationTest.java3
3 files changed, 6 insertions, 6 deletions
diff --git a/chapter28b/src/test/java/com/seaofnodes/simple/Eval2.java b/chapter28b/src/test/java/com/seaofnodes/simple/Eval2.java
index fc87c13a..eea5b023 100644
--- a/chapter28b/src/test/java/com/seaofnodes/simple/Eval2.java
+++ b/chapter28b/src/test/java/com/seaofnodes/simple/Eval2.java
@@ -118,9 +118,8 @@ public abstract class Eval2 {
SB trace = null; // new SB(); // TRACE, set to null for off, new SB() for on
// Set global, so don't have to pass everywhere
CODE = code;
- // Eval uses checked ideal IR, including CLInit, and does not run Lower.
- // Objects loaded later are scheduled independently of this graph.
- if( code._phase.ordinal()<CodeGen.Phase.Schedule.ordinal() ) code.scheduleForEval();
+ // The normal driver schedules ideal IR without Lower or instruction
+ // selection. Objects loaded later are scheduled independently.
code.driver(CodeGen.Phase.LocalSched);
CLASSES.clear();
diff --git a/chapter28b/src/test/java/com/seaofnodes/simple/PhaseTest.java b/chapter28b/src/test/java/com/seaofnodes/simple/PhaseTest.java
index 7252378a..ee262d6c 100644
--- a/chapter28b/src/test/java/com/seaofnodes/simple/PhaseTest.java
+++ b/chapter28b/src/test/java/com/seaofnodes/simple/PhaseTest.java
@@ -21,12 +21,12 @@ public class PhaseTest {
};
code.driver(Phase.TypeCheck);
code.driver(Phase.TypeCheck); // A repeated request does not rerun anything.
+ assertEquals("45",Eval2.eval(code,10));
code.driver(Phase.LocalSched);
- assertEquals("Parse Iter Opto IterPostOpto FinalizeIR TypeCheck Lower LoopTree Unlink Schedule LocalSched",
+ assertEquals("Parse Iter Opto IterPostOpto FinalizeIR TypeCheck LoopTree Unlink Schedule LocalSched",
String.join(" ",phases));
assertNull(code._serial);
assertNull(code._mach);
- assertEquals("45",Eval2.eval(code,10));
}
@Test public void testEncodingWithoutSerialization() {
diff --git a/chapter28b/src/test/java/com/seaofnodes/simple/SeparateCompilationTest.java b/chapter28b/src/test/java/com/seaofnodes/simple/SeparateCompilationTest.java
index 4e8a0417..cfc0b7e0 100644
--- a/chapter28b/src/test/java/com/seaofnodes/simple/SeparateCompilationTest.java
+++ b/chapter28b/src/test/java/com/seaofnodes/simple/SeparateCompilationTest.java
@@ -30,7 +30,8 @@ public class SeparateCompilationTest {
CodeGen code=new CodeGen(null,null,new Ary<>(new String[]{lib.toString()}),
"Client","return Callbacks.run(arg);",123,true,TypeInteger.BOT)
.driver(CodeGen.Phase.Opto);
- code.loadAllIR(); // This assertion inspects a body, not just its saved summary.
+ // This assertion inspects a body, not just its saved summary.
+ ParseAll.loadCompUnit(code,code._compunits.get("Callbacks"));
assertNull(code._compunits.get("Callbacks")._src);
ParmNode base=code._start.walk(n -> n instanceof ParmNode p && p._label.equals("base") ? p : null);
assertNotNull(base);