diff options
author | Alon Zakai <azakai@google.com> | 2021-09-30 17:54:05 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-30 17:54:05 -0700 |
commit | 65bcde2c30e82047a892332b95b114bc86f89614 (patch) | |
tree | fad936a8ed9b3275da50917bcebcbc235ab82600 /src/ir/cost.h | |
parent | ce8cdac461db4e0a3e178a59f8eb1447bfee51e1 (diff) | |
download | binaryen-65bcde2c30e82047a892332b95b114bc86f89614.tar.gz binaryen-65bcde2c30e82047a892332b95b114bc86f89614.tar.bz2 binaryen-65bcde2c30e82047a892332b95b114bc86f89614.zip |
Implement table.get (#4195)
Adds the part of the spec test suite that this passes (without table.set we
can't do it all).
Diffstat (limited to 'src/ir/cost.h')
-rw-r--r-- | src/ir/cost.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ir/cost.h b/src/ir/cost.h index 29fcb8dd4..12797b0b5 100644 --- a/src/ir/cost.h +++ b/src/ir/cost.h @@ -540,6 +540,7 @@ struct CostAnalyzer : public OverriddenVisitor<CostAnalyzer, CostType> { CostType visitRefEq(RefEq* curr) { return 1 + visit(curr->left) + visit(curr->right); } + CostType visitTableGet(TableGet* curr) { return 1 + visit(curr->index); } CostType visitTry(Try* curr) { // We assume no exception will be thrown in most cases return visit(curr->body); |