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.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/ir/effects.h b/src/ir/effects.h
index 7074df755..e33a33818 100644
--- a/src/ir/effects.h
+++ b/src/ir/effects.h
@@ -534,7 +534,6 @@ private:
parent.writesMemory = true;
parent.implicitTrap = true;
}
- void visitTableSize(TableSize* curr) { parent.readsTable = true; }
void visitConst(Const* curr) {}
void visitUnary(Unary* curr) {
switch (curr->op) {
@@ -592,6 +591,7 @@ private:
parent.isAtomic = true;
}
void visitMemoryGrow(MemoryGrow* curr) {
+ // TODO: find out if calls is necessary here
parent.calls = true;
// memory.grow technically does a read-modify-write operation on the
// memory size in the successful case, modifying the set of valid
@@ -613,6 +613,14 @@ private:
parent.writesTable = true;
parent.implicitTrap = true;
}
+ void visitTableSize(TableSize* curr) { parent.readsTable = true; }
+ void visitTableGrow(TableGrow* curr) {
+ // table.grow technically does a read-modify-write operation on the
+ // table size in the successful case, modifying the set of valid
+ // indices, and just a read operation in the failure case
+ parent.readsTable = true;
+ parent.writesTable = true;
+ }
void visitTry(Try* curr) {}
void visitThrow(Throw* curr) {
if (parent.tryDepth == 0) {