diff options
Diffstat (limited to 'src/ir/effects.h')
-rw-r--r-- | src/ir/effects.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/ir/effects.h b/src/ir/effects.h index 393285924..7045d9382 100644 --- a/src/ir/effects.h +++ b/src/ir/effects.h @@ -751,6 +751,32 @@ private: // traps when ref is null. parent.implicitTrap = true; } + void visitStringWTF8Advance(StringWTF8Advance* curr) { + // traps when ref is null. + parent.implicitTrap = true; + } + void visitStringWTF16Get(StringWTF16Get* curr) { + // traps when ref is null. + parent.implicitTrap = true; + } + void visitStringIterNext(StringIterNext* curr) { + // traps when ref is null. + parent.implicitTrap = true; + // modifies state in the iterator. we model that as accessing heap memory + // in an array atm TODO consider adding a new effect type for this (we + // added one for arrays because struct/array operations often interleave, + // say with vtable accesses, but it's not clear adding overhead to this + // class is worth it for string iters) + parent.readsArray = true; + parent.writesArray = true; + } + void visitStringIterMove(StringIterMove* curr) { + // traps when ref is null. + parent.implicitTrap = true; + // see StringIterNext. + parent.readsArray = true; + parent.writesArray = true; + } }; public: |