{"action":"created","comment":{"url":"https://api.github.com/repos/ethereum/solidity/pulls/comments/59926470","id":59926470,"diff_hunk":"@@ -340,11 +364,133 @@ MemberList::MemberMap IntegerType::nativeMembers(ContractDefinition const*) cons\n \t\treturn MemberList::MemberMap();\n }\n \n-bool IntegerConstantType::isValidLiteral(const Literal& _literal)\n+FixedPointType::FixedPointType(int _integerBits, int _fractionalBits, FixedPointType::Modifier _modifier):\n+\tm_integerBits(_integerBits), m_fractionalBits(_fractionalBits), m_modifier(_modifier)\n+{\n+\tsolAssert(\n+\t\tm_integerBits + m_fractionalBits > 0 && ","path":"libsolidity/ast/Types.cpp","position":108,"original_position":108,"commit_id":"8ff285ff33cefe8842ce181b470e35ae95eb91ae","original_commit_id":"8ff285ff33cefe8842ce181b470e35ae95eb91ae","user":{"login":"VoR0220","id":7756785,"avatar_url":"https://avatars.githubusercontent.com/u/7756785?v=3","gravatar_id":"","url":"https://api.github.com/users/VoR0220","html_url":"https://github.com/VoR0220","followers_url":"https://api.github.com/users/VoR0220/followers","following_url":"https://api.github.com/users/VoR0220/following{/other_user}","gists_url":"https://api.github.com/users/VoR0220/gists{/gist_id}","starred_url":"https://api.github.com/users/VoR0220/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VoR0220/subscriptions","organizations_url":"https://api.github.com/users/VoR0220/orgs","repos_url":"https://api.github.com/users/VoR0220/repos","events_url":"https://api.github.com/users/VoR0220/events{/privacy}","received_events_url":"https://api.github.com/users/VoR0220/received_events","type":"User","site_admin":false},"body":"for me it would seem that it might make type conversion easier for the user. ","created_at":"2016-04-15T19:14:02Z","updated_at":"2016-04-15T19:14:02Z","html_url":"https://github.com/ethereum/solidity/pull/402#discussion_r59926470","pull_request_url":"https://api.github.com/repos/ethereum/solidity/pulls/402","_links":{"self":{"href":"https://api.github.com/repos/ethereum/solidity/pulls/comments/59926470"},"html":{"href":"https://github.com/ethereum/solidity/pull/402#discussion_r59926470"},"pull_request":{"href":"https://api.github.com/repos/ethereum/solidity/pulls/402"}}},"pull_request":{"url":"https://api.github.com/repos/ethereum/solidity/pulls/402","id":59876785,"html_url":"https://github.com/ethereum/solidity/pull/402","diff_url":"https://github.com/ethereum/solidity/pull/402.diff","patch_url":"https://github.com/ethereum/solidity/pull/402.patch","issue_url":"https://api.github.com/repos/ethereum/solidity/issues/402","number":402,"state":"open","locked":false,"title":"Fixed Type initial PR","user":{"login":"VoR0220","id":7756785,"avatar_url":"https://avatars.githubusercontent.com/u/7756785?v=3","gravatar_id":"","url":"https://api.github.com/users/VoR0220","html_url":"https://github.com/VoR0220","followers_url":"https://api.github.com/users/VoR0220/followers","following_url":"https://api.github.com/users/VoR0220/following{/other_user}","gists_url":"https://api.github.com/users/VoR0220/gists{/gist_id}","starred_url":"https://api.github.com/users/VoR0220/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VoR0220/subscriptions","organizations_url":"https://api.github.com/users/VoR0220/orgs","repos_url":"https://api.github.com/users/VoR0220/repos","events_url":"https://api.github.com/users/VoR0220/events{/privacy}","received_events_url":"https://api.github.com/users/VoR0220/received_events","type":"User","site_admin":false},"body":"Fixes https://github.com/ethereum/solidity/issues/428\r\n\r\nThis is moreso going to be a place for general review and help in constructing the type. This is the initial work here. I believe it will also need a constant literal type strictly for fixed points, and I believe that if possible, we ought to have a separate integer itself in addition to the two ints that construct the type and we should make it the size of the two combined. This would enable simple arithmetic and all we would need to do would be to keep track of where the radix point is.\r\n\r\nFrankly, my knowledge of the EVM assembly is still fairly lacking and I'm a bit shaky on how to construct the codegen, so any tips in this area are SUPER helpful. \r\n\r\nAs you can see here, currently we have:\r\n- New tokens\r\n- New type categories\r\n- Updated mechanisms in FromIdentifierOrKeyword as well as ElementaryTypeNameToken to reflect new tokens\r\n- made Integers and Rationals (formerly Integer contants) implicitly convertable to fixed types and vice versa.\r\n- added a couple of tests to ensure parsing would go over smoothly\r\n- Implemented Binary operations that for the most part work (EXPONENTS!!!!!)\r\n- Enabled a way to create a leading zero figure.\r\n- Can now use rationals in inline arrays\r\n\r\nWhat we need to work on:\r\n\r\n-How are we going to implement the fixed cast for exponents and negative numbers (currently causing infinite loop)? \r\n-How do we scale a rational number so that it can be converted into a fixed point type?\r\n-Mobile types for fixed point need to be rectified with how we want to do this.\r\n-Need EndToEnd tests for the eventual compiler modifications.\r\n-Do we need a new function in the Execution Framework for encoding fixed point types? \r\n","created_at":"2016-02-18T22:49:36Z","updated_at":"2016-04-15T19:14:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5b2f84973999f3e50604a67c80ba01ea6bb5f72e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ethereum/solidity/pulls/402/commits","review_comments_url":"https://api.github.com/repos/ethereum/solidity/pulls/402/comments","review_comment_url":"https://api.github.com/repos/ethereum/solidity/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ethereum/solidity/issues/402/comments","statuses_url":"https://api.github.com/repos/ethereum/solidity/statuses/8ff285ff33cefe8842ce181b470e35ae95eb91ae","head":{"label":"VoR0220:fixedDataType","ref":"fixedDataType","sha":"8ff285ff33cefe8842ce181b470e35ae95eb91ae","user":{"login":"VoR0220","id":7756785,"avatar_url":"https://avatars.githubusercontent.com/u/7756785?v=3","gravatar_id":"","url":"https://api.github.com/users/VoR0220","html_url":"https://github.com/VoR0220","followers_url":"https://api.github.com/users/VoR0220/followers","following_url":"https://api.github.com/users/VoR0220/following{/other_user}","gists_url":"https://api.github.com/users/VoR0220/gists{/gist_id}","starred_url":"https://api.github.com/users/VoR0220/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VoR0220/subscriptions","organizations_url":"https://api.github.com/users/VoR0220/orgs","repos_url":"https://api.github.com/users/VoR0220/repos","events_url":"https://api.github.com/users/VoR0220/events{/privacy}","received_events_url":"https://api.github.com/users/VoR0220/received_events","type":"User","site_admin":false},"repo":{"id":47712924,"name":"solidity","full_name":"VoR0220/solidity","owner":{"login":"VoR0220","id":7756785,"avatar_url":"https://avatars.githubusercontent.com/u/7756785?v=3","gravatar_id":"","url":"https://api.github.com/users/VoR0220","html_url":"https://github.com/VoR0220","followers_url":"https://api.github.com/users/VoR0220/followers","following_url":"https://api.github.com/users/VoR0220/following{/other_user}","gists_url":"https://api.github.com/users/VoR0220/gists{/gist_id}","starred_url":"https://api.github.com/users/VoR0220/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VoR0220/subscriptions","organizations_url":"https://api.github.com/users/VoR0220/orgs","repos_url":"https://api.github.com/users/VoR0220/repos","events_url":"https://api.github.com/users/VoR0220/events{/privacy}","received_events_url":"https://api.github.com/users/VoR0220/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/VoR0220/solidity","description":"The Solidity Contract-Oriented Programming Language","fork":true,"url":"https://api.github.com/repos/VoR0220/solidity","forks_url":"https://api.github.com/repos/VoR0220/solidity/forks","keys_url":"https://api.github.com/repos/VoR0220/solidity/keys{/key_id}","collaborators_url":"https://api.github.com/repos/VoR0220/solidity/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/VoR0220/solidity/teams","hooks_url":"https://api.github.com/repos/VoR0220/solidity/hooks","issue_events_url":"https://api.github.com/repos/VoR0220/solidity/issues/events{/number}","events_url":"https://api.github.com/repos/VoR0220/solidity/events","assignees_url":"https://api.github.com/repos/VoR0220/solidity/assignees{/user}","branches_url":"https://api.github.com/repos/VoR0220/solidity/branches{/branch}","tags_url":"https://api.github.com/repos/VoR0220/solidity/tags","blobs_url":"https://api.github.com/repos/VoR0220/solidity/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/VoR0220/solidity/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/VoR0220/solidity/git/refs{/sha}","trees_url":"https://api.github.com/repos/VoR0220/solidity/git/trees{/sha}","statuses_url":"https://api.github.com/repos/VoR0220/solidity/statuses/{sha}","languages_url":"https://api.github.com/repos/VoR0220/solidity/languages","stargazers_url":"https://api.github.com/repos/VoR0220/solidity/stargazers","contributors_url":"https://api.github.com/repos/VoR0220/solidity/contributors","subscribers_url":"https://api.github.com/repos/VoR0220/solidity/subscribers","subscription_url":"https://api.github.com/repos/VoR0220/solidity/subscription","commits_url":"https://api.github.com/repos/VoR0220/solidity/commits{/sha}","git_commits_url":"https://api.github.com/repos/VoR0220/solidity/git/commits{/sha}","comments_url":"https://api.github.com/repos/VoR0220/solidity/comments{/number}","issue_comment_url":"https://api.github.com/repos/VoR0220/solidity/issues/comments{/number}","contents_url":"https://api.github.com/repos/VoR0220/solidity/contents/{+path}","compare_url":"https://api.github.com/repos/VoR0220/solidity/compare/{base}...{head}","merges_url":"https://api.github.com/repos/VoR0220/solidity/merges","archive_url":"https://api.github.com/repos/VoR0220/solidity/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/VoR0220/solidity/downloads","issues_url":"https://api.github.com/repos/VoR0220/solidity/issues{/number}","pulls_url":"https://api.github.com/repos/VoR0220/solidity/pulls{/number}","milestones_url":"https://api.github.com/repos/VoR0220/solidity/milestones{/number}","notifications_url":"https://api.github.com/repos/VoR0220/solidity/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/VoR0220/solidity/labels{/name}","releases_url":"https://api.github.com/repos/VoR0220/solidity/releases{/id}","deployments_url":"https://api.github.com/repos/VoR0220/solidity/deployments","created_at":"2015-12-09T19:11:37Z","updated_at":"2016-01-11T03:36:48Z","pushed_at":"2016-04-15T15:08:35Z","git_url":"git://github.com/VoR0220/solidity.git","ssh_url":"git@github.com:VoR0220/solidity.git","clone_url":"https://github.com/VoR0220/solidity.git","svn_url":"https://github.com/VoR0220/solidity","homepage":"","size":8036,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"ethereum:develop","ref":"develop","sha":"054bc2a6ac4857f3aa9d7b5f0ec23ec5a3ee109b","user":{"login":"ethereum","id":6250754,"avatar_url":"https://avatars.githubusercontent.com/u/6250754?v=3","gravatar_id":"","url":"https://api.github.com/users/ethereum","html_url":"https://github.com/ethereum","followers_url":"https://api.github.com/users/ethereum/followers","following_url":"https://api.github.com/users/ethereum/following{/other_user}","gists_url":"https://api.github.com/users/ethereum/gists{/gist_id}","starred_url":"https://api.github.com/users/ethereum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethereum/subscriptions","organizations_url":"https://api.github.com/users/ethereum/orgs","repos_url":"https://api.github.com/users/ethereum/repos","events_url":"https://api.github.com/users/ethereum/events{/privacy}","received_events_url":"https://api.github.com/users/ethereum/received_events","type":"Organization","site_admin":false},"repo":{"id":40892817,"name":"solidity","full_name":"ethereum/solidity","owner":{"login":"ethereum","id":6250754,"avatar_url":"https://avatars.githubusercontent.com/u/6250754?v=3","gravatar_id":"","url":"https://api.github.com/users/ethereum","html_url":"https://github.com/ethereum","followers_url":"https://api.github.com/users/ethereum/followers","following_url":"https://api.github.com/users/ethereum/following{/other_user}","gists_url":"https://api.github.com/users/ethereum/gists{/gist_id}","starred_url":"https://api.github.com/users/ethereum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethereum/subscriptions","organizations_url":"https://api.github.com/users/ethereum/orgs","repos_url":"https://api.github.com/users/ethereum/repos","events_url":"https://api.github.com/users/ethereum/events{/privacy}","received_events_url":"https://api.github.com/users/ethereum/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ethereum/solidity","description":"The Solidity Contract-Oriented Programming Language","fork":false,"url":"https://api.github.com/repos/ethereum/solidity","forks_url":"https://api.github.com/repos/ethereum/solidity/forks","keys_url":"https://api.github.com/repos/ethereum/solidity/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ethereum/solidity/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ethereum/solidity/teams","hooks_url":"https://api.github.com/repos/ethereum/solidity/hooks","issue_events_url":"https://api.github.com/repos/ethereum/solidity/issues/events{/number}","events_url":"https://api.github.com/repos/ethereum/solidity/events","assignees_url":"https://api.github.com/repos/ethereum/solidity/assignees{/user}","branches_url":"https://api.github.com/repos/ethereum/solidity/branches{/branch}","tags_url":"https://api.github.com/repos/ethereum/solidity/tags","blobs_url":"https://api.github.com/repos/ethereum/solidity/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ethereum/solidity/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ethereum/solidity/git/refs{/sha}","trees_url":"https://api.github.com/repos/ethereum/solidity/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ethereum/solidity/statuses/{sha}","languages_url":"https://api.github.com/repos/ethereum/solidity/languages","stargazers_url":"https://api.github.com/repos/ethereum/solidity/stargazers","contributors_url":"https://api.github.com/repos/ethereum/solidity/contributors","subscribers_url":"https://api.github.com/repos/ethereum/solidity/subscribers","subscription_url":"https://api.github.com/repos/ethereum/solidity/subscription","commits_url":"https://api.github.com/repos/ethereum/solidity/commits{/sha}","git_commits_url":"https://api.github.com/repos/ethereum/solidity/git/commits{/sha}","comments_url":"https://api.github.com/repos/ethereum/solidity/comments{/number}","issue_comment_url":"https://api.github.com/repos/ethereum/solidity/issues/comments{/number}","contents_url":"https://api.github.com/repos/ethereum/solidity/contents/{+path}","compare_url":"https://api.github.com/repos/ethereum/solidity/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ethereum/solidity/merges","archive_url":"https://api.github.com/repos/ethereum/solidity/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ethereum/solidity/downloads","issues_url":"https://api.github.com/repos/ethereum/solidity/issues{/number}","pulls_url":"https://api.github.com/repos/ethereum/solidity/pulls{/number}","milestones_url":"https://api.github.com/repos/ethereum/solidity/milestones{/number}","notifications_url":"https://api.github.com/repos/ethereum/solidity/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ethereum/solidity/labels{/name}","releases_url":"https://api.github.com/repos/ethereum/solidity/releases{/id}","deployments_url":"https://api.github.com/repos/ethereum/solidity/deployments","created_at":"2015-08-17T12:27:26Z","updated_at":"2016-04-15T15:22:00Z","pushed_at":"2016-04-15T19:06:32Z","git_url":"git://github.com/ethereum/solidity.git","ssh_url":"git@github.com:ethereum/solidity.git","clone_url":"https://github.com/ethereum/solidity.git","svn_url":"https://github.com/ethereum/solidity","homepage":"","size":10012,"stargazers_count":168,"watchers_count":168,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":86,"mirror_url":null,"open_issues_count":76,"forks":86,"open_issues":76,"watchers":168,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/ethereum/solidity/pulls/402"},"html":{"href":"https://github.com/ethereum/solidity/pull/402"},"issue":{"href":"https://api.github.com/repos/ethereum/solidity/issues/402"},"comments":{"href":"https://api.github.com/repos/ethereum/solidity/issues/402/comments"},"review_comments":{"href":"https://api.github.com/repos/ethereum/solidity/pulls/402/comments"},"review_comment":{"href":"https://api.github.com/repos/ethereum/solidity/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ethereum/solidity/pulls/402/commits"},"statuses":{"href":"https://api.github.com/repos/ethereum/solidity/statuses/8ff285ff33cefe8842ce181b470e35ae95eb91ae"}}}}