summaryrefslogtreecommitdiff
path: root/chapter17/src/main/java/com
diff options
context:
space:
mode:
authorCliff Click <cliffc@acm.org>2024-12-28 16:39:00 -0800
committerCliff Click <cliffc@acm.org>2025-01-15 15:07:30 -0800
commitc2cec7cb7fef6df603dd10180de4d0bb715ad47e (patch)
tree67dc5c1751034ddb2b15f338ffd75fd9dac74042 /chapter17/src/main/java/com
parentb80abea4fda5580d5070a4ac6d7763552634c32f (diff)
downloadSimple-c2cec7cb7fef6df603dd10180de4d0bb715ad47e.tar.gz
Simple-c2cec7cb7fef6df603dd10180de4d0bb715ad47e.zip
New evaluator, more Compiler Driver cleanup
More compiler driver cleanup: Stop only has Return inputs, never an expr. Drop extra lexical scope. Linker table moves to CodeGen. Replace evaluator with a simpler design; I was unable to get the current design to work with the other changes. Updates to old eval; proper idoms; forced type checks; extensions for Fun, Return, Call, CallEnd. Accessor find next control to execute. Accessor for deciding when its ok to optimize a Function/Return, Call/CallEnd, Stop, ScopeMin (merge) Add local scheduling pass. IRPrinter uses SB instead of StringBuilder Spelling SubF comment
Diffstat (limited to 'chapter17/src/main/java/com')
-rw-r--r--chapter17/src/main/java/com/seaofnodes/simple/node/SubFNode.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/chapter17/src/main/java/com/seaofnodes/simple/node/SubFNode.java b/chapter17/src/main/java/com/seaofnodes/simple/node/SubFNode.java
index 682930e0..b591718d 100644
--- a/chapter17/src/main/java/com/seaofnodes/simple/node/SubFNode.java
+++ b/chapter17/src/main/java/com/seaofnodes/simple/node/SubFNode.java
@@ -34,7 +34,7 @@ public class SubFNode extends Node {
Node lhs = in(1);
Type t2 = in(2)._type;
- // Sub of 1.
+ // Sub of 0.
if ( t2.isConstant() && t2 instanceof TypeFloat i && i.value()==0 )
return lhs;