From d90baa2a8c0a8ce9a84befec756b39ec49360b8e Mon Sep 17 00:00:00 2001 From: Cliff Click Date: Wed, 26 Mar 2025 12:16:15 -0700 Subject: Minor improves to portability --- chapter21/src/main/java/com/seaofnodes/simple/codegen/BuildLRG.java | 2 +- chapter21/src/main/java/com/seaofnodes/simple/node/PhiNode.java | 2 +- .../main/java/com/seaofnodes/simple/node/cpus/riscv/BranchRISC.java | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'chapter21') diff --git a/chapter21/src/main/java/com/seaofnodes/simple/codegen/BuildLRG.java b/chapter21/src/main/java/com/seaofnodes/simple/codegen/BuildLRG.java index 88b49863..ca5157c7 100644 --- a/chapter21/src/main/java/com/seaofnodes/simple/codegen/BuildLRG.java +++ b/chapter21/src/main/java/com/seaofnodes/simple/codegen/BuildLRG.java @@ -27,7 +27,7 @@ abstract public class BuildLRG { break; // If none, make one. if( lrg==null ) lrg = alloc.newLRG(n); - if( phi instanceof MachNode mach ) defLRG(alloc,n); + if( phi instanceof MachNode ) defLRG(alloc,n); // Pass 2: everybody uses the same LRG lrg=alloc.union(lrg,phi); for( int i=phi instanceof ParmNode ? 2 : 1; i