summaryrefslogtreecommitdiff
path: root/chapter04/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'chapter04/src/main')
-rw-r--r--chapter04/src/main/java/com/seaofnodes/simple/node/AddNode.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/chapter04/src/main/java/com/seaofnodes/simple/node/AddNode.java b/chapter04/src/main/java/com/seaofnodes/simple/node/AddNode.java
index 5720aca4..7e08a207 100644
--- a/chapter04/src/main/java/com/seaofnodes/simple/node/AddNode.java
+++ b/chapter04/src/main/java/com/seaofnodes/simple/node/AddNode.java
@@ -63,7 +63,7 @@ public class AddNode extends Node {
// Now we might see (add add non) or (add non non) but never (add non add) nor (add add add)
if( !(lhs instanceof AddNode) )
- return spline_cmp(lhs,rhs) ? swap12() : null;
+ return spine_cmp(lhs,rhs) ? swap12() : null;
// Now we only see (add add non)
@@ -72,22 +72,22 @@ public class AddNode extends Node {
if( lhs.in(2)._type.isConstant() && t2.isConstant() )
return new AddNode(lhs.in(1),new AddNode(lhs.in(2),rhs).peephole());
- // Now we sort along the spline via rotates, to gather similar things together.
+ // Now we sort along the spine via rotates, to gather similar things together.
// Do we rotate (x + y) + z
// into (x + z) + y ?
- if( spline_cmp(lhs.in(2),rhs) )
+ if( spine_cmp(lhs.in(2),rhs) )
return new AddNode(new AddNode(lhs.in(1),rhs).peephole(),lhs.in(2));
return null;
}
- // Compare two off-spline nodes and decide what order they should be in.
+ // Compare two off-spine nodes and decide what order they should be in.
// Do we rotate ((x + hi) + lo) into ((x + lo) + hi) ?
// Generally constants always go right, then others.
// Ties with in a category sort by node ID.
// TRUE if swapping hi and lo.
- static boolean spline_cmp( Node hi, Node lo ) {
+ static boolean spine_cmp( Node hi, Node lo ) {
if( lo._type.isConstant() ) return false;
if( hi._type.isConstant() ) return true ;