{"action":"created","comment":{"url":"https://api.github.com/repos/jruby/jruby/pulls/comments/33017237","id":33017237,"diff_hunk":"@@ -354,126 +545,144 @@ public Object addSpecial(RubyBasicObject a, RubyBasicObject b) {\n             else\n                 return b;\n         }\n-\n-        // TODO (pitr 28-may-2015): should it support coerce?\n     }\n \n-    @CoreMethod(names = \"add\", required = 2)\n-    public abstract static class AddNode extends BigDecimalCoreMethodNode {\n+    @CoreMethod(names = {\"+\"}, required = 1)\n+    public abstract static class AddOpNode extends AbstractAddNode {\n \n-        public AddNode(RubyContext context, SourceSection sourceSection) {\n+        public AddOpNode(RubyContext context, SourceSection sourceSection) {\n             super(context, sourceSection);\n         }\n \n-        @TruffleBoundary\n-        private Object addBigDecimal(RubyBasicObject a, BigDecimal b, int precision) {\n-            return createRubyBigDecimal(getBigDecimalValue(a).add(b, new MathContext(precision)));\n+        @Specialization(guards = {\n+                \"isNormal(a)\",\n+                \"isRubyBigDecimal(b)\",\n+                \"isNormal(b)\"})","path":"truffle/src/main/java/org/jruby/truffle/nodes/ext/BigDecimalNodes.java","position":527,"original_position":527,"commit_id":"a4877a84db4a1ed83bf70608c15f05f68a311f6f","original_commit_id":"a4877a84db4a1ed83bf70608c15f05f68a311f6f","user":{"login":"pitr-ch","id":204460,"avatar_url":"https://avatars.githubusercontent.com/u/204460?v=3","gravatar_id":"","url":"https://api.github.com/users/pitr-ch","html_url":"https://github.com/pitr-ch","followers_url":"https://api.github.com/users/pitr-ch/followers","following_url":"https://api.github.com/users/pitr-ch/following{/other_user}","gists_url":"https://api.github.com/users/pitr-ch/gists{/gist_id}","starred_url":"https://api.github.com/users/pitr-ch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pitr-ch/subscriptions","organizations_url":"https://api.github.com/users/pitr-ch/orgs","repos_url":"https://api.github.com/users/pitr-ch/repos","events_url":"https://api.github.com/users/pitr-ch/events{/privacy}","received_events_url":"https://api.github.com/users/pitr-ch/received_events","type":"User","site_admin":false},"body":"`isNormal` requires `b` to be `RubyBigDecimal` so it could fail with the order switched. Is this ok or should `isNormal` be fixed to never fail?","created_at":"2015-06-23T07:54:24Z","updated_at":"2015-06-23T07:54:24Z","html_url":"https://github.com/jruby/jruby/pull/3077#discussion_r33017237","pull_request_url":"https://api.github.com/repos/jruby/jruby/pulls/3077","_links":{"self":{"href":"https://api.github.com/repos/jruby/jruby/pulls/comments/33017237"},"html":{"href":"https://github.com/jruby/jruby/pull/3077#discussion_r33017237"},"pull_request":{"href":"https://api.github.com/repos/jruby/jruby/pulls/3077"}}},"pull_request":{"url":"https://api.github.com/repos/jruby/jruby/pulls/3077","id":38271747,"html_url":"https://github.com/jruby/jruby/pull/3077","diff_url":"https://github.com/jruby/jruby/pull/3077.diff","patch_url":"https://github.com/jruby/jruby/pull/3077.patch","issue_url":"https://api.github.com/repos/jruby/jruby/issues/3077","number":3077,"state":"open","locked":false,"title":"[Truffle] BigDecimal: add handling of ExceptionMode, Limit, Rounding","user":{"login":"pitr-ch","id":204460,"avatar_url":"https://avatars.githubusercontent.com/u/204460?v=3","gravatar_id":"","url":"https://api.github.com/users/pitr-ch","html_url":"https://github.com/pitr-ch","followers_url":"https://api.github.com/users/pitr-ch/followers","following_url":"https://api.github.com/users/pitr-ch/following{/other_user}","gists_url":"https://api.github.com/users/pitr-ch/gists{/gist_id}","starred_url":"https://api.github.com/users/pitr-ch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pitr-ch/subscriptions","organizations_url":"https://api.github.com/users/pitr-ch/orgs","repos_url":"https://api.github.com/users/pitr-ch/repos","events_url":"https://api.github.com/users/pitr-ch/events{/privacy}","received_events_url":"https://api.github.com/users/pitr-ch/received_events","type":"User","site_admin":false},"body":"* Add coerce and cast node for BigDecimal\r\n* Add create node (single entry point for BigDecimal creation)\r\n* BigDecimalCoreMethodNode has helpers for: BigDecimal creation, getLimit\r\n  getRoudingMode.\r\n* BigDecimalCoerceNode is used to reduce number of Specializations in operation\r\n  nodes\r\n* Operation nodes have beter structure and share code\r\n* add, sub, mult, div are handling special values\r\n* All operations respect fiber local ExceptionMode, Limit, Rounding settings\r\n* #round method added","created_at":"2015-06-22T20:19:36Z","updated_at":"2015-06-23T07:54:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6e639d7ae45e194da3c6f6f689aadc2df7469522","assignee":{"login":"pitr-ch","id":204460,"avatar_url":"https://avatars.githubusercontent.com/u/204460?v=3","gravatar_id":"","url":"https://api.github.com/users/pitr-ch","html_url":"https://github.com/pitr-ch","followers_url":"https://api.github.com/users/pitr-ch/followers","following_url":"https://api.github.com/users/pitr-ch/following{/other_user}","gists_url":"https://api.github.com/users/pitr-ch/gists{/gist_id}","starred_url":"https://api.github.com/users/pitr-ch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pitr-ch/subscriptions","organizations_url":"https://api.github.com/users/pitr-ch/orgs","repos_url":"https://api.github.com/users/pitr-ch/repos","events_url":"https://api.github.com/users/pitr-ch/events{/privacy}","received_events_url":"https://api.github.com/users/pitr-ch/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/jruby/jruby/milestones/34","html_url":"https://github.com/jruby/jruby/milestones/truffle-dev","labels_url":"https://api.github.com/repos/jruby/jruby/milestones/34/labels","id":1009959,"number":34,"title":"truffle-dev","description":null,"creator":{"login":"chrisseaton","id":341094,"avatar_url":"https://avatars.githubusercontent.com/u/341094?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisseaton","html_url":"https://github.com/chrisseaton","followers_url":"https://api.github.com/users/chrisseaton/followers","following_url":"https://api.github.com/users/chrisseaton/following{/other_user}","gists_url":"https://api.github.com/users/chrisseaton/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisseaton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisseaton/subscriptions","organizations_url":"https://api.github.com/users/chrisseaton/orgs","repos_url":"https://api.github.com/users/chrisseaton/repos","events_url":"https://api.github.com/users/chrisseaton/events{/privacy}","received_events_url":"https://api.github.com/users/chrisseaton/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":178,"state":"open","created_at":"2015-03-06T21:20:23Z","updated_at":"2015-06-22T20:19:36Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/jruby/jruby/pulls/3077/commits","review_comments_url":"https://api.github.com/repos/jruby/jruby/pulls/3077/comments","review_comment_url":"https://api.github.com/repos/jruby/jruby/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jruby/jruby/issues/3077/comments","statuses_url":"https://api.github.com/repos/jruby/jruby/statuses/a4877a84db4a1ed83bf70608c15f05f68a311f6f","head":{"label":"pitr-ch:bigdecimal","ref":"bigdecimal","sha":"a4877a84db4a1ed83bf70608c15f05f68a311f6f","user":{"login":"pitr-ch","id":204460,"avatar_url":"https://avatars.githubusercontent.com/u/204460?v=3","gravatar_id":"","url":"https://api.github.com/users/pitr-ch","html_url":"https://github.com/pitr-ch","followers_url":"https://api.github.com/users/pitr-ch/followers","following_url":"https://api.github.com/users/pitr-ch/following{/other_user}","gists_url":"https://api.github.com/users/pitr-ch/gists{/gist_id}","starred_url":"https://api.github.com/users/pitr-ch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pitr-ch/subscriptions","organizations_url":"https://api.github.com/users/pitr-ch/orgs","repos_url":"https://api.github.com/users/pitr-ch/repos","events_url":"https://api.github.com/users/pitr-ch/events{/privacy}","received_events_url":"https://api.github.com/users/pitr-ch/received_events","type":"User","site_admin":false},"repo":{"id":35412908,"name":"jruby","full_name":"pitr-ch/jruby","owner":{"login":"pitr-ch","id":204460,"avatar_url":"https://avatars.githubusercontent.com/u/204460?v=3","gravatar_id":"","url":"https://api.github.com/users/pitr-ch","html_url":"https://github.com/pitr-ch","followers_url":"https://api.github.com/users/pitr-ch/followers","following_url":"https://api.github.com/users/pitr-ch/following{/other_user}","gists_url":"https://api.github.com/users/pitr-ch/gists{/gist_id}","starred_url":"https://api.github.com/users/pitr-ch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pitr-ch/subscriptions","organizations_url":"https://api.github.com/users/pitr-ch/orgs","repos_url":"https://api.github.com/users/pitr-ch/repos","events_url":"https://api.github.com/users/pitr-ch/events{/privacy}","received_events_url":"https://api.github.com/users/pitr-ch/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pitr-ch/jruby","description":"JRuby, an implementation of Ruby on the JVM","fork":true,"url":"https://api.github.com/repos/pitr-ch/jruby","forks_url":"https://api.github.com/repos/pitr-ch/jruby/forks","keys_url":"https://api.github.com/repos/pitr-ch/jruby/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pitr-ch/jruby/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pitr-ch/jruby/teams","hooks_url":"https://api.github.com/repos/pitr-ch/jruby/hooks","issue_events_url":"https://api.github.com/repos/pitr-ch/jruby/issues/events{/number}","events_url":"https://api.github.com/repos/pitr-ch/jruby/events","assignees_url":"https://api.github.com/repos/pitr-ch/jruby/assignees{/user}","branches_url":"https://api.github.com/repos/pitr-ch/jruby/branches{/branch}","tags_url":"https://api.github.com/repos/pitr-ch/jruby/tags","blobs_url":"https://api.github.com/repos/pitr-ch/jruby/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pitr-ch/jruby/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pitr-ch/jruby/git/refs{/sha}","trees_url":"https://api.github.com/repos/pitr-ch/jruby/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pitr-ch/jruby/statuses/{sha}","languages_url":"https://api.github.com/repos/pitr-ch/jruby/languages","stargazers_url":"https://api.github.com/repos/pitr-ch/jruby/stargazers","contributors_url":"https://api.github.com/repos/pitr-ch/jruby/contributors","subscribers_url":"https://api.github.com/repos/pitr-ch/jruby/subscribers","subscription_url":"https://api.github.com/repos/pitr-ch/jruby/subscription","commits_url":"https://api.github.com/repos/pitr-ch/jruby/commits{/sha}","git_commits_url":"https://api.github.com/repos/pitr-ch/jruby/git/commits{/sha}","comments_url":"https://api.github.com/repos/pitr-ch/jruby/comments{/number}","issue_comment_url":"https://api.github.com/repos/pitr-ch/jruby/issues/comments{/number}","contents_url":"https://api.github.com/repos/pitr-ch/jruby/contents/{+path}","compare_url":"https://api.github.com/repos/pitr-ch/jruby/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pitr-ch/jruby/merges","archive_url":"https://api.github.com/repos/pitr-ch/jruby/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pitr-ch/jruby/downloads","issues_url":"https://api.github.com/repos/pitr-ch/jruby/issues{/number}","pulls_url":"https://api.github.com/repos/pitr-ch/jruby/pulls{/number}","milestones_url":"https://api.github.com/repos/pitr-ch/jruby/milestones{/number}","notifications_url":"https://api.github.com/repos/pitr-ch/jruby/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pitr-ch/jruby/labels{/name}","releases_url":"https://api.github.com/repos/pitr-ch/jruby/releases{/id}","created_at":"2015-05-11T08:58:10Z","updated_at":"2015-05-11T08:58:30Z","pushed_at":"2015-06-22T20:14:39Z","git_url":"git://github.com/pitr-ch/jruby.git","ssh_url":"git@github.com:pitr-ch/jruby.git","clone_url":"https://github.com/pitr-ch/jruby.git","svn_url":"https://github.com/pitr-ch/jruby","homepage":"http://www.jruby.org","size":175667,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"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":"jruby:master","ref":"master","sha":"abc6a6ac3a8538c2c18b3a2791f94919b9347775","user":{"login":"jruby","id":55687,"avatar_url":"https://avatars.githubusercontent.com/u/55687?v=3","gravatar_id":"","url":"https://api.github.com/users/jruby","html_url":"https://github.com/jruby","followers_url":"https://api.github.com/users/jruby/followers","following_url":"https://api.github.com/users/jruby/following{/other_user}","gists_url":"https://api.github.com/users/jruby/gists{/gist_id}","starred_url":"https://api.github.com/users/jruby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jruby/subscriptions","organizations_url":"https://api.github.com/users/jruby/orgs","repos_url":"https://api.github.com/users/jruby/repos","events_url":"https://api.github.com/users/jruby/events{/privacy}","received_events_url":"https://api.github.com/users/jruby/received_events","type":"Organization","site_admin":false},"repo":{"id":168370,"name":"jruby","full_name":"jruby/jruby","owner":{"login":"jruby","id":55687,"avatar_url":"https://avatars.githubusercontent.com/u/55687?v=3","gravatar_id":"","url":"https://api.github.com/users/jruby","html_url":"https://github.com/jruby","followers_url":"https://api.github.com/users/jruby/followers","following_url":"https://api.github.com/users/jruby/following{/other_user}","gists_url":"https://api.github.com/users/jruby/gists{/gist_id}","starred_url":"https://api.github.com/users/jruby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jruby/subscriptions","organizations_url":"https://api.github.com/users/jruby/orgs","repos_url":"https://api.github.com/users/jruby/repos","events_url":"https://api.github.com/users/jruby/events{/privacy}","received_events_url":"https://api.github.com/users/jruby/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jruby/jruby","description":"JRuby, an implementation of Ruby on the JVM","fork":false,"url":"https://api.github.com/repos/jruby/jruby","forks_url":"https://api.github.com/repos/jruby/jruby/forks","keys_url":"https://api.github.com/repos/jruby/jruby/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jruby/jruby/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jruby/jruby/teams","hooks_url":"https://api.github.com/repos/jruby/jruby/hooks","issue_events_url":"https://api.github.com/repos/jruby/jruby/issues/events{/number}","events_url":"https://api.github.com/repos/jruby/jruby/events","assignees_url":"https://api.github.com/repos/jruby/jruby/assignees{/user}","branches_url":"https://api.github.com/repos/jruby/jruby/branches{/branch}","tags_url":"https://api.github.com/repos/jruby/jruby/tags","blobs_url":"https://api.github.com/repos/jruby/jruby/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jruby/jruby/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jruby/jruby/git/refs{/sha}","trees_url":"https://api.github.com/repos/jruby/jruby/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jruby/jruby/statuses/{sha}","languages_url":"https://api.github.com/repos/jruby/jruby/languages","stargazers_url":"https://api.github.com/repos/jruby/jruby/stargazers","contributors_url":"https://api.github.com/repos/jruby/jruby/contributors","subscribers_url":"https://api.github.com/repos/jruby/jruby/subscribers","subscription_url":"https://api.github.com/repos/jruby/jruby/subscription","commits_url":"https://api.github.com/repos/jruby/jruby/commits{/sha}","git_commits_url":"https://api.github.com/repos/jruby/jruby/git/commits{/sha}","comments_url":"https://api.github.com/repos/jruby/jruby/comments{/number}","issue_comment_url":"https://api.github.com/repos/jruby/jruby/issues/comments{/number}","contents_url":"https://api.github.com/repos/jruby/jruby/contents/{+path}","compare_url":"https://api.github.com/repos/jruby/jruby/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jruby/jruby/merges","archive_url":"https://api.github.com/repos/jruby/jruby/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jruby/jruby/downloads","issues_url":"https://api.github.com/repos/jruby/jruby/issues{/number}","pulls_url":"https://api.github.com/repos/jruby/jruby/pulls{/number}","milestones_url":"https://api.github.com/repos/jruby/jruby/milestones{/number}","notifications_url":"https://api.github.com/repos/jruby/jruby/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jruby/jruby/labels{/name}","releases_url":"https://api.github.com/repos/jruby/jruby/releases{/id}","created_at":"2009-04-05T03:54:35Z","updated_at":"2015-06-23T01:00:54Z","pushed_at":"2015-06-23T07:44:45Z","git_url":"git://github.com/jruby/jruby.git","ssh_url":"git@github.com:jruby/jruby.git","clone_url":"https://github.com/jruby/jruby.git","svn_url":"https://github.com/jruby/jruby","homepage":"http://www.jruby.org","size":417780,"stargazers_count":2163,"watchers_count":2163,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":577,"mirror_url":null,"open_issues_count":732,"forks":577,"open_issues":732,"watchers":2163,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jruby/jruby/pulls/3077"},"html":{"href":"https://github.com/jruby/jruby/pull/3077"},"issue":{"href":"https://api.github.com/repos/jruby/jruby/issues/3077"},"comments":{"href":"https://api.github.com/repos/jruby/jruby/issues/3077/comments"},"review_comments":{"href":"https://api.github.com/repos/jruby/jruby/pulls/3077/comments"},"review_comment":{"href":"https://api.github.com/repos/jruby/jruby/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jruby/jruby/pulls/3077/commits"},"statuses":{"href":"https://api.github.com/repos/jruby/jruby/statuses/a4877a84db4a1ed83bf70608c15f05f68a311f6f"}}}}