summaryrefslogtreecommitdiff
path: root/chapter12/src
diff options
context:
space:
mode:
Diffstat (limited to 'chapter12/src')
-rw-r--r--chapter12/src/main/java/com/seaofnodes/simple/node/BoolNode.java1
-rw-r--r--chapter12/src/main/java/com/seaofnodes/simple/node/ConstantNode.java2
-rw-r--r--chapter12/src/main/java/com/seaofnodes/simple/type/TypeMemPtr.java10
3 files changed, 6 insertions, 7 deletions
diff --git a/chapter12/src/main/java/com/seaofnodes/simple/node/BoolNode.java b/chapter12/src/main/java/com/seaofnodes/simple/node/BoolNode.java
index 48faefd2..a31bd963 100644
--- a/chapter12/src/main/java/com/seaofnodes/simple/node/BoolNode.java
+++ b/chapter12/src/main/java/com/seaofnodes/simple/node/BoolNode.java
@@ -47,7 +47,6 @@ abstract public class BoolNode extends Node {
boolean doOp(long lhs, long rhs) { throw Utils.TODO(); }
boolean doOp(double lhs, double rhs) { throw Utils.TODO(); }
- Node copyF(Node lhs, Node rhs) { throw Utils.TODO(); }
@Override
public Node idealize() {
diff --git a/chapter12/src/main/java/com/seaofnodes/simple/node/ConstantNode.java b/chapter12/src/main/java/com/seaofnodes/simple/node/ConstantNode.java
index cf1a76b0..31edb848 100644
--- a/chapter12/src/main/java/com/seaofnodes/simple/node/ConstantNode.java
+++ b/chapter12/src/main/java/com/seaofnodes/simple/node/ConstantNode.java
@@ -18,7 +18,7 @@ import java.util.BitSet;
* The Constant's value is the value stored in it.
*/
public class ConstantNode extends Node {
- Type _con;
+ final Type _con;
public ConstantNode( Type type ) {
super(Parser.START);
_con = type;
diff --git a/chapter12/src/main/java/com/seaofnodes/simple/type/TypeMemPtr.java b/chapter12/src/main/java/com/seaofnodes/simple/type/TypeMemPtr.java
index 65352402..9392da20 100644
--- a/chapter12/src/main/java/com/seaofnodes/simple/type/TypeMemPtr.java
+++ b/chapter12/src/main/java/com/seaofnodes/simple/type/TypeMemPtr.java
@@ -29,11 +29,11 @@ public class TypeMemPtr extends Type {
public static TypeMemPtr make(TypeStruct obj, boolean nil) { return new TypeMemPtr(obj, nil).intern(); }
public static TypeMemPtr make(TypeStruct obj) { return TypeMemPtr.make(obj, false); }
- public static TypeMemPtr BOT = make(TypeStruct.BOT,true);
- public static TypeMemPtr TOP = BOT.dual();
- public static TypeMemPtr NULLPTR = make(TypeStruct.TOP,true);
- public static TypeMemPtr VOIDPTR = NULLPTR.dual(); // A bottom mix of not-null ptrs, like C's void* but not null
- public static TypeMemPtr TEST= make(TypeStruct.TEST,false);
+ public static final TypeMemPtr BOT = make(TypeStruct.BOT,true);
+ public static final TypeMemPtr TOP = BOT.dual();
+ public static final TypeMemPtr NULLPTR = make(TypeStruct.TOP,true);
+ public static final TypeMemPtr VOIDPTR = NULLPTR.dual(); // A bottom mix of not-null ptrs, like C's void* but not null
+ public static final TypeMemPtr TEST= make(TypeStruct.TEST,false);
public static void gather(ArrayList<Type> ts) { ts.add(NULLPTR); ts.add(BOT); ts.add(TEST); }
@Override