summaryrefslogtreecommitdiff
path: root/src/ir/cost.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ir/cost.h')
-rw-r--r--src/ir/cost.h3
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) {