{"action":"created","issue":{"url":"https://api.github.com/repos/apple/swift/issues/2928","repository_url":"https://api.github.com/repos/apple/swift","labels_url":"https://api.github.com/repos/apple/swift/issues/2928/labels{/name}","comments_url":"https://api.github.com/repos/apple/swift/issues/2928/comments","events_url":"https://api.github.com/repos/apple/swift/issues/2928/events","html_url":"https://github.com/apple/swift/pull/2928","id":158807565,"number":2928,"title":"[don't merge] Track dependencies of SIL instructions on opened archetypes which they use.","user":{"login":"swiftix","id":15327066,"avatar_url":"https://avatars.githubusercontent.com/u/15327066?v=3","gravatar_id":"","url":"https://api.github.com/users/swiftix","html_url":"https://github.com/swiftix","followers_url":"https://api.github.com/users/swiftix/followers","following_url":"https://api.github.com/users/swiftix/following{/other_user}","gists_url":"https://api.github.com/users/swiftix/gists{/gist_id}","starred_url":"https://api.github.com/users/swiftix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swiftix/subscriptions","organizations_url":"https://api.github.com/users/swiftix/orgs","repos_url":"https://api.github.com/users/swiftix/repos","events_url":"https://api.github.com/users/swiftix/events{/privacy}","received_events_url":"https://api.github.com/users/swiftix/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-06-07T00:56:40Z","updated_at":"2016-06-07T17:34:04Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apple/swift/pulls/2928","html_url":"https://github.com/apple/swift/pull/2928","diff_url":"https://github.com/apple/swift/pull/2928.diff","patch_url":"https://github.com/apple/swift/pull/2928.patch"},"body":"<!-- Please complete this template before creating pull request. -->\r\n#### What's in this pull request?\r\n<!-- Description about pull request. -->\r\n\r\n#### Resolved bug number: ([SR-](https://bugs.swift.org/browse/SR-))\r\n<!-- If this pull request resolves any bugs from Swift bug tracker -->\r\n\r\n* * * *\r\n\r\n<!-- This selection should only be completed by Swift admin -->\r\nBefore merging this pull request to apple/swift repository:\r\n- [ ] Test pull request on Swift continuous integration.\r\n\r\n<details>\r\n  <summary>Triggering Swift CI</summary>\r\n\r\nThe swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:\r\n\r\n**Smoke Testing**\r\n\r\n        Platform     | Comment\r\n        ------------ | -------------\r\n        All supported platforms     | @swift-ci Please smoke test\r\n        All supported platforms     | @swift-ci Please smoke test and merge\r\n        OS X platform               | @swift-ci Please smoke test OS X platform\r\n        Linux platform              | @swift-ci Please smoke test Linux platform\r\n\r\n**Validation Testing**\r\n\r\n        Platform     | Comment\r\n        ------------ | -------------\r\n        All supported platforms     | @swift-ci Please test\r\n        All supported platforms     | @swift-ci Please test and merge\r\n        OS X platform               | @swift-ci Please test OS X platform\r\n        OS X platform               | @swift-ci Please benchmark\r\n        Linux platform              | @swift-ci Please test Linux platform\r\n\r\n\r\n**Lint Testing**\r\n\r\n        Language     | Comment\r\n        ------------ | -------------\r\n        Python       | @swift-ci Please Python lint\r\n\r\nNote: Only members of the Apple organization can trigger swift-ci.\r\n</details>\r\n<!-- Thank you for your contribution to Swift! -->\r\n\r\nTill now there was no way in SIL to explicitly express a dependency of an instruction on any opened archetypes used by it. This was a cause of many errors and correctness issues. In many cases the code was moved around without taking into account these dependencies, which resulted in breaking the invariant that any uses of an opened archetype should be dominated by the definition of this archetype.\r\n\r\nThis patch does the following:\r\n- Map opened archetypes to the instructions defining them, i.e. to open_existential instructions.\r\n- Introduce a helper class SILOpenedArchetypesTracker for creating and maintaining such mappingss.\r\n- Each SIL instruction which uses an opened archetype as a type gets an additional \"typedef\" operand representing a dependency of the instruction on this archetype. These typedef operands are an in-memory representation. They are not serialized. Instead, they are re-constructed when reading binary or textual SIL files.\r\n- SILVerifier was extended to conduct more thorough checks related to the usage of opened archetypes."},"comment":{"url":"https://api.github.com/repos/apple/swift/issues/comments/224355176","html_url":"https://github.com/apple/swift/pull/2928#issuecomment-224355176","issue_url":"https://api.github.com/repos/apple/swift/issues/2928","id":224355176,"user":{"login":"swiftix","id":15327066,"avatar_url":"https://avatars.githubusercontent.com/u/15327066?v=3","gravatar_id":"","url":"https://api.github.com/users/swiftix","html_url":"https://github.com/swiftix","followers_url":"https://api.github.com/users/swiftix/followers","following_url":"https://api.github.com/users/swiftix/following{/other_user}","gists_url":"https://api.github.com/users/swiftix/gists{/gist_id}","starred_url":"https://api.github.com/users/swiftix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swiftix/subscriptions","organizations_url":"https://api.github.com/users/swiftix/orgs","repos_url":"https://api.github.com/users/swiftix/repos","events_url":"https://api.github.com/users/swiftix/events{/privacy}","received_events_url":"https://api.github.com/users/swiftix/received_events","type":"User","site_admin":false},"created_at":"2016-06-07T17:34:04Z","updated_at":"2016-06-07T17:34:04Z","body":"@jckarter Joe, you may want to have a look as well."}}
{"actor":{"display_login":"swiftix"}}