Commit Graph

4 Commits

Author SHA1 Message Date
Doug Gregor
4da11aab58 [AST] Teach SpecializedProtocolConformance to profile its substitutions.
Otherwise, we could theoretically get collisions, although they are
quite unlikely to matter in practice.
2017-04-18 17:15:15 -07:00
Roman Levenstein
07d779058a Address review comments
- Avoid unnecessary memory allocation
- Fix spelling errors
- Some further minor fixes
2017-04-17 11:44:57 -07:00
Roman Levenstein
6b466c5e1f Add a functionality to produce canonical conformances and substitutions
A canonical conformance is defined as a conformance which:
- does not contain any non-canonical types.
- Its type and interface type should be canonical.
- Any referenced conformances should be canonical.
- Any used substitutions should be canonical as well.

A substitution is canonical if:
- its replacement type is canonical
- all of its conformances are canonical
2017-04-14 19:53:51 -07:00
Slava Pestov
3519e0cd25 AST: Introduce new SubstitutionList type to replace ArrayRef<Substitution>
SubstitutionList is going to be a more compact representation of
a SubstitutionMap, suitable for inline allocation inside another
object.

For now, it's just a typedef for ArrayRef<Substitution>.
2017-02-06 21:36:33 -08:00