Skip to content

Commit e9b94c1

Browse files
committed
RequirementMachine: Move some methods from RewriteStep to RewritePathEvaluator
This better encapsulates the evaluator state into a single struct.
1 parent d19b15b commit e9b94c1

File tree

4 files changed

+208
-206
lines changed

4 files changed

+208
-206
lines changed

lib/AST/RequirementMachine/GeneratingConformances.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ void RewriteLoop::findProtocolConformanceRules(
138138
}
139139
}
140140

141-
step.apply(evaluator, system);
141+
evaluator.apply(step, system);
142142
}
143143
}
144144

lib/AST/RequirementMachine/HomotopyReduction.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ RewriteLoop::findRulesAppearingOnceInEmptyContext(
9999
break;
100100
}
101101

102-
step.apply(evaluator, system);
102+
evaluator.apply(step, system);
103103
}
104104

105105
// Collect all rules that we saw exactly once in empty context.
@@ -844,7 +844,7 @@ void RewriteSystem::verifyRewriteLoops() const {
844844
RewritePathEvaluator evaluator(loop.Basepoint);
845845

846846
for (const auto &step : loop.Path) {
847-
step.apply(evaluator, *this);
847+
evaluator.apply(step, *this);
848848
}
849849

850850
if (evaluator.getCurrentTerm() != loop.Basepoint) {

0 commit comments

Comments
 (0)