summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ir/effects.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/ir/effects.h b/src/ir/effects.h
index e3f4b565d..8d643ffe3 100644
--- a/src/ir/effects.h
+++ b/src/ir/effects.h
@@ -667,12 +667,14 @@ private:
if (curr->isReturn) {
parent.branchesOut = true;
}
- // traps when the arg is null
- parent.implicitTrap = true;
+ // traps when the call target is null
+ if (curr->target->type.isNullable()) {
+ parent.implicitTrap = true;
+ }
}
void visitRefTest(RefTest* curr) {}
void visitRefCast(RefCast* curr) {
- // Traps if the ref is not null and it has an invalid rtt.
+ // Traps if the ref is not null and the cast fails.
parent.implicitTrap = true;
}
void visitBrOn(BrOn* curr) { parent.breakTargets.insert(curr->name); }