diff options
Diffstat (limited to 'src/ir/cost.h')
-rw-r--r-- | src/ir/cost.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ir/cost.h b/src/ir/cost.h index 0e87317a6..821e46524 100644 --- a/src/ir/cost.h +++ b/src/ir/cost.h @@ -726,6 +726,11 @@ struct CostAnalyzer : public OverriddenVisitor<CostAnalyzer, CostType> { return 8 + visit(curr->ref) + visit(curr->num); } + CostType visitResume(Resume* curr) { + // Inspired by indirect calls, but twice the cost. + return 12 + visit(curr->cont); + } + private: CostType nullCheckCost(Expression* ref) { // A nullable type requires a bounds check in most VMs. |