Skip to content

[GSB] *Almost* eliminate the "AlwaysPartial" archetype resolution kind #9981

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 30, 2017

Conversation

DougGregor
Copy link
Member

When resolving archetypes using the "always partial" resolution kind,
we allow the system to form potential archetypes which might be
invalid. Start limiting the use of this "always partial" resolution
kind, so that it can eventually be removed entirely to simplify the
invariants of the GenericSignatureBuilder.

Each of the callers should either be working with complete,
well-formed archetypes or they should not force any resolution this
early.

This PR currently limits the use of ArchetypeResolutionKind::AlwaysPartial to a single place in the GenericSignatureBuilder, which is the point at which we can start delaying resolution.

@DougGregor
Copy link
Member Author

@swift-ci please smoke test

When resolving archetypes using the "always partial" resolution kind,
we allow the system to form potential archetypes which might be
invalid. Start limiting the use of this "always partial" resolution
kind, so that it can eventually be removed entirely to simplify the
invariants of the GenericSignatureBuilder.

Each of the callers should either be working with complete,
well-formed archetypes or they should not force any resolution this
early.
…traints.

Once we're finalizing same-type-to-concrete and superclass
constraints, replace any unresolved DependentMemberTypes with their
resolved counterpairs. This allows us to simplify
DependentGenericTypeResolver, which only builds unresolved
DependentMemberTypes now, and eliminates the penultimate use of
ArchetypeResolutionKind::AlwaysPartial.
@DougGregor DougGregor force-pushed the gsb-never-always-partial branch from 5a73a6e to a9733cb Compare May 30, 2017 18:44
@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor DougGregor changed the title [GSB] WIP toward eliminating the "AlwaysPartial" archetype resolution kind [GSB] *Almost* eliminate the "AlwaysPartial" archetype resolution kind May 30, 2017
@DougGregor
Copy link
Member Author

@swift-ci please smoke test and merge

@DougGregor DougGregor merged commit 5447d34 into swiftlang:master May 30, 2017
@DougGregor DougGregor deleted the gsb-never-always-partial branch May 30, 2017 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant