Skip to content

Commit 493e320

Browse files
authored
Clean up null check handling in EffectAnalyzer (#8422)
Each visitor previously handled implicit null checks of reference operands in an ad hoc way. Different expressions had varying levels of precision when reasoning about the null checks. For example, many would just always set `implicitTraps`, while others would look at the nullability of the operands to be more precise. Factor the handling of null checks into a helper function and use it everywhere applicable. This makes the code smaller, clearer, and more precise. Update OptimizeCasts to add a new dummy operand to a dummy expression because EffectAnalyzer will newly try to look at that operand and it must not read uninitialized memory. Some GUFA tests are updated to remove more side-effect-free expressions now that EffectAnalyzer is more aggressive and can recognize them as such.
1 parent 83128c9 commit 493e320

File tree

4 files changed

+135
-244
lines changed

4 files changed

+135
-244
lines changed

0 commit comments

Comments
 (0)