diff options
author | Alon Zakai <azakai@google.com> | 2022-07-07 15:43:22 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-07 15:43:22 -0700 |
commit | 19a437500a4c30f48355722653a01a8c44ff6bec (patch) | |
tree | 408bf64e92d17b38561561f138e1d03243774369 /src/ir/cost.h | |
parent | 9831b36d339b1cea61d5313f7dfa256fc1ee9bcc (diff) | |
download | binaryen-19a437500a4c30f48355722653a01a8c44ff6bec.tar.gz binaryen-19a437500a4c30f48355722653a01a8c44ff6bec.tar.bz2 binaryen-19a437500a4c30f48355722653a01a8c44ff6bec.zip |
[Strings] string.encode (#4776)
Diffstat (limited to 'src/ir/cost.h')
-rw-r--r-- | src/ir/cost.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ir/cost.h b/src/ir/cost.h index 372c597a5..afc091ffb 100644 --- a/src/ir/cost.h +++ b/src/ir/cost.h @@ -678,6 +678,9 @@ struct CostAnalyzer : public OverriddenVisitor<CostAnalyzer, CostType> { CostType visitStringMeasure(StringMeasure* curr) { return 6 + visit(curr->ref); } + CostType visitStringEncode(StringEncode* curr) { + return 6 + visit(curr->ref) + visit(curr->ptr); + } private: CostType nullCheckCost(Expression* ref) { |