diff options
author | Alon Zakai <azakai@google.com> | 2022-07-19 16:03:01 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-19 16:03:01 -0700 |
commit | 1c53f7dd29e79bc1894959cad817b22f087689f7 (patch) | |
tree | c3d114a3359f4ba9175f7cff3bf3bc6b83c2b885 /src/ir/effects.h | |
parent | 984078acc7625c44870a3d256deaa19b76894de0 (diff) | |
download | binaryen-1c53f7dd29e79bc1894959cad817b22f087689f7.tar.gz binaryen-1c53f7dd29e79bc1894959cad817b22f087689f7.tar.bz2 binaryen-1c53f7dd29e79bc1894959cad817b22f087689f7.zip |
[Strings] Add string.new GC variants (#4813)
Diffstat (limited to 'src/ir/effects.h')
-rw-r--r-- | src/ir/effects.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ir/effects.h b/src/ir/effects.h index 58480f0ff..43d4868d8 100644 --- a/src/ir/effects.h +++ b/src/ir/effects.h @@ -732,7 +732,10 @@ private: // we keep the code here simpler, but it does mean another optimization // cycle may be needed in some cases. } - void visitStringNew(StringNew* curr) {} + void visitStringNew(StringNew* curr) { + // traps when out of bounds in linear memory or ref is null + parent.implicitTrap = true; + } void visitStringConst(StringConst* curr) {} void visitStringMeasure(StringMeasure* curr) { // traps when ref is null. |