{"action":"created","issue":{"url":"https://api.github.com/repos/apple/swift/issues/4617","repository_url":"https://api.github.com/repos/apple/swift","labels_url":"https://api.github.com/repos/apple/swift/issues/4617/labels{/name}","comments_url":"https://api.github.com/repos/apple/swift/issues/4617/comments","events_url":"https://api.github.com/repos/apple/swift/issues/4617/events","html_url":"https://github.com/apple/swift/pull/4617","id":174890455,"number":4617,"title":"Kill canonical mangling signature","user":{"login":"slavapestov","id":66486,"avatar_url":"https://avatars.githubusercontent.com/u/66486?v=3","gravatar_id":"","url":"https://api.github.com/users/slavapestov","html_url":"https://github.com/slavapestov","followers_url":"https://api.github.com/users/slavapestov/followers","following_url":"https://api.github.com/users/slavapestov/following{/other_user}","gists_url":"https://api.github.com/users/slavapestov/gists{/gist_id}","starred_url":"https://api.github.com/users/slavapestov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slavapestov/subscriptions","organizations_url":"https://api.github.com/users/slavapestov/orgs","repos_url":"https://api.github.com/users/slavapestov/repos","events_url":"https://api.github.com/users/slavapestov/events{/privacy}","received_events_url":"https://api.github.com/users/slavapestov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":16,"created_at":"2016-09-03T10:28:33Z","updated_at":"2016-09-05T04:43:21Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apple/swift/pulls/4617","html_url":"https://github.com/apple/swift/pull/4617","diff_url":"https://github.com/apple/swift/pull/4617.diff","patch_url":"https://github.com/apple/swift/pull/4617.patch"},"body":"This PR builds upon my previous PR which removed `AllArchetypes`, https://github.com/apple/swift/pull/4451 and https://github.com/apple/swift/pull/4524.\r\n\r\nNow that `AllArchetypes` is gone, there were a few places the old order of generic requirements in a signature still came up. In particular, we had two ways of building generic signatures:\r\n\r\n- we would first build a \"maximal\" signature containing all conformance requirements on all associated types nested in our generic parameters\r\n- we had a second `getCanonicalManglingSignature()` which dropped requirements that could be inferred from protocol declarations, and also attempted to pick representatives of same-type classes in a more canonical way -- this was used for mangling, and for building substitution lists\r\n\r\nThis PR merges the additional canonicalization performed by the second step into the first step, so all generic signatures are minimized now, and representatives of same-type classes are always canonical according to a total order among archetypes.\r\n\r\nThis eliminates some code duplication and also uncovers a few places in the optimizer where we would make assumptions about the order of requirements in a signature. In these places, we would build substitution lists by hand. This PR changes the optimizer to use the new utility methods on GenericSignature where appropriate, which simplifies the code and makes it more robust.\r\n\r\nNote that while substitution lists no longer contain conformances for nested types that can be derived from their parent types, they still contain the redundant nested types themselves. I'm going to drop these in a subsequent PR.\r\n\r\nAlso, `AbstractTypeParamDecl::getArchetype()` is still there, but it's on its way out."},"comment":{"url":"https://api.github.com/repos/apple/swift/issues/comments/244657838","html_url":"https://github.com/apple/swift/pull/4617#issuecomment-244657838","issue_url":"https://api.github.com/repos/apple/swift/issues/4617","id":244657838,"user":{"login":"slavapestov","id":66486,"avatar_url":"https://avatars.githubusercontent.com/u/66486?v=3","gravatar_id":"","url":"https://api.github.com/users/slavapestov","html_url":"https://github.com/slavapestov","followers_url":"https://api.github.com/users/slavapestov/followers","following_url":"https://api.github.com/users/slavapestov/following{/other_user}","gists_url":"https://api.github.com/users/slavapestov/gists{/gist_id}","starred_url":"https://api.github.com/users/slavapestov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slavapestov/subscriptions","organizations_url":"https://api.github.com/users/slavapestov/orgs","repos_url":"https://api.github.com/users/slavapestov/repos","events_url":"https://api.github.com/users/slavapestov/events{/privacy}","received_events_url":"https://api.github.com/users/slavapestov/received_events","type":"User","site_admin":false},"created_at":"2016-09-05T04:43:21Z","updated_at":"2016-09-05T04:43:21Z","body":"@swift-ci Please test"}}
{"actor":{"display_login":"slavapestov"}}