Commits

Doug Gregor committed 997136962e5
Always open existential types in the type checker. Consistently open all references into existentials into opened-existential archetypes within the constraint solver. Then, during constraint application, use OpenExistentialExprs to record in the AST where an existential is opened into an archetype, then use that archetype throughout the subexpression. This simplifies the overall representation, since we don't end up with a mix of operations on existentials and operations on archetypes; it's all archetypes, which tend to have better support down the line in SILGen already. Start simplifying the code in SILGen by taking away the existential paths that are no longer needed. I suspect there are more simplifications to be had here. The rules for placing OpenExistentialExprs are still a bit ad hoc; this will get cleaned up later so that we can centralize that information. Indeed, the one regression in the compiler-crasher suite is because we're not closing out an open existential along an error path. Swift SVN r27230