summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ir/effects.h25
1 files changed, 22 insertions, 3 deletions
diff --git a/src/ir/effects.h b/src/ir/effects.h
index c2ba794d9..63d9fafc5 100644
--- a/src/ir/effects.h
+++ b/src/ir/effects.h
@@ -592,7 +592,8 @@ private:
parent.implicitTrap = true;
break;
}
- default: {}
+ default: {
+ }
}
}
void visitBinary(Binary* curr) {
@@ -621,7 +622,8 @@ private:
}
break;
}
- default: {}
+ default: {
+ }
}
}
void visitSelect(Select* curr) {}
@@ -783,6 +785,22 @@ private:
void visitStringNew(StringNew* curr) {
// traps when out of bounds in linear memory or ref is null
parent.implicitTrap = true;
+ switch (curr->op) {
+ case StringNewUTF8:
+ case StringNewWTF8:
+ case StringNewReplace:
+ case StringNewWTF16:
+ parent.readsMemory = true;
+ break;
+ case StringNewUTF8Array:
+ case StringNewWTF8Array:
+ case StringNewReplaceArray:
+ case StringNewWTF16Array:
+ parent.readsArray = true;
+ break;
+ default: {
+ }
+ }
}
void visitStringConst(StringConst* curr) {}
void visitStringMeasure(StringMeasure* curr) {
@@ -803,7 +821,8 @@ private:
case StringEncodeWTF16Array:
parent.writesArray = true;
break;
- default: {}
+ default: {
+ }
}
}
void visitStringConcat(StringConcat* curr) {