summaryrefslogtreecommitdiff
path: root/chapter15/src
diff options
context:
space:
mode:
Diffstat (limited to 'chapter15/src')
-rw-r--r--chapter15/src/main/java/com/seaofnodes/simple/node/LoadNode.java2
-rw-r--r--chapter15/src/main/java/com/seaofnodes/simple/node/PhiNode.java4
2 files changed, 3 insertions, 3 deletions
diff --git a/chapter15/src/main/java/com/seaofnodes/simple/node/LoadNode.java b/chapter15/src/main/java/com/seaofnodes/simple/node/LoadNode.java
index 28aee489..762d8bea 100644
--- a/chapter15/src/main/java/com/seaofnodes/simple/node/LoadNode.java
+++ b/chapter15/src/main/java/com/seaofnodes/simple/node/LoadNode.java
@@ -26,7 +26,7 @@ public class LoadNode extends MemOpNode {
}
// GraphVis DOT code and debugger labels
- @Override public String label() { return "st_"+mlabel(); }
+ @Override public String label() { return "ld_"+mlabel(); }
// GraphVis node-internal labels
@Override public String glabel() { return _name.equals("[]=") ? "[]=" : "." +_name+"="; }
diff --git a/chapter15/src/main/java/com/seaofnodes/simple/node/PhiNode.java b/chapter15/src/main/java/com/seaofnodes/simple/node/PhiNode.java
index 0b5abc6c..a4fa8e1a 100644
--- a/chapter15/src/main/java/com/seaofnodes/simple/node/PhiNode.java
+++ b/chapter15/src/main/java/com/seaofnodes/simple/node/PhiNode.java
@@ -101,9 +101,9 @@ public class PhiNode extends Node {
if( in(2)._type == in(2)._type.makeInit() ) nullx = 2;
if( nullx != -1 ) {
Node val = in(3-nullx);
- if( region().idom(this) instanceof IfNode iff && iff.pred().addDep(this)==val ) {
+ if( r.idom(this) instanceof IfNode iff && iff.pred().addDep(this)==val ) {
// Must walk the idom on the null side to make sure we hit False.
- CFGNode idom = (CFGNode)region().in(nullx);
+ CFGNode idom = (CFGNode)r.in(nullx);
while( idom.nIns() > 0 && idom.in(0) != iff ) idom = idom.idom();
if( idom instanceof CProjNode proj && proj._idx==1 )
return val;