diff options
-rw-r--r-- | src/ir/effects.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/ir/effects.h b/src/ir/effects.h index aa8a458d0..4b8c9a921 100644 --- a/src/ir/effects.h +++ b/src/ir/effects.h @@ -770,6 +770,19 @@ private: void visitStringEncode(StringEncode* curr) { // traps when ref is null or we write out of bounds. parent.implicitTrap = true; + switch (curr->op) { + case StringEncodeUTF8: + case StringEncodeWTF8: + case StringEncodeWTF16: + parent.writesMemory = true; + break; + case StringEncodeUTF8Array: + case StringEncodeWTF8Array: + case StringEncodeWTF16Array: + parent.writesArray = true; + break; + default: {} + } } void visitStringConcat(StringConcat* curr) { // traps when an input is null. |