Commit Graph

2 Commits

Author SHA1 Message Date
John McCall
a34ecaf181 Fix some bugs in the dominance-caching logic.
Most notably, the source caches did not respect dominance.  The
simplest solution was just to drop them in favor of the ordinary
caching system; this is unfortunate because it requires walking
over the path twice instead of exploiting the trie, but it's much
easier to make this work, especially in combination with the other
caching mechanisms at play.

This will be tested by later commits that enable lazy-loading of
local type data in various contexts.
2016-01-13 10:45:11 -08:00
John McCall
2df6880617 Introduce ProtocolConformanceRef. NFC.
The main idea here is that we really, really want to be
able to recover the protocol requirement of a conformance
reference even if it's abstract due to the conforming type
being abstract (e.g. an archetype).  I've made the conversion
from ProtocolConformance* explicit to discourage casual
contamination of the Ref with a null value.

As part of this change, always make conformance arrays in
Substitutions fully parallel to the requirements, as opposed
to occasionally being empty when the conformances are abstract.

As another part of this, I've tried to proactively fix
prospective bugs with partially-concrete conformances, which I
believe can happen with concretely-bound archetypes.

In addition to just giving us stronger invariants, this is
progress towards the removal of the archetype from Substitution.
2016-01-08 00:19:59 -08:00