diff options
| -rw-r--r-- | chapter21/src/main/java/com/seaofnodes/simple/node/CallNode.java | 2 | ||||
| -rw-r--r-- | chapter21/src/main/java/com/seaofnodes/simple/type/TypeStruct.java | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/chapter21/src/main/java/com/seaofnodes/simple/node/CallNode.java b/chapter21/src/main/java/com/seaofnodes/simple/node/CallNode.java index 773716f7..78a0b153 100644 --- a/chapter21/src/main/java/com/seaofnodes/simple/node/CallNode.java +++ b/chapter21/src/main/java/com/seaofnodes/simple/node/CallNode.java @@ -139,7 +139,7 @@ public class CallNode extends CFGNode { assert linked(fun); int idx = fun._inputs.find(this); for( Node use : fun._outputs ) - if( use instanceof ParmNode parm ) + if( use instanceof ParmNode ) use.delDef(idx); fun.delDef(idx); cend().delDef(cend()._inputs.find(fun.ret())); diff --git a/chapter21/src/main/java/com/seaofnodes/simple/type/TypeStruct.java b/chapter21/src/main/java/com/seaofnodes/simple/type/TypeStruct.java index e981b5dc..aa6f2dfd 100644 --- a/chapter21/src/main/java/com/seaofnodes/simple/type/TypeStruct.java +++ b/chapter21/src/main/java/com/seaofnodes/simple/type/TypeStruct.java @@ -182,9 +182,12 @@ public class TypeStruct extends Type { @Override public SB print(SB sb) { + if( _fields == null ) return sb.p(_name); // Forward reference struct, just print the name + if( isAry() ) { + if( !isFinal() ) sb.p("!"); + return sb.p(_name); // Skip printing generic array fields + } sb.p(_name); - if( _fields == null ) return sb; // Forward reference struct, just print the name - if( isAry() ) return sb; // Skip printing generic array fields sb.p(" {"); for( Field f : _fields ) f._type.print(sb).p(f._final ? " " : " !").p(f._fname).p("; "); |
