summaryrefslogtreecommitdiff
path: root/src/ir/effects.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ir/effects.h')
-rw-r--r--src/ir/effects.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ir/effects.h b/src/ir/effects.h
index 43d4868d8..e3f4b565d 100644
--- a/src/ir/effects.h
+++ b/src/ir/effects.h
@@ -653,7 +653,12 @@ private:
void visitTupleMake(TupleMake* curr) {}
void visitTupleExtract(TupleExtract* curr) {}
void visitI31New(I31New* curr) {}
- void visitI31Get(I31Get* curr) {}
+ void visitI31Get(I31Get* curr) {
+ // traps when the ref is null
+ if (curr->i31->type.isNullable()) {
+ parent.implicitTrap = true;
+ }
+ }
void visitCallRef(CallRef* curr) {
parent.calls = true;
if (parent.features.hasExceptionHandling() && parent.tryDepth == 0) {