diff options
| author | Cliff Click <cliffc@acm.org> | 2026-09-27 08:52:12 -0700 |
|---|---|---|
| committer | Cliff Click <cliffc@acm.org> | 2026-09-27 08:52:12 -0700 |
| commit | c5ef4e52fd7d183861b33476db999fa04f777607 (patch) | |
| tree | fae4a9fb155a2e60b4b4390cd0ad3d30851257c8 /chapter07/src/main | |
| parent | 4391fcc03a214e6296e19ca42487de023ab12f6a (diff) | |
| download | Simple-c5ef4e52fd7d183861b33476db999fa04f777607.tar.gz Simple-c5ef4e52fd7d183861b33476db999fa04f777607.zip | |
Remove -disablePeephole
Diffstat (limited to 'chapter07/src/main')
| -rw-r--r-- | chapter07/src/main/java/com/seaofnodes/simple/node/Node.java | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/chapter07/src/main/java/com/seaofnodes/simple/node/Node.java b/chapter07/src/main/java/com/seaofnodes/simple/node/Node.java index 0cc9f208..921292cb 100644 --- a/chapter07/src/main/java/com/seaofnodes/simple/node/Node.java +++ b/chapter07/src/main/java/com/seaofnodes/simple/node/Node.java @@ -279,12 +279,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> @@ -313,9 +307,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()); @@ -467,7 +458,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 |
