{"action":"created","comment":{"url":"https://api.github.com/repos/apple/swift/pulls/comments/82428735","pull_request_review_id":3339608,"id":82428735,"diff_hunk":"@@ -34,22 +34,14 @@ open class ManagedBuffer<Header, Element> {\n       ManagedBuffer<Header, Element>) throws -> Header\n   ) rethrows -> ManagedBuffer<Header, Element> {\n \n-    let p = try ManagedBufferPointer<Header, Element>(\n-      bufferClass: self,\n-      minimumCapacity: minimumCapacity,\n-      makingHeaderWith: { buffer, _ in\n-        try factory(\n-          unsafeDowncast(buffer, to: ManagedBuffer<Header, Element>.self))\n-      })\n-\n-    return unsafeDowncast(p.buffer, to: ManagedBuffer<Header, Element>.self)\n-  }\n+    let p = Builtin.allocWithTailElems_1(\n+         self,\n+         minimumCapacity._builtinWordValue, Element.self)\n \n-  /// Destroy the stored Header.\n-  deinit {\n-    ManagedBufferPointer(self).withUnsafeMutablePointerToHeader {\n-      _ = $0.deinitialize()\n-    }\n+    let initHeaderVal = try factory(p)\n+    p.headerAddress.initialize(to: initHeaderVal)\n+    _fixLifetime(p) ","path":"stdlib/public/core/ManagedBuffer.swift","position":25,"original_position":25,"commit_id":"6cd9702b13aa139dbbb7c57f80c72da8a385a1cf","original_commit_id":"6cd9702b13aa139dbbb7c57f80c72da8a385a1cf","user":{"login":"eeckstein","id":15270291,"avatar_url":"https://avatars.githubusercontent.com/u/15270291?v=3","gravatar_id":"","url":"https://api.github.com/users/eeckstein","html_url":"https://github.com/eeckstein","followers_url":"https://api.github.com/users/eeckstein/followers","following_url":"https://api.github.com/users/eeckstein/following{/other_user}","gists_url":"https://api.github.com/users/eeckstein/gists{/gist_id}","starred_url":"https://api.github.com/users/eeckstein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eeckstein/subscriptions","organizations_url":"https://api.github.com/users/eeckstein/orgs","repos_url":"https://api.github.com/users/eeckstein/repos","events_url":"https://api.github.com/users/eeckstein/events{/privacy}","received_events_url":"https://api.github.com/users/eeckstein/received_events","type":"User","site_admin":false},"body":"@jrose-apple exactly, that's the reason","created_at":"2016-10-07T17:01:04Z","updated_at":"2016-10-07T17:01:04Z","html_url":"https://github.com/apple/swift/pull/5153#discussion_r82428735","pull_request_url":"https://api.github.com/repos/apple/swift/pulls/5153","_links":{"self":{"href":"https://api.github.com/repos/apple/swift/pulls/comments/82428735"},"html":{"href":"https://github.com/apple/swift/pull/5153#discussion_r82428735"},"pull_request":{"href":"https://api.github.com/repos/apple/swift/pulls/5153"}}},"pull_request":{"url":"https://api.github.com/repos/apple/swift/pulls/5153","id":88305848,"html_url":"https://github.com/apple/swift/pull/5153","diff_url":"https://github.com/apple/swift/pull/5153.diff","patch_url":"https://github.com/apple/swift/pull/5153.patch","issue_url":"https://api.github.com/repos/apple/swift/issues/5153","number":5153,"state":"open","locked":false,"title":"stdlib: Use new built-ins for tail-allocated arrays in ManagedBuffer","user":{"login":"eeckstein","id":15270291,"avatar_url":"https://avatars.githubusercontent.com/u/15270291?v=3","gravatar_id":"","url":"https://api.github.com/users/eeckstein","html_url":"https://github.com/eeckstein","followers_url":"https://api.github.com/users/eeckstein/followers","following_url":"https://api.github.com/users/eeckstein/following{/other_user}","gists_url":"https://api.github.com/users/eeckstein/gists{/gist_id}","starred_url":"https://api.github.com/users/eeckstein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eeckstein/subscriptions","organizations_url":"https://api.github.com/users/eeckstein/orgs","repos_url":"https://api.github.com/users/eeckstein/repos","events_url":"https://api.github.com/users/eeckstein/events{/privacy}","received_events_url":"https://api.github.com/users/eeckstein/received_events","type":"User","site_admin":false},"body":"\r\n... instead of ManagedBufferPointer.\r\nThis is what we already did for Array, Set and Dictionary.\r\nThe intention is to simplify the generated SIL which is generated for ManagedBuffer operations.","created_at":"2016-10-06T17:28:20Z","updated_at":"2016-10-07T17:01:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"52e19d298c4b7b7c0883875eca6fbcedd40a7e47","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/apple/swift/pulls/5153/commits","review_comments_url":"https://api.github.com/repos/apple/swift/pulls/5153/comments","review_comment_url":"https://api.github.com/repos/apple/swift/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apple/swift/issues/5153/comments","statuses_url":"https://api.github.com/repos/apple/swift/statuses/6cd9702b13aa139dbbb7c57f80c72da8a385a1cf","head":{"label":"eeckstein:managedbuffer","ref":"managedbuffer","sha":"6cd9702b13aa139dbbb7c57f80c72da8a385a1cf","user":{"login":"eeckstein","id":15270291,"avatar_url":"https://avatars.githubusercontent.com/u/15270291?v=3","gravatar_id":"","url":"https://api.github.com/users/eeckstein","html_url":"https://github.com/eeckstein","followers_url":"https://api.github.com/users/eeckstein/followers","following_url":"https://api.github.com/users/eeckstein/following{/other_user}","gists_url":"https://api.github.com/users/eeckstein/gists{/gist_id}","starred_url":"https://api.github.com/users/eeckstein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eeckstein/subscriptions","organizations_url":"https://api.github.com/users/eeckstein/orgs","repos_url":"https://api.github.com/users/eeckstein/repos","events_url":"https://api.github.com/users/eeckstein/events{/privacy}","received_events_url":"https://api.github.com/users/eeckstein/received_events","type":"User","site_admin":false},"repo":{"id":52555464,"name":"swift","full_name":"eeckstein/swift","owner":{"login":"eeckstein","id":15270291,"avatar_url":"https://avatars.githubusercontent.com/u/15270291?v=3","gravatar_id":"","url":"https://api.github.com/users/eeckstein","html_url":"https://github.com/eeckstein","followers_url":"https://api.github.com/users/eeckstein/followers","following_url":"https://api.github.com/users/eeckstein/following{/other_user}","gists_url":"https://api.github.com/users/eeckstein/gists{/gist_id}","starred_url":"https://api.github.com/users/eeckstein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eeckstein/subscriptions","organizations_url":"https://api.github.com/users/eeckstein/orgs","repos_url":"https://api.github.com/users/eeckstein/repos","events_url":"https://api.github.com/users/eeckstein/events{/privacy}","received_events_url":"https://api.github.com/users/eeckstein/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/eeckstein/swift","description":"The Swift Programming Language","fork":true,"url":"https://api.github.com/repos/eeckstein/swift","forks_url":"https://api.github.com/repos/eeckstein/swift/forks","keys_url":"https://api.github.com/repos/eeckstein/swift/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eeckstein/swift/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eeckstein/swift/teams","hooks_url":"https://api.github.com/repos/eeckstein/swift/hooks","issue_events_url":"https://api.github.com/repos/eeckstein/swift/issues/events{/number}","events_url":"https://api.github.com/repos/eeckstein/swift/events","assignees_url":"https://api.github.com/repos/eeckstein/swift/assignees{/user}","branches_url":"https://api.github.com/repos/eeckstein/swift/branches{/branch}","tags_url":"https://api.github.com/repos/eeckstein/swift/tags","blobs_url":"https://api.github.com/repos/eeckstein/swift/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eeckstein/swift/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eeckstein/swift/git/refs{/sha}","trees_url":"https://api.github.com/repos/eeckstein/swift/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eeckstein/swift/statuses/{sha}","languages_url":"https://api.github.com/repos/eeckstein/swift/languages","stargazers_url":"https://api.github.com/repos/eeckstein/swift/stargazers","contributors_url":"https://api.github.com/repos/eeckstein/swift/contributors","subscribers_url":"https://api.github.com/repos/eeckstein/swift/subscribers","subscription_url":"https://api.github.com/repos/eeckstein/swift/subscription","commits_url":"https://api.github.com/repos/eeckstein/swift/commits{/sha}","git_commits_url":"https://api.github.com/repos/eeckstein/swift/git/commits{/sha}","comments_url":"https://api.github.com/repos/eeckstein/swift/comments{/number}","issue_comment_url":"https://api.github.com/repos/eeckstein/swift/issues/comments{/number}","contents_url":"https://api.github.com/repos/eeckstein/swift/contents/{+path}","compare_url":"https://api.github.com/repos/eeckstein/swift/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eeckstein/swift/merges","archive_url":"https://api.github.com/repos/eeckstein/swift/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eeckstein/swift/downloads","issues_url":"https://api.github.com/repos/eeckstein/swift/issues{/number}","pulls_url":"https://api.github.com/repos/eeckstein/swift/pulls{/number}","milestones_url":"https://api.github.com/repos/eeckstein/swift/milestones{/number}","notifications_url":"https://api.github.com/repos/eeckstein/swift/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eeckstein/swift/labels{/name}","releases_url":"https://api.github.com/repos/eeckstein/swift/releases{/id}","deployments_url":"https://api.github.com/repos/eeckstein/swift/deployments","created_at":"2016-02-25T20:42:45Z","updated_at":"2016-02-25T20:43:11Z","pushed_at":"2016-10-06T17:27:41Z","git_url":"git://github.com/eeckstein/swift.git","ssh_url":"git@github.com:eeckstein/swift.git","clone_url":"https://github.com/eeckstein/swift.git","svn_url":"https://github.com/eeckstein/swift","homepage":"https://swift.org/","size":121372,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apple:master","ref":"master","sha":"741c46b7691d15ab3961db230f96e3c39b1701c3","user":{"login":"apple","id":10639145,"avatar_url":"https://avatars.githubusercontent.com/u/10639145?v=3","gravatar_id":"","url":"https://api.github.com/users/apple","html_url":"https://github.com/apple","followers_url":"https://api.github.com/users/apple/followers","following_url":"https://api.github.com/users/apple/following{/other_user}","gists_url":"https://api.github.com/users/apple/gists{/gist_id}","starred_url":"https://api.github.com/users/apple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apple/subscriptions","organizations_url":"https://api.github.com/users/apple/orgs","repos_url":"https://api.github.com/users/apple/repos","events_url":"https://api.github.com/users/apple/events{/privacy}","received_events_url":"https://api.github.com/users/apple/received_events","type":"Organization","site_admin":false},"repo":{"id":44838949,"name":"swift","full_name":"apple/swift","owner":{"login":"apple","id":10639145,"avatar_url":"https://avatars.githubusercontent.com/u/10639145?v=3","gravatar_id":"","url":"https://api.github.com/users/apple","html_url":"https://github.com/apple","followers_url":"https://api.github.com/users/apple/followers","following_url":"https://api.github.com/users/apple/following{/other_user}","gists_url":"https://api.github.com/users/apple/gists{/gist_id}","starred_url":"https://api.github.com/users/apple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apple/subscriptions","organizations_url":"https://api.github.com/users/apple/orgs","repos_url":"https://api.github.com/users/apple/repos","events_url":"https://api.github.com/users/apple/events{/privacy}","received_events_url":"https://api.github.com/users/apple/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apple/swift","description":"The Swift Programming Language","fork":false,"url":"https://api.github.com/repos/apple/swift","forks_url":"https://api.github.com/repos/apple/swift/forks","keys_url":"https://api.github.com/repos/apple/swift/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apple/swift/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apple/swift/teams","hooks_url":"https://api.github.com/repos/apple/swift/hooks","issue_events_url":"https://api.github.com/repos/apple/swift/issues/events{/number}","events_url":"https://api.github.com/repos/apple/swift/events","assignees_url":"https://api.github.com/repos/apple/swift/assignees{/user}","branches_url":"https://api.github.com/repos/apple/swift/branches{/branch}","tags_url":"https://api.github.com/repos/apple/swift/tags","blobs_url":"https://api.github.com/repos/apple/swift/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apple/swift/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apple/swift/git/refs{/sha}","trees_url":"https://api.github.com/repos/apple/swift/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apple/swift/statuses/{sha}","languages_url":"https://api.github.com/repos/apple/swift/languages","stargazers_url":"https://api.github.com/repos/apple/swift/stargazers","contributors_url":"https://api.github.com/repos/apple/swift/contributors","subscribers_url":"https://api.github.com/repos/apple/swift/subscribers","subscription_url":"https://api.github.com/repos/apple/swift/subscription","commits_url":"https://api.github.com/repos/apple/swift/commits{/sha}","git_commits_url":"https://api.github.com/repos/apple/swift/git/commits{/sha}","comments_url":"https://api.github.com/repos/apple/swift/comments{/number}","issue_comment_url":"https://api.github.com/repos/apple/swift/issues/comments{/number}","contents_url":"https://api.github.com/repos/apple/swift/contents/{+path}","compare_url":"https://api.github.com/repos/apple/swift/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apple/swift/merges","archive_url":"https://api.github.com/repos/apple/swift/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apple/swift/downloads","issues_url":"https://api.github.com/repos/apple/swift/issues{/number}","pulls_url":"https://api.github.com/repos/apple/swift/pulls{/number}","milestones_url":"https://api.github.com/repos/apple/swift/milestones{/number}","notifications_url":"https://api.github.com/repos/apple/swift/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apple/swift/labels{/name}","releases_url":"https://api.github.com/repos/apple/swift/releases{/id}","deployments_url":"https://api.github.com/repos/apple/swift/deployments","created_at":"2015-10-23T21:15:07Z","updated_at":"2016-10-07T16:10:02Z","pushed_at":"2016-10-07T16:53:44Z","git_url":"git://github.com/apple/swift.git","ssh_url":"git@github.com:apple/swift.git","clone_url":"https://github.com/apple/swift.git","svn_url":"https://github.com/apple/swift","homepage":"https://swift.org/","size":187411,"stargazers_count":34350,"watchers_count":34350,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4900,"mirror_url":null,"open_issues_count":113,"forks":4900,"open_issues":113,"watchers":34350,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apple/swift/pulls/5153"},"html":{"href":"https://github.com/apple/swift/pull/5153"},"issue":{"href":"https://api.github.com/repos/apple/swift/issues/5153"},"comments":{"href":"https://api.github.com/repos/apple/swift/issues/5153/comments"},"review_comments":{"href":"https://api.github.com/repos/apple/swift/pulls/5153/comments"},"review_comment":{"href":"https://api.github.com/repos/apple/swift/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apple/swift/pulls/5153/commits"},"statuses":{"href":"https://api.github.com/repos/apple/swift/statuses/6cd9702b13aa139dbbb7c57f80c72da8a385a1cf"}}}}
{"actor":{"display_login":"eeckstein"}}