diff options
| author | Cliff Click <cliffc@acm.org> | 2026-09-28 09:23:27 -0700 |
|---|---|---|
| committer | Cliff Click <cliffc@acm.org> | 2026-09-28 09:23:27 -0700 |
| commit | 8212a66ff27e56531e0b48807088f1c544d75756 (patch) | |
| tree | d1a1cdbf1ae790ddd8378714d4325a84b90bfc17 /chapter17/src/main/java | |
| parent | 3d226b49e1cd23b41fd9baf3917f751973c1ad11 (diff) | |
| download | Simple-8212a66ff27e56531e0b48807088f1c544d75756.tar.gz Simple-8212a66ff27e56531e0b48807088f1c544d75756.zip | |
Check un-init not-null constructor fields
Propagate BOT inputs; Arith, Load.
CallEnd inlining, the FUnPtr dies early.
Load asserts when loading against uninit not-null field.
Keep not-nill state for storage class.
Clean up Node.peep as constant.
Diffstat (limited to 'chapter17/src/main/java')
| -rw-r--r-- | chapter17/src/main/java/com/seaofnodes/simple/Parser.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/chapter17/src/main/java/com/seaofnodes/simple/Parser.java b/chapter17/src/main/java/com/seaofnodes/simple/Parser.java index 07312396..86b59dc3 100644 --- a/chapter17/src/main/java/com/seaofnodes/simple/Parser.java +++ b/chapter17/src/main/java/com/seaofnodes/simple/Parser.java @@ -992,7 +992,7 @@ public class Parser { } // Check that all fields are initialized for( int i=idx; i<init.size(); i++ ) - if( /*init.at(i)._type == Type.TOP ||*/ init.at(i)._type == Type.BOTTOM ) + if( init.at(i)._type == Type.TOP || init.at(i)._type == Type.BOTTOM ) throw error("'"+tmp._obj._name+"' is not fully initialized, field '" + fs[i-idx]._fname + "' needs to be set in a constructor"); Node ptr = newStruct(tmp._obj, con(tmp._obj.offset(fs.length)), idx, init ); if( hasConstructor ) |
