{"action":"created","comment":{"url":"https://api.github.com/repos/facebook/prepack/pulls/comments/172645670","pull_request_review_id":101699183,"id":172645670,"diff_hunk":"@@ -669,6 +669,20 @@ export class ToImplementation {\n         let resultType = result.getType();\n \n         // ii. If Type(result) is not Object, return result.\n+        if (resultType === Value) {\n+          invariant(result instanceof AbstractValue);\n+          let error = new CompilerDiagnostic(\n+            `${name} might return either an object or primitive`,\n+            realm.currentLocation,\n+            \"PP0028\",\n+            \"RecoverableError\"\n+          );\n+          if (realm.handleError(error) === \"Recover\") {\n+            // A well behaved toString or valueOf is assumed to return a primitive.\n+            return result;","path":"src/methods/to.js","position":23,"original_position":23,"commit_id":"4a2140513bc31ef19f361c157dd389c8bd41d470","original_commit_id":"4a2140513bc31ef19f361c157dd389c8bd41d470","user":{"login":"sebmarkbage","id":63648,"avatar_url":"https://avatars2.githubusercontent.com/u/63648?v=4","gravatar_id":"","url":"https://api.github.com/users/sebmarkbage","html_url":"https://github.com/sebmarkbage","followers_url":"https://api.github.com/users/sebmarkbage/followers","following_url":"https://api.github.com/users/sebmarkbage/following{/other_user}","gists_url":"https://api.github.com/users/sebmarkbage/gists{/gist_id}","starred_url":"https://api.github.com/users/sebmarkbage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebmarkbage/subscriptions","organizations_url":"https://api.github.com/users/sebmarkbage/orgs","repos_url":"https://api.github.com/users/sebmarkbage/repos","events_url":"https://api.github.com/users/sebmarkbage/events{/privacy}","received_events_url":"https://api.github.com/users/sebmarkbage/received_events","type":"User","site_admin":false},"body":"What is the intention of \"Recover\"? It is somewhat saying that we assume it is \"well behaved\" but what does that mean? Must it have a specific meaning or can it be broader in some sense of what we expect will happen?","created_at":"2018-03-06T20:15:05Z","updated_at":"2018-03-06T20:15:05Z","html_url":"https://github.com/facebook/prepack/pull/1476#discussion_r172645670","pull_request_url":"https://api.github.com/repos/facebook/prepack/pulls/1476","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/facebook/prepack/pulls/comments/172645670"},"html":{"href":"https://github.com/facebook/prepack/pull/1476#discussion_r172645670"},"pull_request":{"href":"https://api.github.com/repos/facebook/prepack/pulls/1476"}},"in_reply_to_id":172642663},"pull_request":{"url":"https://api.github.com/repos/facebook/prepack/pulls/1476","id":170399256,"html_url":"https://github.com/facebook/prepack/pull/1476","diff_url":"https://github.com/facebook/prepack/pull/1476.diff","patch_url":"https://github.com/facebook/prepack/pull/1476.patch","issue_url":"https://api.github.com/repos/facebook/prepack/issues/1476","number":1476,"state":"open","locked":false,"title":"Follow up to abstract binary expressions","user":{"login":"sebmarkbage","id":63648,"avatar_url":"https://avatars2.githubusercontent.com/u/63648?v=4","gravatar_id":"","url":"https://api.github.com/users/sebmarkbage","html_url":"https://github.com/sebmarkbage","followers_url":"https://api.github.com/users/sebmarkbage/followers","following_url":"https://api.github.com/users/sebmarkbage/following{/other_user}","gists_url":"https://api.github.com/users/sebmarkbage/gists{/gist_id}","starred_url":"https://api.github.com/users/sebmarkbage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebmarkbage/subscriptions","organizations_url":"https://api.github.com/users/sebmarkbage/orgs","repos_url":"https://api.github.com/users/sebmarkbage/repos","events_url":"https://api.github.com/users/sebmarkbage/events{/privacy}","received_events_url":"https://api.github.com/users/sebmarkbage/received_events","type":"User","site_admin":false},"body":"This is a follow up to #1473. \r\n\r\nSee individual commits for comments.\r\n","created_at":"2018-02-21T08:03:53Z","updated_at":"2018-03-06T20:15:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8dfddbdcdc470b60477df777811fd2d5e285c504","assignee":null,"assignees":[],"requested_reviewers":[{"login":"gaearon","id":810438,"avatar_url":"https://avatars0.githubusercontent.com/u/810438?v=4","gravatar_id":"","url":"https://api.github.com/users/gaearon","html_url":"https://github.com/gaearon","followers_url":"https://api.github.com/users/gaearon/followers","following_url":"https://api.github.com/users/gaearon/following{/other_user}","gists_url":"https://api.github.com/users/gaearon/gists{/gist_id}","starred_url":"https://api.github.com/users/gaearon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaearon/subscriptions","organizations_url":"https://api.github.com/users/gaearon/orgs","repos_url":"https://api.github.com/users/gaearon/repos","events_url":"https://api.github.com/users/gaearon/events{/privacy}","received_events_url":"https://api.github.com/users/gaearon/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":279345275,"url":"https://api.github.com/repos/facebook/prepack/labels/CLA%20Signed","name":"CLA Signed","color":"009900","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/facebook/prepack/pulls/1476/commits","review_comments_url":"https://api.github.com/repos/facebook/prepack/pulls/1476/comments","review_comment_url":"https://api.github.com/repos/facebook/prepack/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/prepack/issues/1476/comments","statuses_url":"https://api.github.com/repos/facebook/prepack/statuses/4a2140513bc31ef19f361c157dd389c8bd41d470","head":{"label":"sebmarkbage:binary-expressions-tests","ref":"binary-expressions-tests","sha":"4a2140513bc31ef19f361c157dd389c8bd41d470","user":{"login":"sebmarkbage","id":63648,"avatar_url":"https://avatars2.githubusercontent.com/u/63648?v=4","gravatar_id":"","url":"https://api.github.com/users/sebmarkbage","html_url":"https://github.com/sebmarkbage","followers_url":"https://api.github.com/users/sebmarkbage/followers","following_url":"https://api.github.com/users/sebmarkbage/following{/other_user}","gists_url":"https://api.github.com/users/sebmarkbage/gists{/gist_id}","starred_url":"https://api.github.com/users/sebmarkbage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebmarkbage/subscriptions","organizations_url":"https://api.github.com/users/sebmarkbage/orgs","repos_url":"https://api.github.com/users/sebmarkbage/repos","events_url":"https://api.github.com/users/sebmarkbage/events{/privacy}","received_events_url":"https://api.github.com/users/sebmarkbage/received_events","type":"User","site_admin":false},"repo":{"id":90206509,"name":"prepack","full_name":"sebmarkbage/prepack","owner":{"login":"sebmarkbage","id":63648,"avatar_url":"https://avatars2.githubusercontent.com/u/63648?v=4","gravatar_id":"","url":"https://api.github.com/users/sebmarkbage","html_url":"https://github.com/sebmarkbage","followers_url":"https://api.github.com/users/sebmarkbage/followers","following_url":"https://api.github.com/users/sebmarkbage/following{/other_user}","gists_url":"https://api.github.com/users/sebmarkbage/gists{/gist_id}","starred_url":"https://api.github.com/users/sebmarkbage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebmarkbage/subscriptions","organizations_url":"https://api.github.com/users/sebmarkbage/orgs","repos_url":"https://api.github.com/users/sebmarkbage/repos","events_url":"https://api.github.com/users/sebmarkbage/events{/privacy}","received_events_url":"https://api.github.com/users/sebmarkbage/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sebmarkbage/prepack","description":"Prepack is a partial evaluator for JavaScript. Prepack rewrites a JavaScript bundle, resulting in JavaScript code that executes more efficiently.","fork":true,"url":"https://api.github.com/repos/sebmarkbage/prepack","forks_url":"https://api.github.com/repos/sebmarkbage/prepack/forks","keys_url":"https://api.github.com/repos/sebmarkbage/prepack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sebmarkbage/prepack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sebmarkbage/prepack/teams","hooks_url":"https://api.github.com/repos/sebmarkbage/prepack/hooks","issue_events_url":"https://api.github.com/repos/sebmarkbage/prepack/issues/events{/number}","events_url":"https://api.github.com/repos/sebmarkbage/prepack/events","assignees_url":"https://api.github.com/repos/sebmarkbage/prepack/assignees{/user}","branches_url":"https://api.github.com/repos/sebmarkbage/prepack/branches{/branch}","tags_url":"https://api.github.com/repos/sebmarkbage/prepack/tags","blobs_url":"https://api.github.com/repos/sebmarkbage/prepack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sebmarkbage/prepack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sebmarkbage/prepack/git/refs{/sha}","trees_url":"https://api.github.com/repos/sebmarkbage/prepack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sebmarkbage/prepack/statuses/{sha}","languages_url":"https://api.github.com/repos/sebmarkbage/prepack/languages","stargazers_url":"https://api.github.com/repos/sebmarkbage/prepack/stargazers","contributors_url":"https://api.github.com/repos/sebmarkbage/prepack/contributors","subscribers_url":"https://api.github.com/repos/sebmarkbage/prepack/subscribers","subscription_url":"https://api.github.com/repos/sebmarkbage/prepack/subscription","commits_url":"https://api.github.com/repos/sebmarkbage/prepack/commits{/sha}","git_commits_url":"https://api.github.com/repos/sebmarkbage/prepack/git/commits{/sha}","comments_url":"https://api.github.com/repos/sebmarkbage/prepack/comments{/number}","issue_comment_url":"https://api.github.com/repos/sebmarkbage/prepack/issues/comments{/number}","contents_url":"https://api.github.com/repos/sebmarkbage/prepack/contents/{+path}","compare_url":"https://api.github.com/repos/sebmarkbage/prepack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sebmarkbage/prepack/merges","archive_url":"https://api.github.com/repos/sebmarkbage/prepack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sebmarkbage/prepack/downloads","issues_url":"https://api.github.com/repos/sebmarkbage/prepack/issues{/number}","pulls_url":"https://api.github.com/repos/sebmarkbage/prepack/pulls{/number}","milestones_url":"https://api.github.com/repos/sebmarkbage/prepack/milestones{/number}","notifications_url":"https://api.github.com/repos/sebmarkbage/prepack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sebmarkbage/prepack/labels{/name}","releases_url":"https://api.github.com/repos/sebmarkbage/prepack/releases{/id}","deployments_url":"https://api.github.com/repos/sebmarkbage/prepack/deployments","created_at":"2017-05-04T00:58:17Z","updated_at":"2017-05-07T09:32:56Z","pushed_at":"2018-03-06T08:50:43Z","git_url":"git://github.com/sebmarkbage/prepack.git","ssh_url":"git@github.com:sebmarkbage/prepack.git","clone_url":"https://github.com/sebmarkbage/prepack.git","svn_url":"https://github.com/sebmarkbage/prepack","homepage":"https://prepack.io","size":4704,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"facebook:master","ref":"master","sha":"905b9370438de15bcd99649e812ed3caa3aff67e","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars3.githubusercontent.com/u/69631?v=4","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":45147841,"name":"prepack","full_name":"facebook/prepack","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars3.githubusercontent.com/u/69631?v=4","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/prepack","description":"Prepack is a partial evaluator for JavaScript. Prepack rewrites a JavaScript bundle, resulting in JavaScript code that executes more efficiently.","fork":false,"url":"https://api.github.com/repos/facebook/prepack","forks_url":"https://api.github.com/repos/facebook/prepack/forks","keys_url":"https://api.github.com/repos/facebook/prepack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/prepack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/prepack/teams","hooks_url":"https://api.github.com/repos/facebook/prepack/hooks","issue_events_url":"https://api.github.com/repos/facebook/prepack/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/prepack/events","assignees_url":"https://api.github.com/repos/facebook/prepack/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/prepack/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/prepack/tags","blobs_url":"https://api.github.com/repos/facebook/prepack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/prepack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/prepack/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/prepack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/prepack/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/prepack/languages","stargazers_url":"https://api.github.com/repos/facebook/prepack/stargazers","contributors_url":"https://api.github.com/repos/facebook/prepack/contributors","subscribers_url":"https://api.github.com/repos/facebook/prepack/subscribers","subscription_url":"https://api.github.com/repos/facebook/prepack/subscription","commits_url":"https://api.github.com/repos/facebook/prepack/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/prepack/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/prepack/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/prepack/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/prepack/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/prepack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/prepack/merges","archive_url":"https://api.github.com/repos/facebook/prepack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/prepack/downloads","issues_url":"https://api.github.com/repos/facebook/prepack/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/prepack/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/prepack/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/prepack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/prepack/labels{/name}","releases_url":"https://api.github.com/repos/facebook/prepack/releases{/id}","deployments_url":"https://api.github.com/repos/facebook/prepack/deployments","created_at":"2015-10-28T23:25:08Z","updated_at":"2018-03-06T15:23:55Z","pushed_at":"2018-03-06T20:14:41Z","git_url":"git://github.com/facebook/prepack.git","ssh_url":"git@github.com:facebook/prepack.git","clone_url":"https://github.com/facebook/prepack.git","svn_url":"https://github.com/facebook/prepack","homepage":"https://prepack.io","size":7756,"stargazers_count":11343,"watchers_count":11343,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":338,"mirror_url":null,"archived":false,"open_issues_count":127,"license":null,"forks":338,"open_issues":127,"watchers":11343,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/prepack/pulls/1476"},"html":{"href":"https://github.com/facebook/prepack/pull/1476"},"issue":{"href":"https://api.github.com/repos/facebook/prepack/issues/1476"},"comments":{"href":"https://api.github.com/repos/facebook/prepack/issues/1476/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/prepack/pulls/1476/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/prepack/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/prepack/pulls/1476/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/prepack/statuses/4a2140513bc31ef19f361c157dd389c8bd41d470"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"sebmarkbage"}}