GitHub PullRequestReviewCommentEvent at 2014-11-24 01:33:46
Repository: dmd
Actor: IgorStepanov
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/D-Programming-Language/dmd/pulls/comments/20770388","id":20770388,"diff_hunk":"@@ -4143,8 +4146,12 @@ Expression *AssocArrayLiteralExp::semantic(Scope *sc)\n #if LOGSEMANTIC\n     printf(\"AssocArrayLiteralExp::semantic('%s')\\n\", toChars());\n #endif\n+    assert(sc);\n     if (type)\n+    {\n+        aaLiteralCreate(sc);","path":"src/expression.c","position":37,"original_position":37,"commit_id":"c6d1cb84bf7e33c6536d392166bc0ab997510117","original_commit_id":"c6d1cb84bf7e33c6536d392166bc0ab997510117","user":{"login":"IgorStepanov","id":1143799,"avatar_url":"https://avatars.githubusercontent.com/u/1143799?v=3","gravatar_id":"","url":"https://api.github.com/users/IgorStepanov","html_url":"https://github.com/IgorStepanov","followers_url":"https://api.github.com/users/IgorStepanov/followers","following_url":"https://api.github.com/users/IgorStepanov/following{/other_user}","gists_url":"https://api.github.com/users/IgorStepanov/gists{/gist_id}","starred_url":"https://api.github.com/users/IgorStepanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IgorStepanov/subscriptions","organizations_url":"https://api.github.com/users/IgorStepanov/orgs","repos_url":"https://api.github.com/users/IgorStepanov/repos","events_url":"https://api.github.com/users/IgorStepanov/events{/privacy}","received_events_url":"https://api.github.com/users/IgorStepanov/received_events","type":"User","site_admin":false},"body":"Hmm, I added it, because dmd code somewhere changes expression after senantic call. I'll try to remove it, may be this issue was fixed. BTW, DMD is free enough to call semantic. For example it may change expression type for expression which already passed semantic and doesn't recall semantic after it. Sometimes DMD may \"simulate\" semantic call: set type, some values and skip `semantic()`.\r\n","created_at":"2014-11-24T01:33:46Z","updated_at":"2014-11-24T01:33:46Z","html_url":"https://github.com/D-Programming-Language/dmd/pull/3904#discussion_r20770388","pull_request_url":"https://api.github.com/repos/D-Programming-Language/dmd/pulls/3904","_links":{"self":{"href":"https://api.github.com/repos/D-Programming-Language/dmd/pulls/comments/20770388"},"html":{"href":"https://github.com/D-Programming-Language/dmd/pull/3904#discussion_r20770388"},"pull_request":{"href":"https://api.github.com/repos/D-Programming-Language/dmd/pulls/3904"}}},"pull_request":{"url":"https://api.github.com/repos/D-Programming-Language/dmd/pulls/3904","id":20333818,"html_url":"https://github.com/D-Programming-Language/dmd/pull/3904","diff_url":"https://github.com/D-Programming-Language/dmd/pull/3904.diff","patch_url":"https://github.com/D-Programming-Language/dmd/pull/3904.patch","issue_url":"https://api.github.com/repos/D-Programming-Language/dmd/issues/3904","number":3904,"state":"open","locked":false,"title":"[new AA] aaLiteral support","user":{"login":"IgorStepanov","id":1143799,"avatar_url":"https://avatars.githubusercontent.com/u/1143799?v=3","gravatar_id":"","url":"https://api.github.com/users/IgorStepanov","html_url":"https://github.com/IgorStepanov","followers_url":"https://api.github.com/users/IgorStepanov/followers","following_url":"https://api.github.com/users/IgorStepanov/following{/other_user}","gists_url":"https://api.github.com/users/IgorStepanov/gists{/gist_id}","starred_url":"https://api.github.com/users/IgorStepanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IgorStepanov/subscriptions","organizations_url":"https://api.github.com/users/IgorStepanov/orgs","repos_url":"https://api.github.com/users/IgorStepanov/repos","events_url":"https://api.github.com/users/IgorStepanov/events{/privacy}","received_events_url":"https://api.github.com/users/IgorStepanov/received_events","type":"User","site_admin":false},"body":"This PR depends on D-Programming-Language/druntime#933\r\nThis PR based on #3892, however in use zero AA init value.\r\nI think, this way more pretty and safe.\r\nNew AA implemetation use template `object.aaLiteral` function to create AA.\r\nThis implemetation allows to return AA literals from CTFE, if `object.aaLiteral` can be evaluated at compile time. New aa implementation (D-Programming-Language/druntime#934) allow creating instances of AA at compile time (of cource, if hashes is CTFEable, and elements are eveluatable at compile time).\r\nTemplate-based way implementation prevent using TypeInfo-based code, thus we need to know static Key and Value types to create AA instance.\r\nAs I said, this AA implementation doesn't use special initializer and empty AA like `int[int] aa;` doesn't know his static type.\r\nWhen we try to insert value in AA, compiler generates call of a special function : `aaGetX` and if it takes `null` AA, it can't create new AA instance without auxilarity function.\r\nThus when compiler does it, it passes pointer to `aaLiteral(Key, Value)` (without arguments) to `aaGetX` and `aaGetX` can use this function to initialize empty AA.\r\n","created_at":"2014-08-26T20:10:07Z","updated_at":"2014-11-24T01:33:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d7bf75c8a9511063d83ad30f0454d549b663e1ff","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/D-Programming-Language/dmd/pulls/3904/commits","review_comments_url":"https://api.github.com/repos/D-Programming-Language/dmd/pulls/3904/comments","review_comment_url":"https://api.github.com/repos/D-Programming-Language/dmd/pulls/comments/{number}","comments_url":"https://api.github.com/repos/D-Programming-Language/dmd/issues/3904/comments","statuses_url":"https://api.github.com/repos/D-Programming-Language/dmd/statuses/c6d1cb84bf7e33c6536d392166bc0ab997510117","head":{"label":"IgorStepanov:aaintegration3","ref":"aaintegration3","sha":"c6d1cb84bf7e33c6536d392166bc0ab997510117","user":{"login":"IgorStepanov","id":1143799,"avatar_url":"https://avatars.githubusercontent.com/u/1143799?v=3","gravatar_id":"","url":"https://api.github.com/users/IgorStepanov","html_url":"https://github.com/IgorStepanov","followers_url":"https://api.github.com/users/IgorStepanov/followers","following_url":"https://api.github.com/users/IgorStepanov/following{/other_user}","gists_url":"https://api.github.com/users/IgorStepanov/gists{/gist_id}","starred_url":"https://api.github.com/users/IgorStepanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IgorStepanov/subscriptions","organizations_url":"https://api.github.com/users/IgorStepanov/orgs","repos_url":"https://api.github.com/users/IgorStepanov/repos","events_url":"https://api.github.com/users/IgorStepanov/events{/privacy}","received_events_url":"https://api.github.com/users/IgorStepanov/received_events","type":"User","site_admin":false},"repo":{"id":8583804,"name":"dmd","full_name":"IgorStepanov/dmd","owner":{"login":"IgorStepanov","id":1143799,"avatar_url":"https://avatars.githubusercontent.com/u/1143799?v=3","gravatar_id":"","url":"https://api.github.com/users/IgorStepanov","html_url":"https://github.com/IgorStepanov","followers_url":"https://api.github.com/users/IgorStepanov/followers","following_url":"https://api.github.com/users/IgorStepanov/following{/other_user}","gists_url":"https://api.github.com/users/IgorStepanov/gists{/gist_id}","starred_url":"https://api.github.com/users/IgorStepanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IgorStepanov/subscriptions","organizations_url":"https://api.github.com/users/IgorStepanov/orgs","repos_url":"https://api.github.com/users/IgorStepanov/repos","events_url":"https://api.github.com/users/IgorStepanov/events{/privacy}","received_events_url":"https://api.github.com/users/IgorStepanov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/IgorStepanov/dmd","description":"dmd D Programming Language compiler","fork":true,"url":"https://api.github.com/repos/IgorStepanov/dmd","forks_url":"https://api.github.com/repos/IgorStepanov/dmd/forks","keys_url":"https://api.github.com/repos/IgorStepanov/dmd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/IgorStepanov/dmd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/IgorStepanov/dmd/teams","hooks_url":"https://api.github.com/repos/IgorStepanov/dmd/hooks","issue_events_url":"https://api.github.com/repos/IgorStepanov/dmd/issues/events{/number}","events_url":"https://api.github.com/repos/IgorStepanov/dmd/events","assignees_url":"https://api.github.com/repos/IgorStepanov/dmd/assignees{/user}","branches_url":"https://api.github.com/repos/IgorStepanov/dmd/branches{/branch}","tags_url":"https://api.github.com/repos/IgorStepanov/dmd/tags","blobs_url":"https://api.github.com/repos/IgorStepanov/dmd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/IgorStepanov/dmd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/IgorStepanov/dmd/git/refs{/sha}","trees_url":"https://api.github.com/repos/IgorStepanov/dmd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/IgorStepanov/dmd/statuses/{sha}","languages_url":"https://api.github.com/repos/IgorStepanov/dmd/languages","stargazers_url":"https://api.github.com/repos/IgorStepanov/dmd/stargazers","contributors_url":"https://api.github.com/repos/IgorStepanov/dmd/contributors","subscribers_url":"https://api.github.com/repos/IgorStepanov/dmd/subscribers","subscription_url":"https://api.github.com/repos/IgorStepanov/dmd/subscription","commits_url":"https://api.github.com/repos/IgorStepanov/dmd/commits{/sha}","git_commits_url":"https://api.github.com/repos/IgorStepanov/dmd/git/commits{/sha}","comments_url":"https://api.github.com/repos/IgorStepanov/dmd/comments{/number}","issue_comment_url":"https://api.github.com/repos/IgorStepanov/dmd/issues/comments/{number}","contents_url":"https://api.github.com/repos/IgorStepanov/dmd/contents/{+path}","compare_url":"https://api.github.com/repos/IgorStepanov/dmd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/IgorStepanov/dmd/merges","archive_url":"https://api.github.com/repos/IgorStepanov/dmd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/IgorStepanov/dmd/downloads","issues_url":"https://api.github.com/repos/IgorStepanov/dmd/issues{/number}","pulls_url":"https://api.github.com/repos/IgorStepanov/dmd/pulls{/number}","milestones_url":"https://api.github.com/repos/IgorStepanov/dmd/milestones{/number}","notifications_url":"https://api.github.com/repos/IgorStepanov/dmd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/IgorStepanov/dmd/labels{/name}","releases_url":"https://api.github.com/repos/IgorStepanov/dmd/releases{/id}","created_at":"2013-03-05T16:21:41Z","updated_at":"2014-08-23T10:21:02Z","pushed_at":"2014-11-15T21:55:50Z","git_url":"git://github.com/IgorStepanov/dmd.git","ssh_url":"git@github.com:IgorStepanov/dmd.git","clone_url":"https://github.com/IgorStepanov/dmd.git","svn_url":"https://github.com/IgorStepanov/dmd","homepage":"d-programming-language.org","size":41770,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"D-Programming-Language:master","ref":"master","sha":"c8c8674187418e000d5be4904a3ffafcd4ed90f1","user":{"login":"D-Programming-Language","id":565913,"avatar_url":"https://avatars.githubusercontent.com/u/565913?v=3","gravatar_id":"","url":"https://api.github.com/users/D-Programming-Language","html_url":"https://github.com/D-Programming-Language","followers_url":"https://api.github.com/users/D-Programming-Language/followers","following_url":"https://api.github.com/users/D-Programming-Language/following{/other_user}","gists_url":"https://api.github.com/users/D-Programming-Language/gists{/gist_id}","starred_url":"https://api.github.com/users/D-Programming-Language/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/D-Programming-Language/subscriptions","organizations_url":"https://api.github.com/users/D-Programming-Language/orgs","repos_url":"https://api.github.com/users/D-Programming-Language/repos","events_url":"https://api.github.com/users/D-Programming-Language/events{/privacy}","received_events_url":"https://api.github.com/users/D-Programming-Language/received_events","type":"Organization","site_admin":false},"repo":{"id":1257070,"name":"dmd","full_name":"D-Programming-Language/dmd","owner":{"login":"D-Programming-Language","id":565913,"avatar_url":"https://avatars.githubusercontent.com/u/565913?v=3","gravatar_id":"","url":"https://api.github.com/users/D-Programming-Language","html_url":"https://github.com/D-Programming-Language","followers_url":"https://api.github.com/users/D-Programming-Language/followers","following_url":"https://api.github.com/users/D-Programming-Language/following{/other_user}","gists_url":"https://api.github.com/users/D-Programming-Language/gists{/gist_id}","starred_url":"https://api.github.com/users/D-Programming-Language/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/D-Programming-Language/subscriptions","organizations_url":"https://api.github.com/users/D-Programming-Language/orgs","repos_url":"https://api.github.com/users/D-Programming-Language/repos","events_url":"https://api.github.com/users/D-Programming-Language/events{/privacy}","received_events_url":"https://api.github.com/users/D-Programming-Language/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/D-Programming-Language/dmd","description":"dmd D Programming Language compiler","fork":false,"url":"https://api.github.com/repos/D-Programming-Language/dmd","forks_url":"https://api.github.com/repos/D-Programming-Language/dmd/forks","keys_url":"https://api.github.com/repos/D-Programming-Language/dmd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/D-Programming-Language/dmd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/D-Programming-Language/dmd/teams","hooks_url":"https://api.github.com/repos/D-Programming-Language/dmd/hooks","issue_events_url":"https://api.github.com/repos/D-Programming-Language/dmd/issues/events{/number}","events_url":"https://api.github.com/repos/D-Programming-Language/dmd/events","assignees_url":"https://api.github.com/repos/D-Programming-Language/dmd/assignees{/user}","branches_url":"https://api.github.com/repos/D-Programming-Language/dmd/branches{/branch}","tags_url":"https://api.github.com/repos/D-Programming-Language/dmd/tags","blobs_url":"https://api.github.com/repos/D-Programming-Language/dmd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/D-Programming-Language/dmd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/D-Programming-Language/dmd/git/refs{/sha}","trees_url":"https://api.github.com/repos/D-Programming-Language/dmd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/D-Programming-Language/dmd/statuses/{sha}","languages_url":"https://api.github.com/repos/D-Programming-Language/dmd/languages","stargazers_url":"https://api.github.com/repos/D-Programming-Language/dmd/stargazers","contributors_url":"https://api.github.com/repos/D-Programming-Language/dmd/contributors","subscribers_url":"https://api.github.com/repos/D-Programming-Language/dmd/subscribers","subscription_url":"https://api.github.com/repos/D-Programming-Language/dmd/subscription","commits_url":"https://api.github.com/repos/D-Programming-Language/dmd/commits{/sha}","git_commits_url":"https://api.github.com/repos/D-Programming-Language/dmd/git/commits{/sha}","comments_url":"https://api.github.com/repos/D-Programming-Language/dmd/comments{/number}","issue_comment_url":"https://api.github.com/repos/D-Programming-Language/dmd/issues/comments/{number}","contents_url":"https://api.github.com/repos/D-Programming-Language/dmd/contents/{+path}","compare_url":"https://api.github.com/repos/D-Programming-Language/dmd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/D-Programming-Language/dmd/merges","archive_url":"https://api.github.com/repos/D-Programming-Language/dmd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/D-Programming-Language/dmd/downloads","issues_url":"https://api.github.com/repos/D-Programming-Language/dmd/issues{/number}","pulls_url":"https://api.github.com/repos/D-Programming-Language/dmd/pulls{/number}","milestones_url":"https://api.github.com/repos/D-Programming-Language/dmd/milestones{/number}","notifications_url":"https://api.github.com/repos/D-Programming-Language/dmd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/D-Programming-Language/dmd/labels{/name}","releases_url":"https://api.github.com/repos/D-Programming-Language/dmd/releases{/id}","created_at":"2011-01-15T06:53:53Z","updated_at":"2014-11-23T15:03:56Z","pushed_at":"2014-11-23T15:03:56Z","git_url":"git://github.com/D-Programming-Language/dmd.git","ssh_url":"git@github.com:D-Programming-Language/dmd.git","clone_url":"https://github.com/D-Programming-Language/dmd.git","svn_url":"https://github.com/D-Programming-Language/dmd","homepage":"dlang.org","size":91899,"stargazers_count":858,"watchers_count":858,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":283,"mirror_url":null,"open_issues_count":88,"forks":283,"open_issues":88,"watchers":858,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/D-Programming-Language/dmd/pulls/3904"},"html":{"href":"https://github.com/D-Programming-Language/dmd/pull/3904"},"issue":{"href":"https://api.github.com/repos/D-Programming-Language/dmd/issues/3904"},"comments":{"href":"https://api.github.com/repos/D-Programming-Language/dmd/issues/3904/comments"},"review_comments":{"href":"https://api.github.com/repos/D-Programming-Language/dmd/pulls/3904/comments"},"review_comment":{"href":"https://api.github.com/repos/D-Programming-Language/dmd/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/D-Programming-Language/dmd/pulls/3904/commits"},"statuses":{"href":"https://api.github.com/repos/D-Programming-Language/dmd/statuses/c6d1cb84bf7e33c6536d392166bc0ab997510117"}}}}