{"action":"created","comment":{"url":"https://api.github.com/repos/chapel-lang/chapel/pulls/comments/56907933","id":56907933,"diff_hunk":"@@ -1,29 +1,30 @@\n # Copyright 2004-2016 Cray Inc.\n # Other additional copyright holders may be indicated within.\n-# \n+#\n # The entirety of this work is licensed under the Apache License,\n # Version 2.0 (the \"License\"); you may not use this file except\n # in compliance with the License.\n-# \n+#\n # You may obtain a copy of the License at\n-# \n+#\n #     http://www.apache.org/licenses/LICENSE-2.0\n-# \n+#\n # Unless required by applicable law or agreed to in writing, software\n # distributed under the License is distributed on an \"AS IS\" BASIS,\n # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n # See the License for the specific language governing permissions and\n # limitations under the License.\n \n-RESOLUTION_SRCS = \\\n-\tcaches.cpp \\\n-\tcallDestructors.cpp \\\n-\tcallInfo.cpp \\\n-\tcullOverReferences.cpp \\\n-\timplementForallIntents.cpp \\\n-\tgenerics.cpp \\\n-\tfunctionResolution.cpp \\\n-\tlowerIterators.cpp \\\n+RESOLUTION_SRCS =                                    \\\n+        addAutoDestroyCalls.cpp                      \\\n+\tcaches.cpp                                   \\","path":"compiler/resolution/Makefile.share","position":33,"original_position":33,"commit_id":"3b1e6bc70701889824358b890abb594ca05cca9e","original_commit_id":"1b0316d7c4252b6eccfd39ce42b9a9dd1db11d28","user":{"login":"ronawho","id":1588337,"avatar_url":"https://avatars.githubusercontent.com/u/1588337?v=3","gravatar_id":"","url":"https://api.github.com/users/ronawho","html_url":"https://github.com/ronawho","followers_url":"https://api.github.com/users/ronawho/followers","following_url":"https://api.github.com/users/ronawho/following{/other_user}","gists_url":"https://api.github.com/users/ronawho/gists{/gist_id}","starred_url":"https://api.github.com/users/ronawho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ronawho/subscriptions","organizations_url":"https://api.github.com/users/ronawho/orgs","repos_url":"https://api.github.com/users/ronawho/repos","events_url":"https://api.github.com/users/ronawho/events{/privacy}","received_events_url":"https://api.github.com/users/ronawho/received_events","type":"User","site_admin":false},"body":"Not sure if you fixed this later, but I think these should remain tabs instead of spaces. ","created_at":"2016-03-21T22:21:34Z","updated_at":"2016-03-21T22:21:34Z","html_url":"https://github.com/chapel-lang/chapel/pull/3532#discussion_r56907933","pull_request_url":"https://api.github.com/repos/chapel-lang/chapel/pulls/3532","_links":{"self":{"href":"https://api.github.com/repos/chapel-lang/chapel/pulls/comments/56907933"},"html":{"href":"https://github.com/chapel-lang/chapel/pull/3532#discussion_r56907933"},"pull_request":{"href":"https://api.github.com/repos/chapel-lang/chapel/pulls/3532"}}},"pull_request":{"url":"https://api.github.com/repos/chapel-lang/chapel/pulls/3532","id":63641720,"html_url":"https://github.com/chapel-lang/chapel/pull/3532","diff_url":"https://github.com/chapel-lang/chapel/pull/3532.diff","patch_url":"https://github.com/chapel-lang/chapel/pull/3532.patch","issue_url":"https://api.github.com/repos/chapel-lang/chapel/issues/3532","number":3532,"state":"open","locked":false,"title":"Refactor the business logic that inserts calls to autoDestroy","user":{"login":"noakesmichael","id":2167206,"avatar_url":"https://avatars.githubusercontent.com/u/2167206?v=3","gravatar_id":"","url":"https://api.github.com/users/noakesmichael","html_url":"https://github.com/noakesmichael","followers_url":"https://api.github.com/users/noakesmichael/followers","following_url":"https://api.github.com/users/noakesmichael/following{/other_user}","gists_url":"https://api.github.com/users/noakesmichael/gists{/gist_id}","starred_url":"https://api.github.com/users/noakesmichael/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noakesmichael/subscriptions","organizations_url":"https://api.github.com/users/noakesmichael/orgs","repos_url":"https://api.github.com/users/noakesmichael/repos","events_url":"https://api.github.com/users/noakesmichael/events{/privacy}","received_events_url":"https://api.github.com/users/noakesmichael/received_events","type":"User","site_admin":false},"body":"In broad strokes the business logic is the same as before and the memory leak\r\nstatistics are largely unchanged.\r\n\r\nThe old implementation had three phases; two phases to prune auto-destroy flags and then a final \r\nphase to walk every block-stmt, independently and in arbitrary order, and determine which variables\r\nare live when control leaves the block.\r\n\r\nThe new implementation has two phases; it retains one of the prune steps and then walks\r\nfunctions independently and in arbitrary order.  For each function the nested block statements\r\nare processed by top-down recursion.\r\n\r\nThe original code was a little hard to follow and had the potential to leak for functions with\r\nmultiple returns; one of the two original prune functions removed the auto-destroy flag on\r\nevery variable that might be returned even though only one variable would be returned for\r\na given call.\r\n\r\n\r\n\r\nThis PR has reapplied the new business logic in a handful of commits and in a top down\r\nmanner that, I hope, makes it easier to follow the important elements of the overall business\r\nlogic.  The code does not work until nearly all of the commits are applied.\r\n\r\n\r\nThis has been compiled with/without CHPL_DEVELOPER on clang and gcc and has been\r\ntested on linux64 and gasnet.  I have also inspected the memory leak reports.  The new code\r\nfixes a few leaks but has not had a major impact; neither for better or worse.\r\n\r\n","created_at":"2016-03-21T22:18:31Z","updated_at":"2016-03-21T22:21:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f47e3bcc3c83c57097ccaaed6fabfe4340d395b2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/chapel-lang/chapel/pulls/3532/commits","review_comments_url":"https://api.github.com/repos/chapel-lang/chapel/pulls/3532/comments","review_comment_url":"https://api.github.com/repos/chapel-lang/chapel/pulls/comments{/number}","comments_url":"https://api.github.com/repos/chapel-lang/chapel/issues/3532/comments","statuses_url":"https://api.github.com/repos/chapel-lang/chapel/statuses/3b1e6bc70701889824358b890abb594ca05cca9e","head":{"label":"noakesmichael:auto-destroy","ref":"auto-destroy","sha":"3b1e6bc70701889824358b890abb594ca05cca9e","user":{"login":"noakesmichael","id":2167206,"avatar_url":"https://avatars.githubusercontent.com/u/2167206?v=3","gravatar_id":"","url":"https://api.github.com/users/noakesmichael","html_url":"https://github.com/noakesmichael","followers_url":"https://api.github.com/users/noakesmichael/followers","following_url":"https://api.github.com/users/noakesmichael/following{/other_user}","gists_url":"https://api.github.com/users/noakesmichael/gists{/gist_id}","starred_url":"https://api.github.com/users/noakesmichael/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noakesmichael/subscriptions","organizations_url":"https://api.github.com/users/noakesmichael/orgs","repos_url":"https://api.github.com/users/noakesmichael/repos","events_url":"https://api.github.com/users/noakesmichael/events{/privacy}","received_events_url":"https://api.github.com/users/noakesmichael/received_events","type":"User","site_admin":false},"repo":{"id":22014778,"name":"chapel","full_name":"noakesmichael/chapel","owner":{"login":"noakesmichael","id":2167206,"avatar_url":"https://avatars.githubusercontent.com/u/2167206?v=3","gravatar_id":"","url":"https://api.github.com/users/noakesmichael","html_url":"https://github.com/noakesmichael","followers_url":"https://api.github.com/users/noakesmichael/followers","following_url":"https://api.github.com/users/noakesmichael/following{/other_user}","gists_url":"https://api.github.com/users/noakesmichael/gists{/gist_id}","starred_url":"https://api.github.com/users/noakesmichael/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noakesmichael/subscriptions","organizations_url":"https://api.github.com/users/noakesmichael/orgs","repos_url":"https://api.github.com/users/noakesmichael/repos","events_url":"https://api.github.com/users/noakesmichael/events{/privacy}","received_events_url":"https://api.github.com/users/noakesmichael/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/noakesmichael/chapel","description":"a Productive Parallel Programming Language","fork":true,"url":"https://api.github.com/repos/noakesmichael/chapel","forks_url":"https://api.github.com/repos/noakesmichael/chapel/forks","keys_url":"https://api.github.com/repos/noakesmichael/chapel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/noakesmichael/chapel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/noakesmichael/chapel/teams","hooks_url":"https://api.github.com/repos/noakesmichael/chapel/hooks","issue_events_url":"https://api.github.com/repos/noakesmichael/chapel/issues/events{/number}","events_url":"https://api.github.com/repos/noakesmichael/chapel/events","assignees_url":"https://api.github.com/repos/noakesmichael/chapel/assignees{/user}","branches_url":"https://api.github.com/repos/noakesmichael/chapel/branches{/branch}","tags_url":"https://api.github.com/repos/noakesmichael/chapel/tags","blobs_url":"https://api.github.com/repos/noakesmichael/chapel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/noakesmichael/chapel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/noakesmichael/chapel/git/refs{/sha}","trees_url":"https://api.github.com/repos/noakesmichael/chapel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/noakesmichael/chapel/statuses/{sha}","languages_url":"https://api.github.com/repos/noakesmichael/chapel/languages","stargazers_url":"https://api.github.com/repos/noakesmichael/chapel/stargazers","contributors_url":"https://api.github.com/repos/noakesmichael/chapel/contributors","subscribers_url":"https://api.github.com/repos/noakesmichael/chapel/subscribers","subscription_url":"https://api.github.com/repos/noakesmichael/chapel/subscription","commits_url":"https://api.github.com/repos/noakesmichael/chapel/commits{/sha}","git_commits_url":"https://api.github.com/repos/noakesmichael/chapel/git/commits{/sha}","comments_url":"https://api.github.com/repos/noakesmichael/chapel/comments{/number}","issue_comment_url":"https://api.github.com/repos/noakesmichael/chapel/issues/comments{/number}","contents_url":"https://api.github.com/repos/noakesmichael/chapel/contents/{+path}","compare_url":"https://api.github.com/repos/noakesmichael/chapel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/noakesmichael/chapel/merges","archive_url":"https://api.github.com/repos/noakesmichael/chapel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/noakesmichael/chapel/downloads","issues_url":"https://api.github.com/repos/noakesmichael/chapel/issues{/number}","pulls_url":"https://api.github.com/repos/noakesmichael/chapel/pulls{/number}","milestones_url":"https://api.github.com/repos/noakesmichael/chapel/milestones{/number}","notifications_url":"https://api.github.com/repos/noakesmichael/chapel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/noakesmichael/chapel/labels{/name}","releases_url":"https://api.github.com/repos/noakesmichael/chapel/releases{/id}","deployments_url":"https://api.github.com/repos/noakesmichael/chapel/deployments","created_at":"2014-07-19T17:11:34Z","updated_at":"2016-01-12T14:33:32Z","pushed_at":"2016-03-21T21:46:41Z","git_url":"git://github.com/noakesmichael/chapel.git","ssh_url":"git@github.com:noakesmichael/chapel.git","clone_url":"https://github.com/noakesmichael/chapel.git","svn_url":"https://github.com/noakesmichael/chapel","homepage":"http://chapel.cray.com/","size":352658,"stargazers_count":0,"watchers_count":0,"language":"Chapel","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":"chapel-lang:master","ref":"master","sha":"313e12e23fe4fadd45523de2ae9273748c9c440a","user":{"login":"chapel-lang","id":7597261,"avatar_url":"https://avatars.githubusercontent.com/u/7597261?v=3","gravatar_id":"","url":"https://api.github.com/users/chapel-lang","html_url":"https://github.com/chapel-lang","followers_url":"https://api.github.com/users/chapel-lang/followers","following_url":"https://api.github.com/users/chapel-lang/following{/other_user}","gists_url":"https://api.github.com/users/chapel-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/chapel-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chapel-lang/subscriptions","organizations_url":"https://api.github.com/users/chapel-lang/orgs","repos_url":"https://api.github.com/users/chapel-lang/repos","events_url":"https://api.github.com/users/chapel-lang/events{/privacy}","received_events_url":"https://api.github.com/users/chapel-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":21663285,"name":"chapel","full_name":"chapel-lang/chapel","owner":{"login":"chapel-lang","id":7597261,"avatar_url":"https://avatars.githubusercontent.com/u/7597261?v=3","gravatar_id":"","url":"https://api.github.com/users/chapel-lang","html_url":"https://github.com/chapel-lang","followers_url":"https://api.github.com/users/chapel-lang/followers","following_url":"https://api.github.com/users/chapel-lang/following{/other_user}","gists_url":"https://api.github.com/users/chapel-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/chapel-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chapel-lang/subscriptions","organizations_url":"https://api.github.com/users/chapel-lang/orgs","repos_url":"https://api.github.com/users/chapel-lang/repos","events_url":"https://api.github.com/users/chapel-lang/events{/privacy}","received_events_url":"https://api.github.com/users/chapel-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/chapel-lang/chapel","description":"a Productive Parallel Programming Language","fork":false,"url":"https://api.github.com/repos/chapel-lang/chapel","forks_url":"https://api.github.com/repos/chapel-lang/chapel/forks","keys_url":"https://api.github.com/repos/chapel-lang/chapel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chapel-lang/chapel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chapel-lang/chapel/teams","hooks_url":"https://api.github.com/repos/chapel-lang/chapel/hooks","issue_events_url":"https://api.github.com/repos/chapel-lang/chapel/issues/events{/number}","events_url":"https://api.github.com/repos/chapel-lang/chapel/events","assignees_url":"https://api.github.com/repos/chapel-lang/chapel/assignees{/user}","branches_url":"https://api.github.com/repos/chapel-lang/chapel/branches{/branch}","tags_url":"https://api.github.com/repos/chapel-lang/chapel/tags","blobs_url":"https://api.github.com/repos/chapel-lang/chapel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chapel-lang/chapel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chapel-lang/chapel/git/refs{/sha}","trees_url":"https://api.github.com/repos/chapel-lang/chapel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chapel-lang/chapel/statuses/{sha}","languages_url":"https://api.github.com/repos/chapel-lang/chapel/languages","stargazers_url":"https://api.github.com/repos/chapel-lang/chapel/stargazers","contributors_url":"https://api.github.com/repos/chapel-lang/chapel/contributors","subscribers_url":"https://api.github.com/repos/chapel-lang/chapel/subscribers","subscription_url":"https://api.github.com/repos/chapel-lang/chapel/subscription","commits_url":"https://api.github.com/repos/chapel-lang/chapel/commits{/sha}","git_commits_url":"https://api.github.com/repos/chapel-lang/chapel/git/commits{/sha}","comments_url":"https://api.github.com/repos/chapel-lang/chapel/comments{/number}","issue_comment_url":"https://api.github.com/repos/chapel-lang/chapel/issues/comments{/number}","contents_url":"https://api.github.com/repos/chapel-lang/chapel/contents/{+path}","compare_url":"https://api.github.com/repos/chapel-lang/chapel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chapel-lang/chapel/merges","archive_url":"https://api.github.com/repos/chapel-lang/chapel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chapel-lang/chapel/downloads","issues_url":"https://api.github.com/repos/chapel-lang/chapel/issues{/number}","pulls_url":"https://api.github.com/repos/chapel-lang/chapel/pulls{/number}","milestones_url":"https://api.github.com/repos/chapel-lang/chapel/milestones{/number}","notifications_url":"https://api.github.com/repos/chapel-lang/chapel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chapel-lang/chapel/labels{/name}","releases_url":"https://api.github.com/repos/chapel-lang/chapel/releases{/id}","deployments_url":"https://api.github.com/repos/chapel-lang/chapel/deployments","created_at":"2014-07-09T18:15:54Z","updated_at":"2016-03-18T19:11:00Z","pushed_at":"2016-03-21T22:18:32Z","git_url":"git://github.com/chapel-lang/chapel.git","ssh_url":"git@github.com:chapel-lang/chapel.git","clone_url":"https://github.com/chapel-lang/chapel.git","svn_url":"https://github.com/chapel-lang/chapel","homepage":"http://chapel.cray.com/","size":445658,"stargazers_count":228,"watchers_count":228,"language":"Chapel","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":91,"mirror_url":null,"open_issues_count":12,"forks":91,"open_issues":12,"watchers":228,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/chapel-lang/chapel/pulls/3532"},"html":{"href":"https://github.com/chapel-lang/chapel/pull/3532"},"issue":{"href":"https://api.github.com/repos/chapel-lang/chapel/issues/3532"},"comments":{"href":"https://api.github.com/repos/chapel-lang/chapel/issues/3532/comments"},"review_comments":{"href":"https://api.github.com/repos/chapel-lang/chapel/pulls/3532/comments"},"review_comment":{"href":"https://api.github.com/repos/chapel-lang/chapel/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/chapel-lang/chapel/pulls/3532/commits"},"statuses":{"href":"https://api.github.com/repos/chapel-lang/chapel/statuses/3b1e6bc70701889824358b890abb594ca05cca9e"}}}}