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.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/ir/effects.h b/src/ir/effects.h
index c5251ae64..fe2520299 100644
--- a/src/ir/effects.h
+++ b/src/ir/effects.h
@@ -755,7 +755,12 @@ private:
}
}
void visitArrayNew(ArrayNew* curr) {}
- void visitArrayNewSeg(ArrayNewSeg* curr) {
+ void visitArrayNewData(ArrayNewData* curr) {
+ // Traps on out of bounds access to segments or access to dropped
+ // segments.
+ parent.implicitTrap = true;
+ }
+ void visitArrayNewElem(ArrayNewElem* curr) {
// Traps on out of bounds access to segments or access to dropped
// segments.
parent.implicitTrap = true;
@@ -808,7 +813,7 @@ private:
// Traps when the destination is null or when out of bounds.
parent.implicitTrap = true;
}
- void visitArrayInit(ArrayInit* curr) {
+ template<typename ArrayInit> void visitArrayInit(ArrayInit* curr) {
if (curr->ref->type.isNull()) {
parent.trap = true;
return;
@@ -818,6 +823,8 @@ private:
// destination, or when the source segment has been dropped.
parent.implicitTrap = true;
}
+ void visitArrayInitData(ArrayInitData* curr) { visitArrayInit(curr); }
+ void visitArrayInitElem(ArrayInitElem* curr) { visitArrayInit(curr); }
void visitRefAs(RefAs* curr) {
if (curr->op == ExternInternalize || curr->op == ExternExternalize) {
// These conversions are infallible.