diff options
Diffstat (limited to 'src/ir/cost.h')
-rw-r--r-- | src/ir/cost.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/ir/cost.h b/src/ir/cost.h index c19441555..c34ca1fb6 100644 --- a/src/ir/cost.h +++ b/src/ir/cost.h @@ -636,7 +636,10 @@ struct CostAnalyzer : public OverriddenVisitor<CostAnalyzer, CostType> { CostType visitArrayNew(ArrayNew* curr) { return 4 + visit(curr->size) + maybeVisit(curr->init); } - CostType visitArrayNewSeg(ArrayNewSeg* curr) { + CostType visitArrayNewData(ArrayNewData* curr) { + return 4 + visit(curr->offset) + visit(curr->size); + } + CostType visitArrayNewElem(ArrayNewElem* curr) { return 4 + visit(curr->offset) + visit(curr->size); } CostType visitArrayNewFixed(ArrayNewFixed* curr) { @@ -665,7 +668,11 @@ struct CostAnalyzer : public OverriddenVisitor<CostAnalyzer, CostType> { return 6 + visit(curr->ref) + visit(curr->index) + visit(curr->value) + visit(curr->size); } - CostType visitArrayInit(ArrayInit* curr) { + CostType visitArrayInitData(ArrayInitData* curr) { + return 6 + visit(curr->ref) + visit(curr->index) + visit(curr->offset) + + visit(curr->size); + } + CostType visitArrayInitElem(ArrayInitElem* curr) { return 6 + visit(curr->ref) + visit(curr->index) + visit(curr->offset) + visit(curr->size); } |