diff options
Diffstat (limited to 'chapter04/src/main/java')
| -rw-r--r-- | chapter04/src/main/java/com/seaofnodes/simple/node/Node.java | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/chapter04/src/main/java/com/seaofnodes/simple/node/Node.java b/chapter04/src/main/java/com/seaofnodes/simple/node/Node.java index eb7d8333..2a4aad2f 100644 --- a/chapter04/src/main/java/com/seaofnodes/simple/node/Node.java +++ b/chapter04/src/main/java/com/seaofnodes/simple/node/Node.java @@ -210,12 +210,6 @@ public abstract class Node { // Graph-based optimizations /** - * We allow disabling peephole opt so that we can observe the - * full graph, vs the optimized graph. - */ - public static boolean _disablePeephole = false; - - /** * Try to peephole at this node and return a better replacement Node if * possible. We compute a {@link Type} and then check and replace: * <ul> @@ -244,9 +238,6 @@ public abstract class Node { // Compute initial or improved Type Type type = _type = compute(); - if (_disablePeephole) - return null; // Peephole optimizations turned off - // Replace constant computations from non-constants with a constant node if (!(this instanceof ConstantNode) && type.isConstant()) return deadCodeElim(new ConstantNode(type).peephole()); @@ -360,7 +351,7 @@ public abstract class Node { * Used to allow repeating tests in the same JVM. This just resets the * Node unique id generator, and is done as part of making a new Parser. */ - public static void reset() { UNIQUE_ID = 1; _disablePeephole=false; } + public static void reset() { UNIQUE_ID = 1; } /** * Debugging utility to find a Node by index |
