diff options
author | Alon Zakai <azakai@google.com> | 2022-08-09 15:53:52 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-09 15:53:52 -0700 |
commit | d0c6ca0aebe426ebe2b84e995e371f1e65494b25 (patch) | |
tree | 7da2ed24e5394fa93779c6580c4e151e6b8f7b2a /src/ir/cost.h | |
parent | 67023db726900f5581d0684fce68226e7875dbdd (diff) | |
download | binaryen-d0c6ca0aebe426ebe2b84e995e371f1e65494b25.tar.gz binaryen-d0c6ca0aebe426ebe2b84e995e371f1e65494b25.tar.bz2 binaryen-d0c6ca0aebe426ebe2b84e995e371f1e65494b25.zip |
[Strings] string.new.array methods have start:end arguments (#4888)
Diffstat (limited to 'src/ir/cost.h')
-rw-r--r-- | src/ir/cost.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ir/cost.h b/src/ir/cost.h index 823e58ded..ff9bade10 100644 --- a/src/ir/cost.h +++ b/src/ir/cost.h @@ -660,7 +660,8 @@ struct CostAnalyzer : public OverriddenVisitor<CostAnalyzer, CostType> { } CostType visitRefAs(RefAs* curr) { return 1 + visit(curr->value); } CostType visitStringNew(StringNew* curr) { - return 8 + visit(curr->ptr) + maybeVisit(curr->length); + return 8 + visit(curr->ptr) + maybeVisit(curr->length) + + maybeVisit(curr->start) + maybeVisit(curr->end); } CostType visitStringConst(StringConst* curr) { return 4; } CostType visitStringMeasure(StringMeasure* curr) { |