{"action":"created","comment":{"url":"https://api.github.com/repos/benharsh/chapel/pulls/comments/82421481","pull_request_review_id":3332697,"id":82421481,"diff_hunk":"@@ -71,4 +71,4 @@ proc test(A, ix1, ix2) {\n }\n \n test(Ab[1..n, 1..3],           (1,1), (2,2));\n-test(Ab[1..n by 3, 5..n by 2], (4,5), (7,7));\n+//currently not available: test(Ab[1..n by 3, 5..n by 2], (4,5), (7,7));","path":"test/distributions/dm/s8.chpl","position":5,"original_position":5,"commit_id":"ec464274de8efbe290db7283b4b675c2f672c5ff","original_commit_id":"c3575d6ea0c3dedb2617c49591aa192aaf57a9d1","user":{"login":"lydia-duncan","id":2454710,"avatar_url":"https://avatars.githubusercontent.com/u/2454710?v=3","gravatar_id":"","url":"https://api.github.com/users/lydia-duncan","html_url":"https://github.com/lydia-duncan","followers_url":"https://api.github.com/users/lydia-duncan/followers","following_url":"https://api.github.com/users/lydia-duncan/following{/other_user}","gists_url":"https://api.github.com/users/lydia-duncan/gists{/gist_id}","starred_url":"https://api.github.com/users/lydia-duncan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lydia-duncan/subscriptions","organizations_url":"https://api.github.com/users/lydia-duncan/orgs","repos_url":"https://api.github.com/users/lydia-duncan/repos","events_url":"https://api.github.com/users/lydia-duncan/events{/privacy}","received_events_url":"https://api.github.com/users/lydia-duncan/received_events","type":"User","site_admin":false},"body":"What's the plan on restoring this?","created_at":"2016-10-07T16:18:15Z","updated_at":"2016-10-07T16:18:15Z","html_url":"https://github.com/benharsh/chapel/pull/1#discussion_r82421481","pull_request_url":"https://api.github.com/repos/benharsh/chapel/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/benharsh/chapel/pulls/comments/82421481"},"html":{"href":"https://github.com/benharsh/chapel/pull/1#discussion_r82421481"},"pull_request":{"href":"https://api.github.com/repos/benharsh/chapel/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/benharsh/chapel/pulls/1","id":87001580,"html_url":"https://github.com/benharsh/chapel/pull/1","diff_url":"https://github.com/benharsh/chapel/pull/1.diff","patch_url":"https://github.com/benharsh/chapel/pull/1.patch","issue_url":"https://api.github.com/repos/benharsh/chapel/issues/1","number":1,"state":"open","locked":false,"title":"Arrays branch PR for reviewing","user":{"login":"mppf","id":3653132,"avatar_url":"https://avatars.githubusercontent.com/u/3653132?v=3","gravatar_id":"","url":"https://api.github.com/users/mppf","html_url":"https://github.com/mppf","followers_url":"https://api.github.com/users/mppf/followers","following_url":"https://api.github.com/users/mppf/following{/other_user}","gists_url":"https://api.github.com/users/mppf/gists{/gist_id}","starred_url":"https://api.github.com/users/mppf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mppf/subscriptions","organizations_url":"https://api.github.com/users/mppf/orgs","repos_url":"https://api.github.com/users/mppf/repos","events_url":"https://api.github.com/users/mppf/events{/privacy}","received_events_url":"https://api.github.com/users/mppf/received_events","type":"User","site_admin":false},"body":"This is NOT meant to be merged here; it's just a place for reviewers to make comments\r\n\r\n# Draft PR Message\r\n\r\n## Overview\r\n\r\nThis PR re-implements memory management for arrays, domains, and distributions. The changes mainly fall into these groups:\r\n * array-related compiler changes:\r\n * tuple changes\r\n * other enabling changes in the compiler\r\n * changes to module code for arrays/domains/distributions\r\n * other module code changes\r\n * test changes\r\n\r\n\r\n\r\n## User-facing behavior changes\r\n\r\nThis PR causes mainly three behavior changes:\r\n\r\n * Arrays are returned by value\r\n * Arrays, domains, and distributions are no longer kept allocated by a task using them\r\n * Arrays are no longer kept allocated by a slices\r\n\r\nThe first of these is a new decision for the language in order to make it more implementable and to make arrays more consistent with records and other types. The second and third are implied by the Lexical Scoping section in the Chapel Evolution document (http://chapel.cray.com/docs/latest/language/evolution.html#lexical-scoping).\r\n\r\nNote that while arrays return by value by default, the ref-return-intent or const-ref-return-intent can override that behavior.\r\n\r\nIn order to make these changes more achievable, it is not currently defined what happens when returning a slice form a function. Currently, such slices return without making a copy - and so it is possible to create core dumps by returning a slice of a local array.\r\n\r\n## Array-Related Compiler Changes\r\n\r\n- removing cases when an array wrapper record is shallow-copied in the compiler. Either the copy constructor should be called (which does a deep copy) or the variable in question should be a reference to the array (which does no copy and does not impact array lifetime). Now autoCopy and initCopy do the same thing for arrays, domains, and distributions. E.g. returning an _array causes the array to be returned by value, but returning a _ref(_array) causes it to be returned by reference.\r\n- adjusts the compiler to treat arrays, domains, and distributions similarly to user records and strings.\r\n- adds a workaround to make `var x => GlobalArray[1..10]` work\r\n- disables most of removeUnnecessaryAutoCopyCalls. Only autoCopy calls for POD types are removed. The rest of this pass should no longer be necessary since we now just do a better job at inserting the minimal number of autoCopies in the first place.\r\n- disables removeWrapRecords\r\n- remove _checkIterator because it is unnecessary and was causing problems with arrays\r\n- normalize: remove special treatment for iterators with declared array return type\r\n- parallel: remove special handling for arrays\r\n- addAutoDestroyCalls: check for FLAG_NO_AUTO_DESTROY before adding an autoDestroy call. This flag is useful in some special code to do with arrays/domains/distributions.\r\n- cullOverReferences: delete code that would remove references to array/domain/dist wrapper records since now the difference between _array and _ref(_array) is critical.\r\n- (see description of array module changes) changed _array/_domain/_distribution field _valueType to _instance.\r\n- wrappers: adjustments to array alias fields in constructors. Also set argument type for promotion wrappers to array reference types.\r\n\r\n\r\n## Tuple Changes\r\n\r\n- re-implementing tuple functions in the compiler so that they can be adjusted appropriately. The problem was that _build_tuple was instantiated by varargs processing and was too hard to adjust in that context.\r\n- now the tuple constructor calls initCopy for elements captured by value.\r\n- now tuples capture arrays and records by reference in some situations and by value in others. The guiding principle here is that a 1-element tuple should behave similarly to just the element. So a tuple passed by blank intent captures arrays and records by ref, since these are passed by reference when passed by blank intent. A returned tuple captures arrays and records by value, since these are returned by value.\r\n- tuple functions to be filled in by the compiler have flags in some cases to identify them and are saved into global variables by filesToAST or in scopeResolve if the relevant functions are created there.\r\n- tuples now have an 'unref' function which is used to implement converting a tuple from a tuple containing references to one containing only values when returning.\r\n- in getNewSubType, rewrote it to be clearer what is going on\r\n\r\n\r\n## Other Enabling Changes in the Compiler\r\n\r\nenabling ref changes:\r\n\r\n  - deadCodeElimination: isDeadVariable checks uses ->isRef instead of checking flag\r\n  - removeValueForwarding: forward array/domain/distribution values\r\n  - insertWideReferences: fixes for references\r\n  - parallel: adjust makeHeapAllocations not to remove autoDestroy functions and to not make copies of arguments passed by blank-intent-is-ref.\r\n\r\niterator changes:\r\n\r\n  - removing _checkIterator\r\n  - iterators capture arrays, domains, distributions by reference\r\n\r\n\r\n## Changes to module code for arrays/domains/distributions\r\n\r\n- _array/_domain/_distribution now have _instance and _pid fields instead of _value and _valueType fields. This enables destruction of privatized objects since we can tell them apart.\r\n- adds dsiDestroyDist/dsiDestroyDom/dsiDestroyArr\r\n- moves pid field from DSI implementors to BaseDist/BaseDom/BaseArr\r\n- adds dsiSingleton, dsiMyDist\r\n- removes _value and _valueType from _distribution/_domain/_array; adds _pid, _instance, and _unowned fields instead\r\n- removes BaseDist/Dom/Arr _distCnt/_domCnt/_arrCnt. There is no array reference counter now. Domain and distribution generally use the number of elements in their list of arrays and domains respectively. Domains also have a counter _arrs_containing_dom, but this only is used for a bug fix for arrays-of-arrays.\r\n- Since destroying an array/domain/dist can cause other objects to need to be destroyed, but the implementation (with the DSI interface) might need to take action on the destruction, the process of destruction generally works in two phases: 1) remove objects from the tree (e.g. removing a domain from its distribution) and figure out any follow-on objects that must be destroyed (e.g. when removing the last domain in a distribution). 2) call dsiDestroy on the destoyed object. 3) destroy any follow-on objects and call dsiDestroy on them too in the process.\r\n\r\n## Other Changes to Module code\r\n\r\n- changes to track tuple re-implementation\r\n- removal of _checkIterator\r\n- simplified locale initialization by using a DummyLocale class for 'here' while the locale hierarchy is being initialized.\r\n\r\n## Test Changes\r\n\r\n-  removing the \"assignment has been serialized\" warning in many tests. The reason is that the warning is no longer useful because it occurs any time e.g. associative array variables are declared. That is now happening because the autoCopy function for these arrays is being resolved since the compiler might add calls to it, and now this autoCopy function can perform a deep copy.\r\n- add quite a few array semantics & leak checks in test/arrays/ferguson/semantic-examples\r\n- new tests of new tuple behavior in test/types/tuple/ferguson\r\n- other minor changes to tests; see individual commit messages\r\n","created_at":"2016-09-27T20:05:16Z","updated_at":"2016-10-07T16:18:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"63178eea8d03ef8bfeaab0e51b9b232216d77c3b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/benharsh/chapel/pulls/1/commits","review_comments_url":"https://api.github.com/repos/benharsh/chapel/pulls/1/comments","review_comment_url":"https://api.github.com/repos/benharsh/chapel/pulls/comments{/number}","comments_url":"https://api.github.com/repos/benharsh/chapel/issues/1/comments","statuses_url":"https://api.github.com/repos/benharsh/chapel/statuses/ec464274de8efbe290db7283b4b675c2f672c5ff","head":{"label":"mppf:distribution-no-rc3","ref":"distribution-no-rc3","sha":"ec464274de8efbe290db7283b4b675c2f672c5ff","user":{"login":"mppf","id":3653132,"avatar_url":"https://avatars.githubusercontent.com/u/3653132?v=3","gravatar_id":"","url":"https://api.github.com/users/mppf","html_url":"https://github.com/mppf","followers_url":"https://api.github.com/users/mppf/followers","following_url":"https://api.github.com/users/mppf/following{/other_user}","gists_url":"https://api.github.com/users/mppf/gists{/gist_id}","starred_url":"https://api.github.com/users/mppf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mppf/subscriptions","organizations_url":"https://api.github.com/users/mppf/orgs","repos_url":"https://api.github.com/users/mppf/repos","events_url":"https://api.github.com/users/mppf/events{/privacy}","received_events_url":"https://api.github.com/users/mppf/received_events","type":"User","site_admin":false},"repo":{"id":22106313,"name":"chapel","full_name":"mppf/chapel","owner":{"login":"mppf","id":3653132,"avatar_url":"https://avatars.githubusercontent.com/u/3653132?v=3","gravatar_id":"","url":"https://api.github.com/users/mppf","html_url":"https://github.com/mppf","followers_url":"https://api.github.com/users/mppf/followers","following_url":"https://api.github.com/users/mppf/following{/other_user}","gists_url":"https://api.github.com/users/mppf/gists{/gist_id}","starred_url":"https://api.github.com/users/mppf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mppf/subscriptions","organizations_url":"https://api.github.com/users/mppf/orgs","repos_url":"https://api.github.com/users/mppf/repos","events_url":"https://api.github.com/users/mppf/events{/privacy}","received_events_url":"https://api.github.com/users/mppf/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mppf/chapel","description":"a Productive Parallel Programming Language","fork":true,"url":"https://api.github.com/repos/mppf/chapel","forks_url":"https://api.github.com/repos/mppf/chapel/forks","keys_url":"https://api.github.com/repos/mppf/chapel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mppf/chapel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mppf/chapel/teams","hooks_url":"https://api.github.com/repos/mppf/chapel/hooks","issue_events_url":"https://api.github.com/repos/mppf/chapel/issues/events{/number}","events_url":"https://api.github.com/repos/mppf/chapel/events","assignees_url":"https://api.github.com/repos/mppf/chapel/assignees{/user}","branches_url":"https://api.github.com/repos/mppf/chapel/branches{/branch}","tags_url":"https://api.github.com/repos/mppf/chapel/tags","blobs_url":"https://api.github.com/repos/mppf/chapel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mppf/chapel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mppf/chapel/git/refs{/sha}","trees_url":"https://api.github.com/repos/mppf/chapel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mppf/chapel/statuses/{sha}","languages_url":"https://api.github.com/repos/mppf/chapel/languages","stargazers_url":"https://api.github.com/repos/mppf/chapel/stargazers","contributors_url":"https://api.github.com/repos/mppf/chapel/contributors","subscribers_url":"https://api.github.com/repos/mppf/chapel/subscribers","subscription_url":"https://api.github.com/repos/mppf/chapel/subscription","commits_url":"https://api.github.com/repos/mppf/chapel/commits{/sha}","git_commits_url":"https://api.github.com/repos/mppf/chapel/git/commits{/sha}","comments_url":"https://api.github.com/repos/mppf/chapel/comments{/number}","issue_comment_url":"https://api.github.com/repos/mppf/chapel/issues/comments{/number}","contents_url":"https://api.github.com/repos/mppf/chapel/contents/{+path}","compare_url":"https://api.github.com/repos/mppf/chapel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mppf/chapel/merges","archive_url":"https://api.github.com/repos/mppf/chapel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mppf/chapel/downloads","issues_url":"https://api.github.com/repos/mppf/chapel/issues{/number}","pulls_url":"https://api.github.com/repos/mppf/chapel/pulls{/number}","milestones_url":"https://api.github.com/repos/mppf/chapel/milestones{/number}","notifications_url":"https://api.github.com/repos/mppf/chapel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mppf/chapel/labels{/name}","releases_url":"https://api.github.com/repos/mppf/chapel/releases{/id}","deployments_url":"https://api.github.com/repos/mppf/chapel/deployments","created_at":"2014-07-22T14:05:45Z","updated_at":"2016-01-11T15:01:10Z","pushed_at":"2016-10-07T15:29:11Z","git_url":"git://github.com/mppf/chapel.git","ssh_url":"git@github.com:mppf/chapel.git","clone_url":"https://github.com/mppf/chapel.git","svn_url":"https://github.com/mppf/chapel","homepage":"http://chapel.cray.com/","size":467154,"stargazers_count":1,"watchers_count":1,"language":"Chapel","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"benharsh:ben-blank-ref-intent","ref":"ben-blank-ref-intent","sha":"e879b22d126daa298566779c4bb949d386bd732a","user":{"login":"benharsh","id":1883119,"avatar_url":"https://avatars.githubusercontent.com/u/1883119?v=3","gravatar_id":"","url":"https://api.github.com/users/benharsh","html_url":"https://github.com/benharsh","followers_url":"https://api.github.com/users/benharsh/followers","following_url":"https://api.github.com/users/benharsh/following{/other_user}","gists_url":"https://api.github.com/users/benharsh/gists{/gist_id}","starred_url":"https://api.github.com/users/benharsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benharsh/subscriptions","organizations_url":"https://api.github.com/users/benharsh/orgs","repos_url":"https://api.github.com/users/benharsh/repos","events_url":"https://api.github.com/users/benharsh/events{/privacy}","received_events_url":"https://api.github.com/users/benharsh/received_events","type":"User","site_admin":false},"repo":{"id":21908961,"name":"chapel","full_name":"benharsh/chapel","owner":{"login":"benharsh","id":1883119,"avatar_url":"https://avatars.githubusercontent.com/u/1883119?v=3","gravatar_id":"","url":"https://api.github.com/users/benharsh","html_url":"https://github.com/benharsh","followers_url":"https://api.github.com/users/benharsh/followers","following_url":"https://api.github.com/users/benharsh/following{/other_user}","gists_url":"https://api.github.com/users/benharsh/gists{/gist_id}","starred_url":"https://api.github.com/users/benharsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benharsh/subscriptions","organizations_url":"https://api.github.com/users/benharsh/orgs","repos_url":"https://api.github.com/users/benharsh/repos","events_url":"https://api.github.com/users/benharsh/events{/privacy}","received_events_url":"https://api.github.com/users/benharsh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/benharsh/chapel","description":"a Productive Parallel Programming Language","fork":true,"url":"https://api.github.com/repos/benharsh/chapel","forks_url":"https://api.github.com/repos/benharsh/chapel/forks","keys_url":"https://api.github.com/repos/benharsh/chapel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/benharsh/chapel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/benharsh/chapel/teams","hooks_url":"https://api.github.com/repos/benharsh/chapel/hooks","issue_events_url":"https://api.github.com/repos/benharsh/chapel/issues/events{/number}","events_url":"https://api.github.com/repos/benharsh/chapel/events","assignees_url":"https://api.github.com/repos/benharsh/chapel/assignees{/user}","branches_url":"https://api.github.com/repos/benharsh/chapel/branches{/branch}","tags_url":"https://api.github.com/repos/benharsh/chapel/tags","blobs_url":"https://api.github.com/repos/benharsh/chapel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/benharsh/chapel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/benharsh/chapel/git/refs{/sha}","trees_url":"https://api.github.com/repos/benharsh/chapel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/benharsh/chapel/statuses/{sha}","languages_url":"https://api.github.com/repos/benharsh/chapel/languages","stargazers_url":"https://api.github.com/repos/benharsh/chapel/stargazers","contributors_url":"https://api.github.com/repos/benharsh/chapel/contributors","subscribers_url":"https://api.github.com/repos/benharsh/chapel/subscribers","subscription_url":"https://api.github.com/repos/benharsh/chapel/subscription","commits_url":"https://api.github.com/repos/benharsh/chapel/commits{/sha}","git_commits_url":"https://api.github.com/repos/benharsh/chapel/git/commits{/sha}","comments_url":"https://api.github.com/repos/benharsh/chapel/comments{/number}","issue_comment_url":"https://api.github.com/repos/benharsh/chapel/issues/comments{/number}","contents_url":"https://api.github.com/repos/benharsh/chapel/contents/{+path}","compare_url":"https://api.github.com/repos/benharsh/chapel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/benharsh/chapel/merges","archive_url":"https://api.github.com/repos/benharsh/chapel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/benharsh/chapel/downloads","issues_url":"https://api.github.com/repos/benharsh/chapel/issues{/number}","pulls_url":"https://api.github.com/repos/benharsh/chapel/pulls{/number}","milestones_url":"https://api.github.com/repos/benharsh/chapel/milestones{/number}","notifications_url":"https://api.github.com/repos/benharsh/chapel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/benharsh/chapel/labels{/name}","releases_url":"https://api.github.com/repos/benharsh/chapel/releases{/id}","deployments_url":"https://api.github.com/repos/benharsh/chapel/deployments","created_at":"2014-07-16T16:46:13Z","updated_at":"2016-01-15T18:14:15Z","pushed_at":"2016-10-07T15:29:12Z","git_url":"git://github.com/benharsh/chapel.git","ssh_url":"git@github.com:benharsh/chapel.git","clone_url":"https://github.com/benharsh/chapel.git","svn_url":"https://github.com/benharsh/chapel","homepage":"http://chapel.cray.com/","size":388454,"stargazers_count":1,"watchers_count":1,"language":"Chapel","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/benharsh/chapel/pulls/1"},"html":{"href":"https://github.com/benharsh/chapel/pull/1"},"issue":{"href":"https://api.github.com/repos/benharsh/chapel/issues/1"},"comments":{"href":"https://api.github.com/repos/benharsh/chapel/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/benharsh/chapel/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/benharsh/chapel/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/benharsh/chapel/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/benharsh/chapel/statuses/ec464274de8efbe290db7283b4b675c2f672c5ff"}}}}
{"actor":{"display_login":"lydia-duncan"}}