{"action":"created","comment":{"url":"https://api.github.com/repos/chapel-lang/chapel/pulls/comments/25282453","id":25282453,"diff_hunk":"@@ -412,14 +456,16 @@ buildZip1(IteratorInfo* ii, Vec<BaseAST*>& asts, BlockStmt* singleLoop) {\n   }\n \n   if (WhileStmt* stmt = toWhileStmt(singleLoop)) {\n+    // By the time we get here, the condExpr has been passed through _cond_test\n+    // and the result stored in a temp, so condExprForTmpVariableGet just\n+    // returns the temp result.  So we can simply say:  (.= this more tmp)\n+    // This assumes the backend will implicitly cast tmp to the type of more","path":"compiler/AST/iterator.cpp","position":130,"original_position":130,"commit_id":"dbee01d027f459a442d249314030e7d71591c989","original_commit_id":"dbee01d027f459a442d249314030e7d71591c989","user":{"login":"hildeth","id":7853742,"avatar_url":"https://avatars.githubusercontent.com/u/7853742?v=3","gravatar_id":"","url":"https://api.github.com/users/hildeth","html_url":"https://github.com/hildeth","followers_url":"https://api.github.com/users/hildeth/followers","following_url":"https://api.github.com/users/hildeth/following{/other_user}","gists_url":"https://api.github.com/users/hildeth/gists{/gist_id}","starred_url":"https://api.github.com/users/hildeth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hildeth/subscriptions","organizations_url":"https://api.github.com/users/hildeth/orgs","repos_url":"https://api.github.com/users/hildeth/repos","events_url":"https://api.github.com/users/hildeth/events{/privacy}","received_events_url":"https://api.github.com/users/hildeth/received_events","type":"User","site_admin":false},"body":"The assumption is verified for the C backend.  There is a checkbox in the pull request comment to ensure that it is also true for LLVM.  Both C and C++ specs are fairly explicit about \"false\" having an internal representation of 0 and \"true\" of 1.  You have to read a bit into the section on integral promotion to come to the conclusion that promoting a bool to int yields those same values, but that's my interpretation.  Any other behavior would be surprising.  ~hilde/Specifications/isoiec9899-tc3.pdf [6.3.1(2)].","created_at":"2015-02-24T19:16:10Z","updated_at":"2015-02-24T19:16:10Z","html_url":"https://github.com/chapel-lang/chapel/pull/1363#discussion_r25282453","pull_request_url":"https://api.github.com/repos/chapel-lang/chapel/pulls/1363","_links":{"self":{"href":"https://api.github.com/repos/chapel-lang/chapel/pulls/comments/25282453"},"html":{"href":"https://github.com/chapel-lang/chapel/pull/1363#discussion_r25282453"},"pull_request":{"href":"https://api.github.com/repos/chapel-lang/chapel/pulls/1363"}}},"pull_request":{"url":"https://api.github.com/repos/chapel-lang/chapel/pulls/1363","id":29738777,"html_url":"https://github.com/chapel-lang/chapel/pull/1363","diff_url":"https://github.com/chapel-lang/chapel/pull/1363.diff","patch_url":"https://github.com/chapel-lang/chapel/pull/1363.patch","issue_url":"https://api.github.com/repos/chapel-lang/chapel/issues/1363","number":1363,"state":"open","locked":false,"title":"Massage and comment iterators","user":{"login":"hildeth","id":7853742,"avatar_url":"https://avatars.githubusercontent.com/u/7853742?v=3","gravatar_id":"","url":"https://api.github.com/users/hildeth","html_url":"https://github.com/hildeth","followers_url":"https://api.github.com/users/hildeth/followers","following_url":"https://api.github.com/users/hildeth/following{/other_user}","gists_url":"https://api.github.com/users/hildeth/gists{/gist_id}","starred_url":"https://api.github.com/users/hildeth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hildeth/subscriptions","organizations_url":"https://api.github.com/users/hildeth/orgs","repos_url":"https://api.github.com/users/hildeth/repos","events_url":"https://api.github.com/users/hildeth/events{/privacy}","received_events_url":"https://api.github.com/users/hildeth/received_events","type":"User","site_admin":false},"body":"Mostly added comments to aid in my understanding of iterator lowering.\r\n\r\nIn some places, modified the form of the code for clarity.\r\n\r\nThe substantial changes are:\r\n1. In buildZip1 (l.465 new) and buildZip3 (l.556 new), I replaced the verbose\r\n    if (condExpr) (.= this \"more\" 1)\r\n    else (.= this \"more\" 0)\r\n  with\r\n    (.= this \"more\" condExpr)\r\n2. Replaced the multi-clause test on loop types in isSingleLoopIterator() with a dynamic_cast<>() call.  This clarifies that we really want to apply the test to all loop types, but the WhileDo loop is currently treated specially.\r\n3. Factored the setting of FLAG_RESOLVED from protoIteratorClass to protoIteratorMethod.\r\n\r\nThe remaining code changes are purely formal and mechanical.  That is to say, an automaton armed with a suitably rich set of isobehavioral transformations could have done the same thing.  Arguably, change 3 also falls into that category.\r\n\r\n[x] Full regression testing with --verify enabled.\r\n[ ] LLVM testing is required for the first substantial change.","created_at":"2015-02-20T22:55:39Z","updated_at":"2015-02-24T19:16:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2683e92664b59bebb503b1465f8f6a98cf5a8e6e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/chapel-lang/chapel/pulls/1363/commits","review_comments_url":"https://api.github.com/repos/chapel-lang/chapel/pulls/1363/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/1363/comments","statuses_url":"https://api.github.com/repos/chapel-lang/chapel/statuses/dbee01d027f459a442d249314030e7d71591c989","head":{"label":"hildeth:massageAndCommentIterators","ref":"massageAndCommentIterators","sha":"dbee01d027f459a442d249314030e7d71591c989","user":{"login":"hildeth","id":7853742,"avatar_url":"https://avatars.githubusercontent.com/u/7853742?v=3","gravatar_id":"","url":"https://api.github.com/users/hildeth","html_url":"https://github.com/hildeth","followers_url":"https://api.github.com/users/hildeth/followers","following_url":"https://api.github.com/users/hildeth/following{/other_user}","gists_url":"https://api.github.com/users/hildeth/gists{/gist_id}","starred_url":"https://api.github.com/users/hildeth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hildeth/subscriptions","organizations_url":"https://api.github.com/users/hildeth/orgs","repos_url":"https://api.github.com/users/hildeth/repos","events_url":"https://api.github.com/users/hildeth/events{/privacy}","received_events_url":"https://api.github.com/users/hildeth/received_events","type":"User","site_admin":false},"repo":{"id":21909706,"name":"chapel","full_name":"hildeth/chapel","owner":{"login":"hildeth","id":7853742,"avatar_url":"https://avatars.githubusercontent.com/u/7853742?v=3","gravatar_id":"","url":"https://api.github.com/users/hildeth","html_url":"https://github.com/hildeth","followers_url":"https://api.github.com/users/hildeth/followers","following_url":"https://api.github.com/users/hildeth/following{/other_user}","gists_url":"https://api.github.com/users/hildeth/gists{/gist_id}","starred_url":"https://api.github.com/users/hildeth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hildeth/subscriptions","organizations_url":"https://api.github.com/users/hildeth/orgs","repos_url":"https://api.github.com/users/hildeth/repos","events_url":"https://api.github.com/users/hildeth/events{/privacy}","received_events_url":"https://api.github.com/users/hildeth/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hildeth/chapel","description":"a Productive Parallel Programming Language","fork":true,"url":"https://api.github.com/repos/hildeth/chapel","forks_url":"https://api.github.com/repos/hildeth/chapel/forks","keys_url":"https://api.github.com/repos/hildeth/chapel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hildeth/chapel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hildeth/chapel/teams","hooks_url":"https://api.github.com/repos/hildeth/chapel/hooks","issue_events_url":"https://api.github.com/repos/hildeth/chapel/issues/events{/number}","events_url":"https://api.github.com/repos/hildeth/chapel/events","assignees_url":"https://api.github.com/repos/hildeth/chapel/assignees{/user}","branches_url":"https://api.github.com/repos/hildeth/chapel/branches{/branch}","tags_url":"https://api.github.com/repos/hildeth/chapel/tags","blobs_url":"https://api.github.com/repos/hildeth/chapel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hildeth/chapel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hildeth/chapel/git/refs{/sha}","trees_url":"https://api.github.com/repos/hildeth/chapel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hildeth/chapel/statuses/{sha}","languages_url":"https://api.github.com/repos/hildeth/chapel/languages","stargazers_url":"https://api.github.com/repos/hildeth/chapel/stargazers","contributors_url":"https://api.github.com/repos/hildeth/chapel/contributors","subscribers_url":"https://api.github.com/repos/hildeth/chapel/subscribers","subscription_url":"https://api.github.com/repos/hildeth/chapel/subscription","commits_url":"https://api.github.com/repos/hildeth/chapel/commits{/sha}","git_commits_url":"https://api.github.com/repos/hildeth/chapel/git/commits{/sha}","comments_url":"https://api.github.com/repos/hildeth/chapel/comments{/number}","issue_comment_url":"https://api.github.com/repos/hildeth/chapel/issues/comments{/number}","contents_url":"https://api.github.com/repos/hildeth/chapel/contents/{+path}","compare_url":"https://api.github.com/repos/hildeth/chapel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hildeth/chapel/merges","archive_url":"https://api.github.com/repos/hildeth/chapel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hildeth/chapel/downloads","issues_url":"https://api.github.com/repos/hildeth/chapel/issues{/number}","pulls_url":"https://api.github.com/repos/hildeth/chapel/pulls{/number}","milestones_url":"https://api.github.com/repos/hildeth/chapel/milestones{/number}","notifications_url":"https://api.github.com/repos/hildeth/chapel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hildeth/chapel/labels{/name}","releases_url":"https://api.github.com/repos/hildeth/chapel/releases{/id}","created_at":"2014-07-16T17:09:45Z","updated_at":"2015-02-23T19:32:43Z","pushed_at":"2015-02-23T23:23:45Z","git_url":"git://github.com/hildeth/chapel.git","ssh_url":"git@github.com:hildeth/chapel.git","clone_url":"https://github.com/hildeth/chapel.git","svn_url":"https://github.com/hildeth/chapel","homepage":"http://chapel.cray.com/","size":260424,"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":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"chapel-lang:master","ref":"master","sha":"7ddb006b002c635e2579c5a07e3de60719eae679","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}","created_at":"2014-07-09T18:15:54Z","updated_at":"2015-02-24T19:05:23Z","pushed_at":"2015-02-24T19:05:22Z","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":333194,"stargazers_count":68,"watchers_count":68,"language":"Chapel","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":37,"mirror_url":null,"open_issues_count":9,"forks":37,"open_issues":9,"watchers":68,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/chapel-lang/chapel/pulls/1363"},"html":{"href":"https://github.com/chapel-lang/chapel/pull/1363"},"issue":{"href":"https://api.github.com/repos/chapel-lang/chapel/issues/1363"},"comments":{"href":"https://api.github.com/repos/chapel-lang/chapel/issues/1363/comments"},"review_comments":{"href":"https://api.github.com/repos/chapel-lang/chapel/pulls/1363/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/1363/commits"},"statuses":{"href":"https://api.github.com/repos/chapel-lang/chapel/statuses/dbee01d027f459a442d249314030e7d71591c989"}}}}