{"action":"created","comment":{"url":"https://api.github.com/repos/smarr/SOMns/pulls/comments/78538434","id":78538434,"diff_hunk":"@@ -2,54 +2,49 @@\n \n import com.oracle.truffle.api.CompilerDirectives;\n import com.oracle.truffle.api.Truffle;\n+import com.oracle.truffle.api.dsl.GenerateNodeFactory;\n import com.oracle.truffle.api.dsl.Specialization;\n import com.oracle.truffle.api.frame.VirtualFrame;\n import com.oracle.truffle.api.nodes.DirectCallNode;\n+import com.oracle.truffle.api.source.SourceSection;\n \n import som.interpreter.nodes.ExpressionNode;\n-import som.interpreter.nodes.PreevaluatedExpression;\n import som.interpreter.nodes.nary.QuaternaryExpressionNode;\n+import som.primitives.Primitive;\n import som.vmobjects.SBlock;\n import som.vmobjects.SInvokable;\n import tools.dym.Tags.LoopNode;\n \n \n-public abstract class IntToByDoMessageNode extends QuaternaryExpressionNode\n-    implements PreevaluatedExpression {\n-\n+@GenerateNodeFactory\n+@Primitive(selector = \"to:by:do:\", disabled = true, noWrapper = true, requiresArguments = true)\n+public abstract class IntToByDoMessageNode extends QuaternaryExpressionNode {\n   private final SInvokable blockMethod;\n   @Child private DirectCallNode valueSend;\n \n-  public IntToByDoMessageNode(final ExpressionNode orignialNode,\n-      final SBlock block) {\n-    super(orignialNode.getSourceSection());\n-    blockMethod = block.getMethod();\n+  public IntToByDoMessageNode(final boolean eagWrap, final SourceSection section, final Object[] args) {\n+    super(eagWrap, section);\n+    assert !eagWrap;\n+    blockMethod = ((SBlock) args[3]).getMethod();","path":"src/som/interpreter/nodes/specialized/IntToByDoMessageNode.java","position":35,"original_position":35,"commit_id":"75cb45ba6cdcd307d38b92941cc58f3941480781","original_commit_id":"75cb45ba6cdcd307d38b92941cc58f3941480781","user":{"login":"codacy-bot","id":19940114,"avatar_url":"https://avatars.githubusercontent.com/u/19940114?v=3","gravatar_id":"","url":"https://api.github.com/users/codacy-bot","html_url":"https://github.com/codacy-bot","followers_url":"https://api.github.com/users/codacy-bot/followers","following_url":"https://api.github.com/users/codacy-bot/following{/other_user}","gists_url":"https://api.github.com/users/codacy-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/codacy-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codacy-bot/subscriptions","organizations_url":"https://api.github.com/users/codacy-bot/orgs","repos_url":"https://api.github.com/users/codacy-bot/repos","events_url":"https://api.github.com/users/codacy-bot/events{/privacy}","received_events_url":"https://api.github.com/users/codacy-bot/received_events","type":"User","site_admin":false},"body":"![Codacy](https://www.codacy.com/assets/images/favicon.png) Issue found: ['3' is a magic number.](https://www.codacy.com/app/git_10/SOMns/file/3894148607/issues/source?bid=3239554&fileBranchId=3671021#l28)","created_at":"2016-09-13T11:10:36Z","updated_at":"2016-09-13T11:10:36Z","html_url":"https://github.com/smarr/SOMns/pull/30#discussion_r78538434","pull_request_url":"https://api.github.com/repos/smarr/SOMns/pulls/30","_links":{"self":{"href":"https://api.github.com/repos/smarr/SOMns/pulls/comments/78538434"},"html":{"href":"https://github.com/smarr/SOMns/pull/30#discussion_r78538434"},"pull_request":{"href":"https://api.github.com/repos/smarr/SOMns/pulls/30"}}},"pull_request":{"url":"https://api.github.com/repos/smarr/SOMns/pulls/30","id":83927374,"html_url":"https://github.com/smarr/SOMns/pull/30","diff_url":"https://github.com/smarr/SOMns/pull/30.diff","patch_url":"https://github.com/smarr/SOMns/pull/30.patch","issue_url":"https://api.github.com/repos/smarr/SOMns/issues/30","number":30,"state":"open","locked":false,"title":"Handle Eager Primitive Specialization without huge switch/case","user":{"login":"smarr","id":40815,"avatar_url":"https://avatars.githubusercontent.com/u/40815?v=3","gravatar_id":"","url":"https://api.github.com/users/smarr","html_url":"https://github.com/smarr","followers_url":"https://api.github.com/users/smarr/followers","following_url":"https://api.github.com/users/smarr/following{/other_user}","gists_url":"https://api.github.com/users/smarr/gists{/gist_id}","starred_url":"https://api.github.com/users/smarr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smarr/subscriptions","organizations_url":"https://api.github.com/users/smarr/orgs","repos_url":"https://api.github.com/users/smarr/repos","events_url":"https://api.github.com/users/smarr/events{/privacy}","received_events_url":"https://api.github.com/users/smarr/received_events","type":"User","site_admin":false},"body":"The goal of this PR is to solve eager primitive specialization properly without having hard-coded switch/case stuff in MessageSendNode.\r\n\r\nCurrently work in progress.\r\n\r\nOpen issues:\r\n - [x] proper naming of members of `@Primitive` annotation\r\n - general cleanup\r\n - might want a mechanism to verify that all specialization works, it is easy to forget adding a primitive factory to the list. Could use a annotation processor, but that's complexity, I'd rather like to avoid\r\n\r\n/cc\r\n@charig probably relevant for you.\r\n@kjx might be interesting for you, since it would allow to more systematically disable optimizations. If you need something specific, I should add a proper option.","created_at":"2016-09-04T16:30:01Z","updated_at":"2016-09-13T11:10:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4e5e1a491278da81b77862113a732aac92ff2b2d","assignee":{"login":"smarr","id":40815,"avatar_url":"https://avatars.githubusercontent.com/u/40815?v=3","gravatar_id":"","url":"https://api.github.com/users/smarr","html_url":"https://github.com/smarr","followers_url":"https://api.github.com/users/smarr/followers","following_url":"https://api.github.com/users/smarr/following{/other_user}","gists_url":"https://api.github.com/users/smarr/gists{/gist_id}","starred_url":"https://api.github.com/users/smarr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smarr/subscriptions","organizations_url":"https://api.github.com/users/smarr/orgs","repos_url":"https://api.github.com/users/smarr/repos","events_url":"https://api.github.com/users/smarr/events{/privacy}","received_events_url":"https://api.github.com/users/smarr/received_events","type":"User","site_admin":false},"assignees":[{"login":"smarr","id":40815,"avatar_url":"https://avatars.githubusercontent.com/u/40815?v=3","gravatar_id":"","url":"https://api.github.com/users/smarr","html_url":"https://github.com/smarr","followers_url":"https://api.github.com/users/smarr/followers","following_url":"https://api.github.com/users/smarr/following{/other_user}","gists_url":"https://api.github.com/users/smarr/gists{/gist_id}","starred_url":"https://api.github.com/users/smarr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smarr/subscriptions","organizations_url":"https://api.github.com/users/smarr/orgs","repos_url":"https://api.github.com/users/smarr/repos","events_url":"https://api.github.com/users/smarr/events{/privacy}","received_events_url":"https://api.github.com/users/smarr/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/smarr/SOMns/pulls/30/commits","review_comments_url":"https://api.github.com/repos/smarr/SOMns/pulls/30/comments","review_comment_url":"https://api.github.com/repos/smarr/SOMns/pulls/comments{/number}","comments_url":"https://api.github.com/repos/smarr/SOMns/issues/30/comments","statuses_url":"https://api.github.com/repos/smarr/SOMns/statuses/75cb45ba6cdcd307d38b92941cc58f3941480781","head":{"label":"smarr:feature/eager-prim-handling","ref":"feature/eager-prim-handling","sha":"75cb45ba6cdcd307d38b92941cc58f3941480781","user":{"login":"smarr","id":40815,"avatar_url":"https://avatars.githubusercontent.com/u/40815?v=3","gravatar_id":"","url":"https://api.github.com/users/smarr","html_url":"https://github.com/smarr","followers_url":"https://api.github.com/users/smarr/followers","following_url":"https://api.github.com/users/smarr/following{/other_user}","gists_url":"https://api.github.com/users/smarr/gists{/gist_id}","starred_url":"https://api.github.com/users/smarr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smarr/subscriptions","organizations_url":"https://api.github.com/users/smarr/orgs","repos_url":"https://api.github.com/users/smarr/repos","events_url":"https://api.github.com/users/smarr/events{/privacy}","received_events_url":"https://api.github.com/users/smarr/received_events","type":"User","site_admin":false},"repo":{"id":35489534,"name":"SOMns","full_name":"smarr/SOMns","owner":{"login":"smarr","id":40815,"avatar_url":"https://avatars.githubusercontent.com/u/40815?v=3","gravatar_id":"","url":"https://api.github.com/users/smarr","html_url":"https://github.com/smarr","followers_url":"https://api.github.com/users/smarr/followers","following_url":"https://api.github.com/users/smarr/following{/other_user}","gists_url":"https://api.github.com/users/smarr/gists{/gist_id}","starred_url":"https://api.github.com/users/smarr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smarr/subscriptions","organizations_url":"https://api.github.com/users/smarr/orgs","repos_url":"https://api.github.com/users/smarr/repos","events_url":"https://api.github.com/users/smarr/events{/privacy}","received_events_url":"https://api.github.com/users/smarr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/smarr/SOMns","description":"SOMns is a Simple Newspeak Implementation focusing on Concurrency Features","fork":false,"url":"https://api.github.com/repos/smarr/SOMns","forks_url":"https://api.github.com/repos/smarr/SOMns/forks","keys_url":"https://api.github.com/repos/smarr/SOMns/keys{/key_id}","collaborators_url":"https://api.github.com/repos/smarr/SOMns/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/smarr/SOMns/teams","hooks_url":"https://api.github.com/repos/smarr/SOMns/hooks","issue_events_url":"https://api.github.com/repos/smarr/SOMns/issues/events{/number}","events_url":"https://api.github.com/repos/smarr/SOMns/events","assignees_url":"https://api.github.com/repos/smarr/SOMns/assignees{/user}","branches_url":"https://api.github.com/repos/smarr/SOMns/branches{/branch}","tags_url":"https://api.github.com/repos/smarr/SOMns/tags","blobs_url":"https://api.github.com/repos/smarr/SOMns/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/smarr/SOMns/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/smarr/SOMns/git/refs{/sha}","trees_url":"https://api.github.com/repos/smarr/SOMns/git/trees{/sha}","statuses_url":"https://api.github.com/repos/smarr/SOMns/statuses/{sha}","languages_url":"https://api.github.com/repos/smarr/SOMns/languages","stargazers_url":"https://api.github.com/repos/smarr/SOMns/stargazers","contributors_url":"https://api.github.com/repos/smarr/SOMns/contributors","subscribers_url":"https://api.github.com/repos/smarr/SOMns/subscribers","subscription_url":"https://api.github.com/repos/smarr/SOMns/subscription","commits_url":"https://api.github.com/repos/smarr/SOMns/commits{/sha}","git_commits_url":"https://api.github.com/repos/smarr/SOMns/git/commits{/sha}","comments_url":"https://api.github.com/repos/smarr/SOMns/comments{/number}","issue_comment_url":"https://api.github.com/repos/smarr/SOMns/issues/comments{/number}","contents_url":"https://api.github.com/repos/smarr/SOMns/contents/{+path}","compare_url":"https://api.github.com/repos/smarr/SOMns/compare/{base}...{head}","merges_url":"https://api.github.com/repos/smarr/SOMns/merges","archive_url":"https://api.github.com/repos/smarr/SOMns/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/smarr/SOMns/downloads","issues_url":"https://api.github.com/repos/smarr/SOMns/issues{/number}","pulls_url":"https://api.github.com/repos/smarr/SOMns/pulls{/number}","milestones_url":"https://api.github.com/repos/smarr/SOMns/milestones{/number}","notifications_url":"https://api.github.com/repos/smarr/SOMns/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/smarr/SOMns/labels{/name}","releases_url":"https://api.github.com/repos/smarr/SOMns/releases{/id}","deployments_url":"https://api.github.com/repos/smarr/SOMns/deployments","created_at":"2015-05-12T13:27:56Z","updated_at":"2016-07-31T20:51:09Z","pushed_at":"2016-09-13T11:08:32Z","git_url":"git://github.com/smarr/SOMns.git","ssh_url":"git@github.com:smarr/SOMns.git","clone_url":"https://github.com/smarr/SOMns.git","svn_url":"https://github.com/smarr/SOMns","homepage":"","size":4169,"stargazers_count":8,"watchers_count":8,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":17,"forks":4,"open_issues":17,"watchers":8,"default_branch":"master"}},"base":{"label":"smarr:master","ref":"master","sha":"d3337d946134568a5ee4362ef4162afc3456bcfd","user":{"login":"smarr","id":40815,"avatar_url":"https://avatars.githubusercontent.com/u/40815?v=3","gravatar_id":"","url":"https://api.github.com/users/smarr","html_url":"https://github.com/smarr","followers_url":"https://api.github.com/users/smarr/followers","following_url":"https://api.github.com/users/smarr/following{/other_user}","gists_url":"https://api.github.com/users/smarr/gists{/gist_id}","starred_url":"https://api.github.com/users/smarr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smarr/subscriptions","organizations_url":"https://api.github.com/users/smarr/orgs","repos_url":"https://api.github.com/users/smarr/repos","events_url":"https://api.github.com/users/smarr/events{/privacy}","received_events_url":"https://api.github.com/users/smarr/received_events","type":"User","site_admin":false},"repo":{"id":35489534,"name":"SOMns","full_name":"smarr/SOMns","owner":{"login":"smarr","id":40815,"avatar_url":"https://avatars.githubusercontent.com/u/40815?v=3","gravatar_id":"","url":"https://api.github.com/users/smarr","html_url":"https://github.com/smarr","followers_url":"https://api.github.com/users/smarr/followers","following_url":"https://api.github.com/users/smarr/following{/other_user}","gists_url":"https://api.github.com/users/smarr/gists{/gist_id}","starred_url":"https://api.github.com/users/smarr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smarr/subscriptions","organizations_url":"https://api.github.com/users/smarr/orgs","repos_url":"https://api.github.com/users/smarr/repos","events_url":"https://api.github.com/users/smarr/events{/privacy}","received_events_url":"https://api.github.com/users/smarr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/smarr/SOMns","description":"SOMns is a Simple Newspeak Implementation focusing on Concurrency Features","fork":false,"url":"https://api.github.com/repos/smarr/SOMns","forks_url":"https://api.github.com/repos/smarr/SOMns/forks","keys_url":"https://api.github.com/repos/smarr/SOMns/keys{/key_id}","collaborators_url":"https://api.github.com/repos/smarr/SOMns/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/smarr/SOMns/teams","hooks_url":"https://api.github.com/repos/smarr/SOMns/hooks","issue_events_url":"https://api.github.com/repos/smarr/SOMns/issues/events{/number}","events_url":"https://api.github.com/repos/smarr/SOMns/events","assignees_url":"https://api.github.com/repos/smarr/SOMns/assignees{/user}","branches_url":"https://api.github.com/repos/smarr/SOMns/branches{/branch}","tags_url":"https://api.github.com/repos/smarr/SOMns/tags","blobs_url":"https://api.github.com/repos/smarr/SOMns/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/smarr/SOMns/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/smarr/SOMns/git/refs{/sha}","trees_url":"https://api.github.com/repos/smarr/SOMns/git/trees{/sha}","statuses_url":"https://api.github.com/repos/smarr/SOMns/statuses/{sha}","languages_url":"https://api.github.com/repos/smarr/SOMns/languages","stargazers_url":"https://api.github.com/repos/smarr/SOMns/stargazers","contributors_url":"https://api.github.com/repos/smarr/SOMns/contributors","subscribers_url":"https://api.github.com/repos/smarr/SOMns/subscribers","subscription_url":"https://api.github.com/repos/smarr/SOMns/subscription","commits_url":"https://api.github.com/repos/smarr/SOMns/commits{/sha}","git_commits_url":"https://api.github.com/repos/smarr/SOMns/git/commits{/sha}","comments_url":"https://api.github.com/repos/smarr/SOMns/comments{/number}","issue_comment_url":"https://api.github.com/repos/smarr/SOMns/issues/comments{/number}","contents_url":"https://api.github.com/repos/smarr/SOMns/contents/{+path}","compare_url":"https://api.github.com/repos/smarr/SOMns/compare/{base}...{head}","merges_url":"https://api.github.com/repos/smarr/SOMns/merges","archive_url":"https://api.github.com/repos/smarr/SOMns/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/smarr/SOMns/downloads","issues_url":"https://api.github.com/repos/smarr/SOMns/issues{/number}","pulls_url":"https://api.github.com/repos/smarr/SOMns/pulls{/number}","milestones_url":"https://api.github.com/repos/smarr/SOMns/milestones{/number}","notifications_url":"https://api.github.com/repos/smarr/SOMns/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/smarr/SOMns/labels{/name}","releases_url":"https://api.github.com/repos/smarr/SOMns/releases{/id}","deployments_url":"https://api.github.com/repos/smarr/SOMns/deployments","created_at":"2015-05-12T13:27:56Z","updated_at":"2016-07-31T20:51:09Z","pushed_at":"2016-09-13T11:08:32Z","git_url":"git://github.com/smarr/SOMns.git","ssh_url":"git@github.com:smarr/SOMns.git","clone_url":"https://github.com/smarr/SOMns.git","svn_url":"https://github.com/smarr/SOMns","homepage":"","size":4169,"stargazers_count":8,"watchers_count":8,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":17,"forks":4,"open_issues":17,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/smarr/SOMns/pulls/30"},"html":{"href":"https://github.com/smarr/SOMns/pull/30"},"issue":{"href":"https://api.github.com/repos/smarr/SOMns/issues/30"},"comments":{"href":"https://api.github.com/repos/smarr/SOMns/issues/30/comments"},"review_comments":{"href":"https://api.github.com/repos/smarr/SOMns/pulls/30/comments"},"review_comment":{"href":"https://api.github.com/repos/smarr/SOMns/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/smarr/SOMns/pulls/30/commits"},"statuses":{"href":"https://api.github.com/repos/smarr/SOMns/statuses/75cb45ba6cdcd307d38b92941cc58f3941480781"}}}}
{"actor":{"display_login":"codacy-bot"}}