@@ -44,21 +44,6 @@ namespace rewriting {
4444class MutableTerm ;
4545class Term ;
4646
47- // / A new rule introduced during property map construction, as a result of
48- // / unifying two property symbols that apply to the same common suffix term.
49- struct InducedRule {
50- MutableTerm LHS;
51- MutableTerm RHS;
52- RewritePath Path;
53-
54- InducedRule (MutableTerm LHS, MutableTerm RHS, RewritePath Path)
55- : LHS(LHS), RHS(RHS), Path(Path) {}
56-
57- // FIXME: Eventually all induced rules will have a rewrite path.
58- InducedRule (MutableTerm LHS, MutableTerm RHS)
59- : LHS(LHS), RHS(RHS) {}
60- };
61-
6247// / Stores a convenient representation of all "property-like" rewrite rules of
6348// / the form T.[p] => T, where [p] is a property symbol, for some term 'T'.
6449class PropertyBag {
@@ -258,14 +243,11 @@ class PropertyMap {
258243 bool checkRuleOnce (unsigned ruleID);
259244 bool checkRulePairOnce (unsigned firstRuleID, unsigned secondRuleID);
260245
261- void addProperty (Term key, Symbol property, unsigned ruleID,
262- SmallVectorImpl<InducedRule> &inducedRules);
246+ void addProperty (Term key, Symbol property, unsigned ruleID);
263247
264- void checkConcreteTypeRequirements (
265- SmallVectorImpl<InducedRule> &inducedRules);
248+ void checkConcreteTypeRequirements ();
266249
267- void concretizeNestedTypesFromConcreteParents (
268- SmallVectorImpl<InducedRule> &inducedRules);
250+ void concretizeNestedTypesFromConcreteParents ();
269251
270252 void concretizeNestedTypesFromConcreteParent (
271253 Term key, RequirementKind requirementKind,
@@ -274,15 +256,17 @@ class PropertyMap {
274256 ArrayRef<Term> substitutions,
275257 ArrayRef<unsigned > conformsToRules,
276258 ArrayRef<const ProtocolDecl *> conformsTo,
277- llvm::TinyPtrVector<ProtocolConformance *> &conformances,
278- SmallVectorImpl<InducedRule> &inducedRules);
259+ llvm::TinyPtrVector<ProtocolConformance *> &conformances);
279260
280261 void concretizeTypeWitnessInConformance (
281262 Term key, RequirementKind requirementKind,
282263 Symbol concreteConformanceSymbol,
283264 ProtocolConformance *concrete,
284- AssociatedTypeDecl *assocType,
285- SmallVectorImpl<InducedRule> &inducedRules) const ;
265+ AssociatedTypeDecl *assocType) const ;
266+
267+ void inferConditionalRequirements (
268+ ProtocolConformance *concrete,
269+ ArrayRef<Term> substitutions) const ;
286270
287271 MutableTerm computeConstraintTermForTypeWitness (
288272 Term key, RequirementKind requirementKind,
@@ -295,8 +279,7 @@ class PropertyMap {
295279 unsigned concreteRuleID,
296280 unsigned conformanceRuleID,
297281 RequirementKind requirementKind,
298- Symbol concreteConformanceSymbol,
299- SmallVectorImpl<InducedRule> &inducedRules) const ;
282+ Symbol concreteConformanceSymbol) const ;
300283
301284 void verify () const ;
302285};
@@ -305,4 +288,4 @@ class PropertyMap {
305288
306289} // end namespace swift
307290
308- #endif
291+ #endif
0 commit comments