diff options
Diffstat (limited to 'chapter07')
| -rw-r--r-- | chapter07/src/main/java/com/seaofnodes/simple/node/BoolNode.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/chapter07/src/main/java/com/seaofnodes/simple/node/BoolNode.java b/chapter07/src/main/java/com/seaofnodes/simple/node/BoolNode.java index 0c32d50d..5948a1d3 100644 --- a/chapter07/src/main/java/com/seaofnodes/simple/node/BoolNode.java +++ b/chapter07/src/main/java/com/seaofnodes/simple/node/BoolNode.java @@ -45,9 +45,10 @@ abstract public class BoolNode extends Node { if( in(1)==in(2) ) return new ConstantNode(TypeInteger.constant(doOp(3,3)?1:0)); - // Do we have ((x * (phi cons)) * con) ? - // Do we have ((x * (phi cons)) * (phi cons)) ? - // Push constant up through the phi: x * (phi con0*con0 con1*con1...) + // Do we have ((phi cons) cmp con) ? + // Do we have ((phi cons) cmp (phi cons)) ? + // Push the compare up through the phi: (phi con0 cmp con, con1 cmp con...) + // No rotate: compares are not associative. Node phicon = AddNode.phiCon(this,false); if( phicon!=null ) return phicon; |
