{"action":"created","comment":{"url":"https://api.github.com/repos/eclipse/omr/pulls/comments/119684383","pull_request_review_id":41587465,"id":119684383,"diff_hunk":"@@ -2357,7 +2357,101 @@ OMR::Node::isNotCollected()\n    return false;\n    }\n \n+/**\n+ * \\brief\n+ *    Check if the node is an internal pointer.\n+ *\n+ * \\return\n+ *    Return true if the node is an internal pointer, false otherwise.\n+ *\n+ * \\note\n+ *    This query currently only works on opcodes that can have a pinning array pointer,\n+ *    i.e. aiadd, aiuadd, aladd, aluadd. Suppport for other opcodes can be added if necessary.\n+ */\n+bool\n+OMR::Node::computeIsInternalPointer()\n+   {\n+   if (self()->getOpCode().hasPinningArrayPointer())\n+      return false;\n+   return self()->computeIsCollectedReference();\n+   }\n+\n+/**\n+ * \\brief\n+ *    Check if the node is collectable.\n+ *\n+ * \\return\n+ *    Return true if the node is collectable, false otherwise.\n+ *\n+ * \\note\n+ *    This query traverses down the children of the node and try to find if the node originates\n+ *    from a collectable reference, i.e. anything that is an address to a collected object.\n+ */\n+bool\n+OMR::Node::computeIsCollectedReference()\n+   {\n+   TR::Node *curNode = self();\n+   if (!curNode->getType().isAddress())\n+      return false;\n+\n+   while (curNode)","path":"compiler/il/OMRNode.cpp","position":41,"original_position":41,"commit_id":"76601fea4697f247081195badbaca0b7ea494658","original_commit_id":"76601fea4697f247081195badbaca0b7ea494658","user":{"login":"andrewcraik","id":5400312,"avatar_url":"https://avatars0.githubusercontent.com/u/5400312?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewcraik","html_url":"https://github.com/andrewcraik","followers_url":"https://api.github.com/users/andrewcraik/followers","following_url":"https://api.github.com/users/andrewcraik/following{/other_user}","gists_url":"https://api.github.com/users/andrewcraik/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewcraik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewcraik/subscriptions","organizations_url":"https://api.github.com/users/andrewcraik/orgs","repos_url":"https://api.github.com/users/andrewcraik/repos","events_url":"https://api.github.com/users/andrewcraik/events{/privacy}","received_events_url":"https://api.github.com/users/andrewcraik/received_events","type":"User","site_admin":false},"body":"Ah, but with an aternary you could still get an exponential walk because of the two children - I agree with the single child walk it wouldn't be a problem","created_at":"2017-06-01T17:50:28Z","updated_at":"2017-06-01T17:50:28Z","html_url":"https://github.com/eclipse/omr/pull/1178#discussion_r119684383","pull_request_url":"https://api.github.com/repos/eclipse/omr/pulls/1178","_links":{"self":{"href":"https://api.github.com/repos/eclipse/omr/pulls/comments/119684383"},"html":{"href":"https://github.com/eclipse/omr/pull/1178#discussion_r119684383"},"pull_request":{"href":"https://api.github.com/repos/eclipse/omr/pulls/1178"}}},"pull_request":{"url":"https://api.github.com/repos/eclipse/omr/pulls/1178","id":122705016,"html_url":"https://github.com/eclipse/omr/pull/1178","diff_url":"https://github.com/eclipse/omr/pull/1178.diff","patch_url":"https://github.com/eclipse/omr/pull/1178.patch","issue_url":"https://api.github.com/repos/eclipse/omr/issues/1178","number":1178,"state":"open","locked":false,"title":"WIP: Add canBeInternalPointer query","user":{"login":"liqunl","id":19654275,"avatar_url":"https://avatars2.githubusercontent.com/u/19654275?v=3","gravatar_id":"","url":"https://api.github.com/users/liqunl","html_url":"https://github.com/liqunl","followers_url":"https://api.github.com/users/liqunl/followers","following_url":"https://api.github.com/users/liqunl/following{/other_user}","gists_url":"https://api.github.com/users/liqunl/gists{/gist_id}","starred_url":"https://api.github.com/users/liqunl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liqunl/subscriptions","organizations_url":"https://api.github.com/users/liqunl/orgs","repos_url":"https://api.github.com/users/liqunl/repos","events_url":"https://api.github.com/users/liqunl/events{/privacy}","received_events_url":"https://api.github.com/users/liqunl/received_events","type":"User","site_admin":false},"body":"This pull request contains the following two commits:\r\n1, Add canBeInternalPointer query\r\n\r\nThe query isArrayRef by its name is supposed to return true for nodes\r\nwho are addresses pointing to the middle of objects. However, it is a\r\nquery on an opcode and returns true for aiadd and aladd, which is\r\ninsufficient to serve its original purpose. In some places in the code,\r\nthe isInternalPtr flag on a node will be incorrectly set if isArrayRef\r\nreturns true, resulting crashes in the gc when it tries to scan the\r\nobject the node points to. Unfortunately, isArrayRef is used everywhere\r\nto check if the opcode is aiadd or aladd or to serve other purposes,\r\nthus we can not simply change the implementation of this query or\r\nreplace it everywhere with a different query.\r\n\r\nThis commit adds a new query canBeInternalPtrOfObject on the node and\r\nask the new query whereever isInternalPtr flag might be set when\r\nisArrayRef returns true.\r\n\r\n2, Stop converting addresses to integers\r\n\r\nConverting addresses to integers would ruin the collectable property on\r\na node when the address is a reference to a collectable object,\r\nresulting in gc crashes. This commit removes conversions from address\r\nto integer and add support to address comparisons. Changes include\r\n\r\n1) Remove a2l/a2i in LoopVersioner in LoopVersioner, LoopStrider,\r\n   GeneralLoopUnroller, InductionVariableAnalysis and ValuePropagation.\r\n2) Create primary induction variable for some address types when they\r\n   are associated with an internal pointer.\r\n3) Add UnsignedCompare and Unsigned data type for address compare\r\n   opcodes and update their VPHandlers.\r\n\r\nissue: #563\r\nSigned-off-by: liqunl liqunl@ca.ibm.com","created_at":"2017-05-26T19:21:53Z","updated_at":"2017-06-01T17:50:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1bc67ef40518e5c47e982f7cde97402f18b400e2","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/eclipse/omr/pulls/1178/commits","review_comments_url":"https://api.github.com/repos/eclipse/omr/pulls/1178/comments","review_comment_url":"https://api.github.com/repos/eclipse/omr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eclipse/omr/issues/1178/comments","statuses_url":"https://api.github.com/repos/eclipse/omr/statuses/76601fea4697f247081195badbaca0b7ea494658","head":{"label":"liqunl:fixa2l","ref":"fixa2l","sha":"76601fea4697f247081195badbaca0b7ea494658","user":{"login":"liqunl","id":19654275,"avatar_url":"https://avatars2.githubusercontent.com/u/19654275?v=3","gravatar_id":"","url":"https://api.github.com/users/liqunl","html_url":"https://github.com/liqunl","followers_url":"https://api.github.com/users/liqunl/followers","following_url":"https://api.github.com/users/liqunl/following{/other_user}","gists_url":"https://api.github.com/users/liqunl/gists{/gist_id}","starred_url":"https://api.github.com/users/liqunl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liqunl/subscriptions","organizations_url":"https://api.github.com/users/liqunl/orgs","repos_url":"https://api.github.com/users/liqunl/repos","events_url":"https://api.github.com/users/liqunl/events{/privacy}","received_events_url":"https://api.github.com/users/liqunl/received_events","type":"User","site_admin":false},"repo":{"id":60030426,"name":"omr","full_name":"liqunl/omr","owner":{"login":"liqunl","id":19654275,"avatar_url":"https://avatars2.githubusercontent.com/u/19654275?v=3","gravatar_id":"","url":"https://api.github.com/users/liqunl","html_url":"https://github.com/liqunl","followers_url":"https://api.github.com/users/liqunl/followers","following_url":"https://api.github.com/users/liqunl/following{/other_user}","gists_url":"https://api.github.com/users/liqunl/gists{/gist_id}","starred_url":"https://api.github.com/users/liqunl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liqunl/subscriptions","organizations_url":"https://api.github.com/users/liqunl/orgs","repos_url":"https://api.github.com/users/liqunl/repos","events_url":"https://api.github.com/users/liqunl/events{/privacy}","received_events_url":"https://api.github.com/users/liqunl/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/liqunl/omr","description":"OMR project","fork":true,"url":"https://api.github.com/repos/liqunl/omr","forks_url":"https://api.github.com/repos/liqunl/omr/forks","keys_url":"https://api.github.com/repos/liqunl/omr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/liqunl/omr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/liqunl/omr/teams","hooks_url":"https://api.github.com/repos/liqunl/omr/hooks","issue_events_url":"https://api.github.com/repos/liqunl/omr/issues/events{/number}","events_url":"https://api.github.com/repos/liqunl/omr/events","assignees_url":"https://api.github.com/repos/liqunl/omr/assignees{/user}","branches_url":"https://api.github.com/repos/liqunl/omr/branches{/branch}","tags_url":"https://api.github.com/repos/liqunl/omr/tags","blobs_url":"https://api.github.com/repos/liqunl/omr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/liqunl/omr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/liqunl/omr/git/refs{/sha}","trees_url":"https://api.github.com/repos/liqunl/omr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/liqunl/omr/statuses/{sha}","languages_url":"https://api.github.com/repos/liqunl/omr/languages","stargazers_url":"https://api.github.com/repos/liqunl/omr/stargazers","contributors_url":"https://api.github.com/repos/liqunl/omr/contributors","subscribers_url":"https://api.github.com/repos/liqunl/omr/subscribers","subscription_url":"https://api.github.com/repos/liqunl/omr/subscription","commits_url":"https://api.github.com/repos/liqunl/omr/commits{/sha}","git_commits_url":"https://api.github.com/repos/liqunl/omr/git/commits{/sha}","comments_url":"https://api.github.com/repos/liqunl/omr/comments{/number}","issue_comment_url":"https://api.github.com/repos/liqunl/omr/issues/comments{/number}","contents_url":"https://api.github.com/repos/liqunl/omr/contents/{+path}","compare_url":"https://api.github.com/repos/liqunl/omr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/liqunl/omr/merges","archive_url":"https://api.github.com/repos/liqunl/omr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/liqunl/omr/downloads","issues_url":"https://api.github.com/repos/liqunl/omr/issues{/number}","pulls_url":"https://api.github.com/repos/liqunl/omr/pulls{/number}","milestones_url":"https://api.github.com/repos/liqunl/omr/milestones{/number}","notifications_url":"https://api.github.com/repos/liqunl/omr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/liqunl/omr/labels{/name}","releases_url":"https://api.github.com/repos/liqunl/omr/releases{/id}","deployments_url":"https://api.github.com/repos/liqunl/omr/deployments","created_at":"2016-05-30T18:20:45Z","updated_at":"2016-05-30T18:20:49Z","pushed_at":"2017-05-31T17:19:56Z","git_url":"git://github.com/liqunl/omr.git","ssh_url":"git@github.com:liqunl/omr.git","clone_url":"https://github.com/liqunl/omr.git","svn_url":"https://github.com/liqunl/omr","homepage":null,"size":13762,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"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":"eclipse:master","ref":"master","sha":"b39a1f5cec3f5146a2b81265279f1b02b69ee824","user":{"login":"eclipse","id":56974,"avatar_url":"https://avatars2.githubusercontent.com/u/56974?v=3","gravatar_id":"","url":"https://api.github.com/users/eclipse","html_url":"https://github.com/eclipse","followers_url":"https://api.github.com/users/eclipse/followers","following_url":"https://api.github.com/users/eclipse/following{/other_user}","gists_url":"https://api.github.com/users/eclipse/gists{/gist_id}","starred_url":"https://api.github.com/users/eclipse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eclipse/subscriptions","organizations_url":"https://api.github.com/users/eclipse/orgs","repos_url":"https://api.github.com/users/eclipse/repos","events_url":"https://api.github.com/users/eclipse/events{/privacy}","received_events_url":"https://api.github.com/users/eclipse/received_events","type":"Organization","site_admin":false},"repo":{"id":53077478,"name":"omr","full_name":"eclipse/omr","owner":{"login":"eclipse","id":56974,"avatar_url":"https://avatars2.githubusercontent.com/u/56974?v=3","gravatar_id":"","url":"https://api.github.com/users/eclipse","html_url":"https://github.com/eclipse","followers_url":"https://api.github.com/users/eclipse/followers","following_url":"https://api.github.com/users/eclipse/following{/other_user}","gists_url":"https://api.github.com/users/eclipse/gists{/gist_id}","starred_url":"https://api.github.com/users/eclipse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eclipse/subscriptions","organizations_url":"https://api.github.com/users/eclipse/orgs","repos_url":"https://api.github.com/users/eclipse/repos","events_url":"https://api.github.com/users/eclipse/events{/privacy}","received_events_url":"https://api.github.com/users/eclipse/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/eclipse/omr","description":"Eclipse OMR™ Cross platform components for building reliable, high performance language runtimes","fork":false,"url":"https://api.github.com/repos/eclipse/omr","forks_url":"https://api.github.com/repos/eclipse/omr/forks","keys_url":"https://api.github.com/repos/eclipse/omr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eclipse/omr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eclipse/omr/teams","hooks_url":"https://api.github.com/repos/eclipse/omr/hooks","issue_events_url":"https://api.github.com/repos/eclipse/omr/issues/events{/number}","events_url":"https://api.github.com/repos/eclipse/omr/events","assignees_url":"https://api.github.com/repos/eclipse/omr/assignees{/user}","branches_url":"https://api.github.com/repos/eclipse/omr/branches{/branch}","tags_url":"https://api.github.com/repos/eclipse/omr/tags","blobs_url":"https://api.github.com/repos/eclipse/omr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eclipse/omr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eclipse/omr/git/refs{/sha}","trees_url":"https://api.github.com/repos/eclipse/omr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eclipse/omr/statuses/{sha}","languages_url":"https://api.github.com/repos/eclipse/omr/languages","stargazers_url":"https://api.github.com/repos/eclipse/omr/stargazers","contributors_url":"https://api.github.com/repos/eclipse/omr/contributors","subscribers_url":"https://api.github.com/repos/eclipse/omr/subscribers","subscription_url":"https://api.github.com/repos/eclipse/omr/subscription","commits_url":"https://api.github.com/repos/eclipse/omr/commits{/sha}","git_commits_url":"https://api.github.com/repos/eclipse/omr/git/commits{/sha}","comments_url":"https://api.github.com/repos/eclipse/omr/comments{/number}","issue_comment_url":"https://api.github.com/repos/eclipse/omr/issues/comments{/number}","contents_url":"https://api.github.com/repos/eclipse/omr/contents/{+path}","compare_url":"https://api.github.com/repos/eclipse/omr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eclipse/omr/merges","archive_url":"https://api.github.com/repos/eclipse/omr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eclipse/omr/downloads","issues_url":"https://api.github.com/repos/eclipse/omr/issues{/number}","pulls_url":"https://api.github.com/repos/eclipse/omr/pulls{/number}","milestones_url":"https://api.github.com/repos/eclipse/omr/milestones{/number}","notifications_url":"https://api.github.com/repos/eclipse/omr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eclipse/omr/labels{/name}","releases_url":"https://api.github.com/repos/eclipse/omr/releases{/id}","deployments_url":"https://api.github.com/repos/eclipse/omr/deployments","created_at":"2016-03-03T19:34:17Z","updated_at":"2017-05-29T14:09:19Z","pushed_at":"2017-06-01T16:59:03Z","git_url":"git://github.com/eclipse/omr.git","ssh_url":"git@github.com:eclipse/omr.git","clone_url":"https://github.com/eclipse/omr.git","svn_url":"https://github.com/eclipse/omr","homepage":"http://www.eclipse.org/omr","size":13765,"stargazers_count":338,"watchers_count":338,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":135,"mirror_url":null,"open_issues_count":166,"forks":135,"open_issues":166,"watchers":338,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/eclipse/omr/pulls/1178"},"html":{"href":"https://github.com/eclipse/omr/pull/1178"},"issue":{"href":"https://api.github.com/repos/eclipse/omr/issues/1178"},"comments":{"href":"https://api.github.com/repos/eclipse/omr/issues/1178/comments"},"review_comments":{"href":"https://api.github.com/repos/eclipse/omr/pulls/1178/comments"},"review_comment":{"href":"https://api.github.com/repos/eclipse/omr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eclipse/omr/pulls/1178/commits"},"statuses":{"href":"https://api.github.com/repos/eclipse/omr/statuses/76601fea4697f247081195badbaca0b7ea494658"}}}}
{"actor":{"display_login":"andrewcraik"}}