{"action":"created","comment":{"url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/comments/77903345","id":77903345,"diff_hunk":"@@ -21,6 +21,7 @@\n #include <cstdint>\n #include <iomanip>\n #include <limits>\n+#include <sstream>","path":"source/util/hex_float.h","position":4,"original_position":4,"commit_id":"95ea1aa9efac2be8a5fc0e46e4ab463a97b800d2","original_commit_id":"95ea1aa9efac2be8a5fc0e46e4ab463a97b800d2","user":{"login":"antiagainst","id":487928,"avatar_url":"https://avatars.githubusercontent.com/u/487928?v=3","gravatar_id":"","url":"https://api.github.com/users/antiagainst","html_url":"https://github.com/antiagainst","followers_url":"https://api.github.com/users/antiagainst/followers","following_url":"https://api.github.com/users/antiagainst/following{/other_user}","gists_url":"https://api.github.com/users/antiagainst/gists{/gist_id}","starred_url":"https://api.github.com/users/antiagainst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antiagainst/subscriptions","organizations_url":"https://api.github.com/users/antiagainst/orgs","repos_url":"https://api.github.com/users/antiagainst/repos","events_url":"https://api.github.com/users/antiagainst/events{/privacy}","received_events_url":"https://api.github.com/users/antiagainst/received_events","type":"User","site_admin":false},"body":"Not used anymore but forgot to remove?","created_at":"2016-09-07T21:03:30Z","updated_at":"2016-09-07T21:03:30Z","html_url":"https://github.com/KhronosGroup/SPIRV-Tools/pull/400#discussion_r77903345","pull_request_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/400","_links":{"self":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/comments/77903345"},"html":{"href":"https://github.com/KhronosGroup/SPIRV-Tools/pull/400#discussion_r77903345"},"pull_request":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/400"}}},"pull_request":{"url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/400","id":83884504,"html_url":"https://github.com/KhronosGroup/SPIRV-Tools/pull/400","diff_url":"https://github.com/KhronosGroup/SPIRV-Tools/pull/400.diff","patch_url":"https://github.com/KhronosGroup/SPIRV-Tools/pull/400.patch","issue_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/issues/400","number":400,"state":"open","locked":false,"title":"Pull out the number parsing logic","user":{"login":"Qining","id":2983685,"avatar_url":"https://avatars.githubusercontent.com/u/2983685?v=3","gravatar_id":"","url":"https://api.github.com/users/Qining","html_url":"https://github.com/Qining","followers_url":"https://api.github.com/users/Qining/followers","following_url":"https://api.github.com/users/Qining/following{/other_user}","gists_url":"https://api.github.com/users/Qining/gists{/gist_id}","starred_url":"https://api.github.com/users/Qining/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Qining/subscriptions","organizations_url":"https://api.github.com/users/Qining/orgs","repos_url":"https://api.github.com/users/Qining/repos","events_url":"https://api.github.com/users/Qining/events{/privacy}","received_events_url":"https://api.github.com/users/Qining/received_events","type":"User","site_admin":false},"body":"Pull out the number parsing logic from\r\nAssemblyContext::binaryEncodeNumericLiteral() to utilities.\r\n\r\nThe new utility function: `ParseNumberFromTextAndEmit()` now accepts:\r\n  * number text to parse\r\n  * type\r\n  * a emit function, which is a function which will be called with each\r\n    parsed uint32 word.\r\nand returns:\r\n  * an enum result type to indicate the states\r\n  * an error message string\r\n\r\nType/Structs moved to utility:\r\n  * IdTypeClass\r\n  * IdType\r\n  * template<typename T> class ClampToZeroIfUnsignedType\r\n\r\nNew type:\r\n  enum ParseNumberResult\r\n\r\nFunctions moved to utility:\r\n  * Helpers:\r\n    * operator== and != overloading for IdType\r\n    * isScalarIntergral()\r\n    * isScalarFloating()\r\n    * assumedBitWidth()\r\n    * template<typename T> checkRangeAndIfHexThenSignExtend() -> CheckRangeAndIfHex....()\r\n  * Interfaces:\r\n    * template<typename T> parseNumber() -> ParseNumber()\r\n    * binaryEncodeIntegerLiteral() -> ParseAndEncodeIntegerNumber()\r\n    * binaryEncodeFloatingPointLiteral() -> ParseAndEncodeFloatingPointNumber()\r\n    * binaryEncodeNumericLiteral() -> ParseAndEncodeNumber()\r\n\r\nTests added/moved to test/ParseNumber.cpp, including tests for:\r\n* ParseNumber(): This is moved from TextToBinary.cpp to ParseNumber.cpp\r\n* ParseAndEncodeIntegerNumber(): New added\r\n* ParseAndEncodeFloatingPointNumber(): New added\r\n* ParseAndEncodeNumber(): New added\r\n\r\nNote that the error messages are kept the same as before, but may be inappropriate for an utility function. Those will be fixed in another CL.","created_at":"2016-09-03T03:19:51Z","updated_at":"2016-09-07T21:03:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"deac0a20beeed66dc11107cf8508112a6ed849bf","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/400/commits","review_comments_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/400/comments","review_comment_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/comments{/number}","comments_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/issues/400/comments","statuses_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/statuses/95ea1aa9efac2be8a5fc0e46e4ab463a97b800d2","head":{"label":"Qining:pull-out-literal-number-encoding","ref":"pull-out-literal-number-encoding","sha":"95ea1aa9efac2be8a5fc0e46e4ab463a97b800d2","user":{"login":"Qining","id":2983685,"avatar_url":"https://avatars.githubusercontent.com/u/2983685?v=3","gravatar_id":"","url":"https://api.github.com/users/Qining","html_url":"https://github.com/Qining","followers_url":"https://api.github.com/users/Qining/followers","following_url":"https://api.github.com/users/Qining/following{/other_user}","gists_url":"https://api.github.com/users/Qining/gists{/gist_id}","starred_url":"https://api.github.com/users/Qining/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Qining/subscriptions","organizations_url":"https://api.github.com/users/Qining/orgs","repos_url":"https://api.github.com/users/Qining/repos","events_url":"https://api.github.com/users/Qining/events{/privacy}","received_events_url":"https://api.github.com/users/Qining/received_events","type":"User","site_admin":false},"repo":{"id":50677710,"name":"SPIRV-Tools","full_name":"Qining/SPIRV-Tools","owner":{"login":"Qining","id":2983685,"avatar_url":"https://avatars.githubusercontent.com/u/2983685?v=3","gravatar_id":"","url":"https://api.github.com/users/Qining","html_url":"https://github.com/Qining","followers_url":"https://api.github.com/users/Qining/followers","following_url":"https://api.github.com/users/Qining/following{/other_user}","gists_url":"https://api.github.com/users/Qining/gists{/gist_id}","starred_url":"https://api.github.com/users/Qining/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Qining/subscriptions","organizations_url":"https://api.github.com/users/Qining/orgs","repos_url":"https://api.github.com/users/Qining/repos","events_url":"https://api.github.com/users/Qining/events{/privacy}","received_events_url":"https://api.github.com/users/Qining/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Qining/SPIRV-Tools","description":"","fork":true,"url":"https://api.github.com/repos/Qining/SPIRV-Tools","forks_url":"https://api.github.com/repos/Qining/SPIRV-Tools/forks","keys_url":"https://api.github.com/repos/Qining/SPIRV-Tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Qining/SPIRV-Tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Qining/SPIRV-Tools/teams","hooks_url":"https://api.github.com/repos/Qining/SPIRV-Tools/hooks","issue_events_url":"https://api.github.com/repos/Qining/SPIRV-Tools/issues/events{/number}","events_url":"https://api.github.com/repos/Qining/SPIRV-Tools/events","assignees_url":"https://api.github.com/repos/Qining/SPIRV-Tools/assignees{/user}","branches_url":"https://api.github.com/repos/Qining/SPIRV-Tools/branches{/branch}","tags_url":"https://api.github.com/repos/Qining/SPIRV-Tools/tags","blobs_url":"https://api.github.com/repos/Qining/SPIRV-Tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Qining/SPIRV-Tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Qining/SPIRV-Tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/Qining/SPIRV-Tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Qining/SPIRV-Tools/statuses/{sha}","languages_url":"https://api.github.com/repos/Qining/SPIRV-Tools/languages","stargazers_url":"https://api.github.com/repos/Qining/SPIRV-Tools/stargazers","contributors_url":"https://api.github.com/repos/Qining/SPIRV-Tools/contributors","subscribers_url":"https://api.github.com/repos/Qining/SPIRV-Tools/subscribers","subscription_url":"https://api.github.com/repos/Qining/SPIRV-Tools/subscription","commits_url":"https://api.github.com/repos/Qining/SPIRV-Tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/Qining/SPIRV-Tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/Qining/SPIRV-Tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/Qining/SPIRV-Tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/Qining/SPIRV-Tools/contents/{+path}","compare_url":"https://api.github.com/repos/Qining/SPIRV-Tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Qining/SPIRV-Tools/merges","archive_url":"https://api.github.com/repos/Qining/SPIRV-Tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Qining/SPIRV-Tools/downloads","issues_url":"https://api.github.com/repos/Qining/SPIRV-Tools/issues{/number}","pulls_url":"https://api.github.com/repos/Qining/SPIRV-Tools/pulls{/number}","milestones_url":"https://api.github.com/repos/Qining/SPIRV-Tools/milestones{/number}","notifications_url":"https://api.github.com/repos/Qining/SPIRV-Tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Qining/SPIRV-Tools/labels{/name}","releases_url":"https://api.github.com/repos/Qining/SPIRV-Tools/releases{/id}","deployments_url":"https://api.github.com/repos/Qining/SPIRV-Tools/deployments","created_at":"2016-01-29T17:10:36Z","updated_at":"2016-01-29T17:10:37Z","pushed_at":"2016-09-07T18:48:43Z","git_url":"git://github.com/Qining/SPIRV-Tools.git","ssh_url":"git@github.com:Qining/SPIRV-Tools.git","clone_url":"https://github.com/Qining/SPIRV-Tools.git","svn_url":"https://github.com/Qining/SPIRV-Tools","homepage":null,"size":2403,"stargazers_count":0,"watchers_count":0,"language":"C++","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":"KhronosGroup:master","ref":"master","sha":"860030feab94360b9bf64cf486b44cffd62bdea8","user":{"login":"KhronosGroup","id":1608701,"avatar_url":"https://avatars.githubusercontent.com/u/1608701?v=3","gravatar_id":"","url":"https://api.github.com/users/KhronosGroup","html_url":"https://github.com/KhronosGroup","followers_url":"https://api.github.com/users/KhronosGroup/followers","following_url":"https://api.github.com/users/KhronosGroup/following{/other_user}","gists_url":"https://api.github.com/users/KhronosGroup/gists{/gist_id}","starred_url":"https://api.github.com/users/KhronosGroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KhronosGroup/subscriptions","organizations_url":"https://api.github.com/users/KhronosGroup/orgs","repos_url":"https://api.github.com/users/KhronosGroup/repos","events_url":"https://api.github.com/users/KhronosGroup/events{/privacy}","received_events_url":"https://api.github.com/users/KhronosGroup/received_events","type":"Organization","site_admin":false},"repo":{"id":45981801,"name":"SPIRV-Tools","full_name":"KhronosGroup/SPIRV-Tools","owner":{"login":"KhronosGroup","id":1608701,"avatar_url":"https://avatars.githubusercontent.com/u/1608701?v=3","gravatar_id":"","url":"https://api.github.com/users/KhronosGroup","html_url":"https://github.com/KhronosGroup","followers_url":"https://api.github.com/users/KhronosGroup/followers","following_url":"https://api.github.com/users/KhronosGroup/following{/other_user}","gists_url":"https://api.github.com/users/KhronosGroup/gists{/gist_id}","starred_url":"https://api.github.com/users/KhronosGroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KhronosGroup/subscriptions","organizations_url":"https://api.github.com/users/KhronosGroup/orgs","repos_url":"https://api.github.com/users/KhronosGroup/repos","events_url":"https://api.github.com/users/KhronosGroup/events{/privacy}","received_events_url":"https://api.github.com/users/KhronosGroup/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/KhronosGroup/SPIRV-Tools","description":"","fork":false,"url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools","forks_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/forks","keys_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/teams","hooks_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/hooks","issue_events_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/issues/events{/number}","events_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/events","assignees_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/assignees{/user}","branches_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/branches{/branch}","tags_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/tags","blobs_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/statuses/{sha}","languages_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/languages","stargazers_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/stargazers","contributors_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/contributors","subscribers_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/subscribers","subscription_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/subscription","commits_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/contents/{+path}","compare_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/merges","archive_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/downloads","issues_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/issues{/number}","pulls_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls{/number}","milestones_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/milestones{/number}","notifications_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/labels{/name}","releases_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/releases{/id}","deployments_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/deployments","created_at":"2015-11-11T12:56:25Z","updated_at":"2016-09-01T23:18:51Z","pushed_at":"2016-09-07T18:48:43Z","git_url":"git://github.com/KhronosGroup/SPIRV-Tools.git","ssh_url":"git@github.com:KhronosGroup/SPIRV-Tools.git","clone_url":"https://github.com/KhronosGroup/SPIRV-Tools.git","svn_url":"https://github.com/KhronosGroup/SPIRV-Tools","homepage":null,"size":3000,"stargazers_count":136,"watchers_count":136,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":34,"mirror_url":null,"open_issues_count":24,"forks":34,"open_issues":24,"watchers":136,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/400"},"html":{"href":"https://github.com/KhronosGroup/SPIRV-Tools/pull/400"},"issue":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/issues/400"},"comments":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/issues/400/comments"},"review_comments":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/400/comments"},"review_comment":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/pulls/400/commits"},"statuses":{"href":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/statuses/95ea1aa9efac2be8a5fc0e46e4ab463a97b800d2"}}}}
{"actor":{"display_login":"antiagainst"}}