{"action":"created","comment":{"url":"https://api.github.com/repos/D-Programming-Language/dmd/pulls/comments/22948704","id":22948704,"diff_hunk":"@@ -1112,7 +1114,7 @@ class IndexExp : public BinExp\n public:\n     VarDeclaration *lengthVar;\n     bool modifiable;\n-    bool skipboundscheck;\n+    bool indexInRange;","path":"src/expression.h","position":14,"original_position":14,"commit_id":"7fe3ae6df33884b933d36235f340cece6db18592","original_commit_id":"7fe3ae6df33884b933d36235f340cece6db18592","user":{"login":"9rnsr","id":254394,"avatar_url":"https://avatars.githubusercontent.com/u/254394?v=3","gravatar_id":"","url":"https://api.github.com/users/9rnsr","html_url":"https://github.com/9rnsr","followers_url":"https://api.github.com/users/9rnsr/followers","following_url":"https://api.github.com/users/9rnsr/following{/other_user}","gists_url":"https://api.github.com/users/9rnsr/gists{/gist_id}","starred_url":"https://api.github.com/users/9rnsr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/9rnsr/subscriptions","organizations_url":"https://api.github.com/users/9rnsr/orgs","repos_url":"https://api.github.com/users/9rnsr/repos","events_url":"https://api.github.com/users/9rnsr/events{/privacy}","received_events_url":"https://api.github.com/users/9rnsr/received_events","type":"User","site_admin":false},"body":"First I had tried to think names for the new two fields in `SliceExp` like `skipXXX`, but I couldn't do it.\r\nThen I changed the name `IndexExp::skipboundscheck` to `indexIsInBounds` to make the names consistent between `IndexExp` and `SliceExp`.","created_at":"2015-01-14T16:31:41Z","updated_at":"2015-01-14T16:31:41Z","html_url":"https://github.com/D-Programming-Language/dmd/pull/4293#discussion_r22948704","pull_request_url":"https://api.github.com/repos/D-Programming-Language/dmd/pulls/4293","_links":{"self":{"href":"https://api.github.com/repos/D-Programming-Language/dmd/pulls/comments/22948704"},"html":{"href":"https://github.com/D-Programming-Language/dmd/pull/4293#discussion_r22948704"},"pull_request":{"href":"https://api.github.com/repos/D-Programming-Language/dmd/pulls/4293"}}},"pull_request":{"url":"https://api.github.com/repos/D-Programming-Language/dmd/pulls/4293","id":27269629,"html_url":"https://github.com/D-Programming-Language/dmd/pull/4293","diff_url":"https://github.com/D-Programming-Language/dmd/pull/4293.diff","patch_url":"https://github.com/D-Programming-Language/dmd/pull/4293.patch","issue_url":"https://api.github.com/repos/D-Programming-Language/dmd/issues/4293","number":4293,"state":"open","locked":false,"title":"Issue 13976 - Value range propagation to disable some slice bound tests","user":{"login":"9rnsr","id":254394,"avatar_url":"https://avatars.githubusercontent.com/u/254394?v=3","gravatar_id":"","url":"https://api.github.com/users/9rnsr","html_url":"https://github.com/9rnsr","followers_url":"https://api.github.com/users/9rnsr/followers","following_url":"https://api.github.com/users/9rnsr/following{/other_user}","gists_url":"https://api.github.com/users/9rnsr/gists{/gist_id}","starred_url":"https://api.github.com/users/9rnsr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/9rnsr/subscriptions","organizations_url":"https://api.github.com/users/9rnsr/orgs","repos_url":"https://api.github.com/users/9rnsr/repos","events_url":"https://api.github.com/users/9rnsr/events{/privacy}","received_events_url":"https://api.github.com/users/9rnsr/received_events","type":"User","site_admin":false},"body":"https://issues.dlang.org/show_bug.cgi?id=13976\r\n\r\nExample:\r\n```d\r\nvoid main()\r\n{\r\n    int[10] a;\r\n    size_t n;\r\n    auto s = a[n%3 .. n%3 + 3];\r\n    assert(s.length == 3);\r\n}\r\n```\r\n\r\nWith 2.066:\r\n```iasm\r\nc:\\d\\test.d:1 void main()\r\n00402010: c8380000                enter 0x38, 0x0\r\n00402014: 53                      push ebx\r\n00402015: 57                      push edi\r\nc:\\d\\test.d:3     int[10] a;\r\n00402016: b90a000000              mov ecx, 0xa\r\n0040201b: 31c0                    xor eax, eax\r\n0040201d: 8d7dc8                  lea edi, [ebp-0x38]\r\n00402020: f3ab                    rep stosd\r\nc:\\d\\test.d:4     size_t n;\r\n00402022: 8945f0                  mov [ebp-0x10], eax\r\nc:\\d\\test.d:5     auto s = a[n%3 .. n%3 + 3];\r\n00402025: b103                    mov cl, 0x3\r\n00402027: 31d2                    xor edx, edx\r\n00402029: f7f1                    div ecx\r\n0040202b: 8d5a03                  lea ebx, [edx+0x3]\r\n0040202e: 83fb0a                  cmp ebx, 0xa\r\n00402031: 7704                    ja 0x402037   D main c:\\d\\test.d:5\r\n00402033: 39d3                    cmp ebx, edx\r\n00402035: 730a                    jae 0x402041  D main c:\\d\\test.d:5\r\n00402037: b805000000              mov eax, 0x5\r\n0040203c: e823000000              call 0x402064 test.__array c:\\d\\test.d:7\r\n00402041: 2bda                    sub ebx, edx\r\n00402043: 8d5495c8                lea edx, [ebp+edx*4-0x38]\r\n00402047: 895df8                  mov [ebp-0x8], ebx\r\n0040204a: 8955fc                  mov [ebp-0x4], edx\r\nc:\\d\\test.d:6     assert(s.length == 3);\r\n0040204d: 394df8                  cmp [ebp-0x8], ecx\r\n00402050: 740a                    jz 0x40205c   D main c:\\d\\test.d:6\r\n00402052: b806000000              mov eax, 0x6\r\n00402057: e824000000              call 0x402080 test.__assert c:\\d\\test.d:7\r\n0040205c: 31c0                    xor eax, eax\r\nc:\\d\\test.d:7 }\r\n0040205e: 5f                      pop edi\r\n0040205f: 5b                      pop ebx\r\n00402060: c9                      leave\r\n00402061: c3                      ret\r\n```\r\n\r\nWith this PR:\r\n```iasm\r\nc:\\d\\test.d:1 void main()\r\n00402010: 55                      push ebp\r\n00402011: 8bec                    mov ebp, esp\r\n00402013: 83ec38                  sub esp, 0x38\r\n00402016: 53                      push ebx\r\n00402017: 57                      push edi\r\nc:\\d\\test.d:3     int[10] a;\r\n00402018: b90a000000              mov ecx, 0xa\r\n0040201d: 31c0                    xor eax, eax\r\n0040201f: 8d7dc8                  lea edi, [ebp-0x38]\r\n00402022: f3ab                    rep stosd\r\nc:\\d\\test.d:4     size_t n;\r\n00402024: 8945f0                  mov [ebp-0x10], eax\r\nc:\\d\\test.d:5     auto s = a[n%3 .. n%3 + 3];\r\n00402027: b103                    mov cl, 0x3\r\n00402029: 31d2                    xor edx, edx\r\n0040202b: f7f1                    div ecx\r\n0040202d: 8d5a03                  lea ebx, [edx+0x3]\r\n00402030: 2bda                    sub ebx, edx\r\n00402032: 8d5495c8                lea edx, [ebp+edx*4-0x38]\r\n00402036: 895df8                  mov [ebp-0x8], ebx\r\n00402039: 8955fc                  mov [ebp-0x4], edx\r\nc:\\d\\test.d:6     assert(s.length == 3);\r\n0040203c: 394df8                  cmp [ebp-0x8], ecx\r\n0040203f: 740a                    jz 0x40204b   D main c:\\d\\test.d:6\r\n00402041: b806000000              mov eax, 0x6\r\n00402046: e809000000              call 0x402054 test.__assert c:\\d\\test.d:7\r\n0040204b: 31c0                    xor eax, eax\r\nc:\\d\\test.d:7 }\r\n0040204d: 5f                      pop edi\r\n0040204e: 5b                      pop ebx\r\n0040204f: c9                      leave\r\n00402050: c3                      ret\r\n```\r\n\r\nThe boundary check and `__array` call are completely removed.","created_at":"2015-01-13T13:08:03Z","updated_at":"2015-01-14T16:31:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1e47655b71d6ca0c356873b284143436ee73ebe4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/D-Programming-Language/dmd/pulls/4293/commits","review_comments_url":"https://api.github.com/repos/D-Programming-Language/dmd/pulls/4293/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/4293/comments","statuses_url":"https://api.github.com/repos/D-Programming-Language/dmd/statuses/7fe3ae6df33884b933d36235f340cece6db18592","head":{"label":"9rnsr:fix13976","ref":"fix13976","sha":"7fe3ae6df33884b933d36235f340cece6db18592","user":{"login":"9rnsr","id":254394,"avatar_url":"https://avatars.githubusercontent.com/u/254394?v=3","gravatar_id":"","url":"https://api.github.com/users/9rnsr","html_url":"https://github.com/9rnsr","followers_url":"https://api.github.com/users/9rnsr/followers","following_url":"https://api.github.com/users/9rnsr/following{/other_user}","gists_url":"https://api.github.com/users/9rnsr/gists{/gist_id}","starred_url":"https://api.github.com/users/9rnsr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/9rnsr/subscriptions","organizations_url":"https://api.github.com/users/9rnsr/orgs","repos_url":"https://api.github.com/users/9rnsr/repos","events_url":"https://api.github.com/users/9rnsr/events{/privacy}","received_events_url":"https://api.github.com/users/9rnsr/received_events","type":"User","site_admin":false},"repo":{"id":1434550,"name":"dmd","full_name":"9rnsr/dmd","owner":{"login":"9rnsr","id":254394,"avatar_url":"https://avatars.githubusercontent.com/u/254394?v=3","gravatar_id":"","url":"https://api.github.com/users/9rnsr","html_url":"https://github.com/9rnsr","followers_url":"https://api.github.com/users/9rnsr/followers","following_url":"https://api.github.com/users/9rnsr/following{/other_user}","gists_url":"https://api.github.com/users/9rnsr/gists{/gist_id}","starred_url":"https://api.github.com/users/9rnsr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/9rnsr/subscriptions","organizations_url":"https://api.github.com/users/9rnsr/orgs","repos_url":"https://api.github.com/users/9rnsr/repos","events_url":"https://api.github.com/users/9rnsr/events{/privacy}","received_events_url":"https://api.github.com/users/9rnsr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/9rnsr/dmd","description":"dmd D Programming Language compiler","fork":true,"url":"https://api.github.com/repos/9rnsr/dmd","forks_url":"https://api.github.com/repos/9rnsr/dmd/forks","keys_url":"https://api.github.com/repos/9rnsr/dmd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/9rnsr/dmd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/9rnsr/dmd/teams","hooks_url":"https://api.github.com/repos/9rnsr/dmd/hooks","issue_events_url":"https://api.github.com/repos/9rnsr/dmd/issues/events{/number}","events_url":"https://api.github.com/repos/9rnsr/dmd/events","assignees_url":"https://api.github.com/repos/9rnsr/dmd/assignees{/user}","branches_url":"https://api.github.com/repos/9rnsr/dmd/branches{/branch}","tags_url":"https://api.github.com/repos/9rnsr/dmd/tags","blobs_url":"https://api.github.com/repos/9rnsr/dmd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/9rnsr/dmd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/9rnsr/dmd/git/refs{/sha}","trees_url":"https://api.github.com/repos/9rnsr/dmd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/9rnsr/dmd/statuses/{sha}","languages_url":"https://api.github.com/repos/9rnsr/dmd/languages","stargazers_url":"https://api.github.com/repos/9rnsr/dmd/stargazers","contributors_url":"https://api.github.com/repos/9rnsr/dmd/contributors","subscribers_url":"https://api.github.com/repos/9rnsr/dmd/subscribers","subscription_url":"https://api.github.com/repos/9rnsr/dmd/subscription","commits_url":"https://api.github.com/repos/9rnsr/dmd/commits{/sha}","git_commits_url":"https://api.github.com/repos/9rnsr/dmd/git/commits{/sha}","comments_url":"https://api.github.com/repos/9rnsr/dmd/comments{/number}","issue_comment_url":"https://api.github.com/repos/9rnsr/dmd/issues/comments/{number}","contents_url":"https://api.github.com/repos/9rnsr/dmd/contents/{+path}","compare_url":"https://api.github.com/repos/9rnsr/dmd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/9rnsr/dmd/merges","archive_url":"https://api.github.com/repos/9rnsr/dmd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/9rnsr/dmd/downloads","issues_url":"https://api.github.com/repos/9rnsr/dmd/issues{/number}","pulls_url":"https://api.github.com/repos/9rnsr/dmd/pulls{/number}","milestones_url":"https://api.github.com/repos/9rnsr/dmd/milestones{/number}","notifications_url":"https://api.github.com/repos/9rnsr/dmd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/9rnsr/dmd/labels{/name}","releases_url":"https://api.github.com/repos/9rnsr/dmd/releases{/id}","created_at":"2011-03-03T10:24:37Z","updated_at":"2015-01-14T15:34:28Z","pushed_at":"2015-01-14T15:37:02Z","git_url":"git://github.com/9rnsr/dmd.git","ssh_url":"git@github.com:9rnsr/dmd.git","clone_url":"https://github.com/9rnsr/dmd.git","svn_url":"https://github.com/9rnsr/dmd","homepage":"d-programming-language.org","size":57265,"stargazers_count":2,"watchers_count":2,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"D-Programming-Language:master","ref":"master","sha":"6268b821771a74b199d7199f24c1734b717c7a36","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":"2015-01-14T16:03:33Z","pushed_at":"2015-01-14T16:03:33Z","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":80852,"stargazers_count":900,"watchers_count":900,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":290,"mirror_url":null,"open_issues_count":90,"forks":290,"open_issues":90,"watchers":900,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/D-Programming-Language/dmd/pulls/4293"},"html":{"href":"https://github.com/D-Programming-Language/dmd/pull/4293"},"issue":{"href":"https://api.github.com/repos/D-Programming-Language/dmd/issues/4293"},"comments":{"href":"https://api.github.com/repos/D-Programming-Language/dmd/issues/4293/comments"},"review_comments":{"href":"https://api.github.com/repos/D-Programming-Language/dmd/pulls/4293/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/4293/commits"},"statuses":{"href":"https://api.github.com/repos/D-Programming-Language/dmd/statuses/7fe3ae6df33884b933d36235f340cece6db18592"}}}}