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, 5 insertions, 2 deletions
diff --git a/src/ir/effects.h b/src/ir/effects.h
index 80aa74cb6..d5b917d8b 100644
--- a/src/ir/effects.h
+++ b/src/ir/effects.h
@@ -563,12 +563,15 @@ private:
}
void visitStructGet(StructGet* curr) {
// traps when the arg is null
- if (curr->value->type.isNullable()) {
+ if (curr->ref->type.isNullable()) {
parent.implicitTrap = true;
}
}
void visitStructSet(StructSet* curr) {
- WASM_UNREACHABLE("TODO (gc): struct.set");
+ // traps when the arg is null
+ if (curr->ref->type.isNullable()) {
+ parent.implicitTrap = true;
+ }
}
void visitArrayNew(ArrayNew* curr) {
WASM_UNREACHABLE("TODO (gc): array.new");