summaryrefslogtreecommitdiff
path: root/chapter17/src/main/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'chapter17/src/main/java/com')
-rw-r--r--chapter17/src/main/java/com/seaofnodes/simple/Parser.java10
-rw-r--r--chapter17/src/main/java/com/seaofnodes/simple/node/BoolNode.java1
-rw-r--r--chapter17/src/main/java/com/seaofnodes/simple/node/ConstantNode.java2
-rw-r--r--chapter17/src/main/java/com/seaofnodes/simple/type/TypeMemPtr.java10
4 files changed, 6 insertions, 17 deletions
diff --git a/chapter17/src/main/java/com/seaofnodes/simple/Parser.java b/chapter17/src/main/java/com/seaofnodes/simple/Parser.java
index 5a44b63e..adc47edc 100644
--- a/chapter17/src/main/java/com/seaofnodes/simple/Parser.java
+++ b/chapter17/src/main/java/com/seaofnodes/simple/Parser.java
@@ -729,16 +729,6 @@ public class Parser {
return tary;
}
- // Fixup forward refs lazily. Basically a Union-Find flavored read
- // barrier.
- Type lazyFRef(Type t) {
- //if( !t.isFRef() ) return t;
- //Type def = Parser.TYPES.get(((TypeMemPtr)t)._obj._name);
- throw Utils.TODO();
-
- }
-
-
/**
* Parse an expression of the form:
*
diff --git a/chapter17/src/main/java/com/seaofnodes/simple/node/BoolNode.java b/chapter17/src/main/java/com/seaofnodes/simple/node/BoolNode.java
index 238be00e..aa9fd312 100644
--- a/chapter17/src/main/java/com/seaofnodes/simple/node/BoolNode.java
+++ b/chapter17/src/main/java/com/seaofnodes/simple/node/BoolNode.java
@@ -49,7 +49,6 @@ abstract public class BoolNode extends Node {
TypeInteger doOp(TypeInteger t1, TypeInteger t2) { throw Utils.TODO(); }
boolean doOp(double lhs, double rhs) { throw Utils.TODO(); }
- Node copyF(Node lhs, Node rhs) { return null; }
@Override
public Node idealize() {
diff --git a/chapter17/src/main/java/com/seaofnodes/simple/node/ConstantNode.java b/chapter17/src/main/java/com/seaofnodes/simple/node/ConstantNode.java
index 845b9d08..d760c0df 100644
--- a/chapter17/src/main/java/com/seaofnodes/simple/node/ConstantNode.java
+++ b/chapter17/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/chapter17/src/main/java/com/seaofnodes/simple/type/TypeMemPtr.java b/chapter17/src/main/java/com/seaofnodes/simple/type/TypeMemPtr.java
index 786a7be5..c24fccf3 100644
--- a/chapter17/src/main/java/com/seaofnodes/simple/type/TypeMemPtr.java
+++ b/chapter17/src/main/java/com/seaofnodes/simple/type/TypeMemPtr.java
@@ -40,13 +40,13 @@ public class TypeMemPtr extends Type {
// An abstract pointer, pointing to either a Struct or an Array.
// Can also be null or not.
- public static TypeMemPtr BOT = make(TypeStruct.BOT,true);
- public static TypeMemPtr TOP = BOT.dual();
+ public static final TypeMemPtr BOT = make(TypeStruct.BOT,true);
+ public static final TypeMemPtr TOP = BOT.dual();
// An abstract null (can be Struct or Array) or not-null C void*
- 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 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 TypeMemPtr TEST= make(TypeStruct.TEST,false);
+ 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