{"action":"created","comment":{"url":"https://api.github.com/repos/elixir-lang/elixir/pulls/comments/207747684","pull_request_review_id":143422119,"id":207747684,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNzc0NzY4NA==","diff_hunk":"@@ -207,6 +207,10 @@ rewrite(?map, fetch, [Map, Key]) ->\n   {maps, find, [Key, Map]};\n rewrite(?map, 'fetch!', [Map, Key]) ->\n   {maps, get, [Key, Map]};\n+rewrite(?map, 'get', [Map, Key]) ->","path":"lib/elixir/src/elixir_rewrite.erl","position":4,"original_position":4,"commit_id":"c8f0bd68cb5a8e69520d0d1a7a1ff47a40e7e750","original_commit_id":"c8f0bd68cb5a8e69520d0d1a7a1ff47a40e7e750","user":{"login":"fertapric","id":651203,"node_id":"MDQ6VXNlcjY1MTIwMw==","avatar_url":"https://avatars0.githubusercontent.com/u/651203?v=4","gravatar_id":"","url":"https://api.github.com/users/fertapric","html_url":"https://github.com/fertapric","followers_url":"https://api.github.com/users/fertapric/followers","following_url":"https://api.github.com/users/fertapric/following{/other_user}","gists_url":"https://api.github.com/users/fertapric/gists{/gist_id}","starred_url":"https://api.github.com/users/fertapric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fertapric/subscriptions","organizations_url":"https://api.github.com/users/fertapric/orgs","repos_url":"https://api.github.com/users/fertapric/repos","events_url":"https://api.github.com/users/fertapric/events{/privacy}","received_events_url":"https://api.github.com/users/fertapric/received_events","type":"User","site_admin":false},"body":"Should the implementation of `Maps.get/3` use `:maps.get(key, map, default)` then? \r\n\r\nI was looking at past PRs, and [this was not inlined](https://github.com/elixir-lang/elixir/pull/6205#discussion_r120950701) in the past because `get/3` was not a BIF. I checked Erlang's source code, and it seems [it is not included in the `%% BIFs` section](https://github.com/erlang/otp/blob/master/lib/stdlib/src/maps.erl#L23).\r\n\r\nI've also made some benchmarks, and apparently Elixir's implementation is faster than Erlang's.","created_at":"2018-08-05T20:34:08Z","updated_at":"2018-08-05T20:34:08Z","html_url":"https://github.com/elixir-lang/elixir/pull/8042#discussion_r207747684","pull_request_url":"https://api.github.com/repos/elixir-lang/elixir/pulls/8042","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/elixir-lang/elixir/pulls/comments/207747684"},"html":{"href":"https://github.com/elixir-lang/elixir/pull/8042#discussion_r207747684"},"pull_request":{"href":"https://api.github.com/repos/elixir-lang/elixir/pulls/8042"}}},"pull_request":{"url":"https://api.github.com/repos/elixir-lang/elixir/pulls/8042","id":206186614,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA2MTg2NjE0","html_url":"https://github.com/elixir-lang/elixir/pull/8042","diff_url":"https://github.com/elixir-lang/elixir/pull/8042.diff","patch_url":"https://github.com/elixir-lang/elixir/pull/8042.patch","issue_url":"https://api.github.com/repos/elixir-lang/elixir/issues/8042","number":8042,"state":"closed","locked":false,"title":"Delete counter for vars in nested quotes","user":{"login":"josevalim","id":9582,"node_id":"MDQ6VXNlcjk1ODI=","avatar_url":"https://avatars0.githubusercontent.com/u/9582?v=4","gravatar_id":"","url":"https://api.github.com/users/josevalim","html_url":"https://github.com/josevalim","followers_url":"https://api.github.com/users/josevalim/followers","following_url":"https://api.github.com/users/josevalim/following{/other_user}","gists_url":"https://api.github.com/users/josevalim/gists{/gist_id}","starred_url":"https://api.github.com/users/josevalim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josevalim/subscriptions","organizations_url":"https://api.github.com/users/josevalim/orgs","repos_url":"https://api.github.com/users/josevalim/repos","events_url":"https://api.github.com/users/josevalim/events{/privacy}","received_events_url":"https://api.github.com/users/josevalim/received_events","type":"User","site_admin":false},"body":"Consider the following example:\r\n\r\n    defmodule NestedQuote do\r\n      defmacrop macro(arg) do\r\n        quote bind_quoted: [arg: arg] do\r\n          quote bind_quoted: [arg: arg], do: String.duplicate(arg, 2)\r\n        end\r\n      end\r\n\r\n      defmacro __using__(_) do\r\n        quote do\r\n          def test do\r\n            unquote(macro(\"foo\"))\r\n          end\r\n        end\r\n      end\r\n    end\r\n\r\n    defmodule UseNestedQuote do\r\n      use NestedQuote\r\n    end\r\n\r\nIt has two macro expansions, one inside __using__/1 when it invokes\r\nmacro/1, and another when used. The issue, however, is that the\r\n`arg` of `String.duplicate(arg, 2)` gets tagged with the context\r\nof `macro/1` but it should be tagged with the context of `__using__`\r\nsince it is a quote inside a quote. This patch addresses this.\r\n\r\nCloses #7709 ","created_at":"2018-08-04T10:27:27Z","updated_at":"2018-08-05T20:34:08Z","closed_at":"2018-08-04T14:46:50Z","merged_at":"2018-08-04T14:46:50Z","merge_commit_sha":"a2d81db23b7966045582bbe2e73cbf02eaa6af8e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/elixir-lang/elixir/pulls/8042/commits","review_comments_url":"https://api.github.com/repos/elixir-lang/elixir/pulls/8042/comments","review_comment_url":"https://api.github.com/repos/elixir-lang/elixir/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elixir-lang/elixir/issues/8042/comments","statuses_url":"https://api.github.com/repos/elixir-lang/elixir/statuses/c8f0bd68cb5a8e69520d0d1a7a1ff47a40e7e750","head":{"label":"elixir-lang:jv-delete-counter-for-nested-quote","ref":"jv-delete-counter-for-nested-quote","sha":"c8f0bd68cb5a8e69520d0d1a7a1ff47a40e7e750","user":{"login":"elixir-lang","id":1481354,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0ODEzNTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1481354?v=4","gravatar_id":"","url":"https://api.github.com/users/elixir-lang","html_url":"https://github.com/elixir-lang","followers_url":"https://api.github.com/users/elixir-lang/followers","following_url":"https://api.github.com/users/elixir-lang/following{/other_user}","gists_url":"https://api.github.com/users/elixir-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/elixir-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elixir-lang/subscriptions","organizations_url":"https://api.github.com/users/elixir-lang/orgs","repos_url":"https://api.github.com/users/elixir-lang/repos","events_url":"https://api.github.com/users/elixir-lang/events{/privacy}","received_events_url":"https://api.github.com/users/elixir-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":1234714,"node_id":"MDEwOlJlcG9zaXRvcnkxMjM0NzE0","name":"elixir","full_name":"elixir-lang/elixir","owner":{"login":"elixir-lang","id":1481354,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0ODEzNTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1481354?v=4","gravatar_id":"","url":"https://api.github.com/users/elixir-lang","html_url":"https://github.com/elixir-lang","followers_url":"https://api.github.com/users/elixir-lang/followers","following_url":"https://api.github.com/users/elixir-lang/following{/other_user}","gists_url":"https://api.github.com/users/elixir-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/elixir-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elixir-lang/subscriptions","organizations_url":"https://api.github.com/users/elixir-lang/orgs","repos_url":"https://api.github.com/users/elixir-lang/repos","events_url":"https://api.github.com/users/elixir-lang/events{/privacy}","received_events_url":"https://api.github.com/users/elixir-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elixir-lang/elixir","description":"Elixir is a dynamic, functional language designed for building scalable and maintainable applications","fork":false,"url":"https://api.github.com/repos/elixir-lang/elixir","forks_url":"https://api.github.com/repos/elixir-lang/elixir/forks","keys_url":"https://api.github.com/repos/elixir-lang/elixir/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elixir-lang/elixir/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elixir-lang/elixir/teams","hooks_url":"https://api.github.com/repos/elixir-lang/elixir/hooks","issue_events_url":"https://api.github.com/repos/elixir-lang/elixir/issues/events{/number}","events_url":"https://api.github.com/repos/elixir-lang/elixir/events","assignees_url":"https://api.github.com/repos/elixir-lang/elixir/assignees{/user}","branches_url":"https://api.github.com/repos/elixir-lang/elixir/branches{/branch}","tags_url":"https://api.github.com/repos/elixir-lang/elixir/tags","blobs_url":"https://api.github.com/repos/elixir-lang/elixir/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elixir-lang/elixir/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elixir-lang/elixir/git/refs{/sha}","trees_url":"https://api.github.com/repos/elixir-lang/elixir/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elixir-lang/elixir/statuses/{sha}","languages_url":"https://api.github.com/repos/elixir-lang/elixir/languages","stargazers_url":"https://api.github.com/repos/elixir-lang/elixir/stargazers","contributors_url":"https://api.github.com/repos/elixir-lang/elixir/contributors","subscribers_url":"https://api.github.com/repos/elixir-lang/elixir/subscribers","subscription_url":"https://api.github.com/repos/elixir-lang/elixir/subscription","commits_url":"https://api.github.com/repos/elixir-lang/elixir/commits{/sha}","git_commits_url":"https://api.github.com/repos/elixir-lang/elixir/git/commits{/sha}","comments_url":"https://api.github.com/repos/elixir-lang/elixir/comments{/number}","issue_comment_url":"https://api.github.com/repos/elixir-lang/elixir/issues/comments{/number}","contents_url":"https://api.github.com/repos/elixir-lang/elixir/contents/{+path}","compare_url":"https://api.github.com/repos/elixir-lang/elixir/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elixir-lang/elixir/merges","archive_url":"https://api.github.com/repos/elixir-lang/elixir/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elixir-lang/elixir/downloads","issues_url":"https://api.github.com/repos/elixir-lang/elixir/issues{/number}","pulls_url":"https://api.github.com/repos/elixir-lang/elixir/pulls{/number}","milestones_url":"https://api.github.com/repos/elixir-lang/elixir/milestones{/number}","notifications_url":"https://api.github.com/repos/elixir-lang/elixir/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elixir-lang/elixir/labels{/name}","releases_url":"https://api.github.com/repos/elixir-lang/elixir/releases{/id}","deployments_url":"https://api.github.com/repos/elixir-lang/elixir/deployments","created_at":"2011-01-09T08:43:57Z","updated_at":"2018-08-05T19:34:28Z","pushed_at":"2018-08-05T19:25:13Z","git_url":"git://github.com/elixir-lang/elixir.git","ssh_url":"git@github.com:elixir-lang/elixir.git","clone_url":"https://github.com/elixir-lang/elixir.git","svn_url":"https://github.com/elixir-lang/elixir","homepage":"http://elixir-lang.org/","size":37446,"stargazers_count":13574,"watchers_count":13574,"language":"Elixir","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1978,"mirror_url":null,"archived":false,"open_issues_count":21,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":1978,"open_issues":21,"watchers":13574,"default_branch":"master"}},"base":{"label":"elixir-lang:master","ref":"master","sha":"887e8f2633b361200843924e597edf36d38d2ed9","user":{"login":"elixir-lang","id":1481354,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0ODEzNTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1481354?v=4","gravatar_id":"","url":"https://api.github.com/users/elixir-lang","html_url":"https://github.com/elixir-lang","followers_url":"https://api.github.com/users/elixir-lang/followers","following_url":"https://api.github.com/users/elixir-lang/following{/other_user}","gists_url":"https://api.github.com/users/elixir-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/elixir-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elixir-lang/subscriptions","organizations_url":"https://api.github.com/users/elixir-lang/orgs","repos_url":"https://api.github.com/users/elixir-lang/repos","events_url":"https://api.github.com/users/elixir-lang/events{/privacy}","received_events_url":"https://api.github.com/users/elixir-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":1234714,"node_id":"MDEwOlJlcG9zaXRvcnkxMjM0NzE0","name":"elixir","full_name":"elixir-lang/elixir","owner":{"login":"elixir-lang","id":1481354,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0ODEzNTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1481354?v=4","gravatar_id":"","url":"https://api.github.com/users/elixir-lang","html_url":"https://github.com/elixir-lang","followers_url":"https://api.github.com/users/elixir-lang/followers","following_url":"https://api.github.com/users/elixir-lang/following{/other_user}","gists_url":"https://api.github.com/users/elixir-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/elixir-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elixir-lang/subscriptions","organizations_url":"https://api.github.com/users/elixir-lang/orgs","repos_url":"https://api.github.com/users/elixir-lang/repos","events_url":"https://api.github.com/users/elixir-lang/events{/privacy}","received_events_url":"https://api.github.com/users/elixir-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elixir-lang/elixir","description":"Elixir is a dynamic, functional language designed for building scalable and maintainable applications","fork":false,"url":"https://api.github.com/repos/elixir-lang/elixir","forks_url":"https://api.github.com/repos/elixir-lang/elixir/forks","keys_url":"https://api.github.com/repos/elixir-lang/elixir/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elixir-lang/elixir/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elixir-lang/elixir/teams","hooks_url":"https://api.github.com/repos/elixir-lang/elixir/hooks","issue_events_url":"https://api.github.com/repos/elixir-lang/elixir/issues/events{/number}","events_url":"https://api.github.com/repos/elixir-lang/elixir/events","assignees_url":"https://api.github.com/repos/elixir-lang/elixir/assignees{/user}","branches_url":"https://api.github.com/repos/elixir-lang/elixir/branches{/branch}","tags_url":"https://api.github.com/repos/elixir-lang/elixir/tags","blobs_url":"https://api.github.com/repos/elixir-lang/elixir/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elixir-lang/elixir/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elixir-lang/elixir/git/refs{/sha}","trees_url":"https://api.github.com/repos/elixir-lang/elixir/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elixir-lang/elixir/statuses/{sha}","languages_url":"https://api.github.com/repos/elixir-lang/elixir/languages","stargazers_url":"https://api.github.com/repos/elixir-lang/elixir/stargazers","contributors_url":"https://api.github.com/repos/elixir-lang/elixir/contributors","subscribers_url":"https://api.github.com/repos/elixir-lang/elixir/subscribers","subscription_url":"https://api.github.com/repos/elixir-lang/elixir/subscription","commits_url":"https://api.github.com/repos/elixir-lang/elixir/commits{/sha}","git_commits_url":"https://api.github.com/repos/elixir-lang/elixir/git/commits{/sha}","comments_url":"https://api.github.com/repos/elixir-lang/elixir/comments{/number}","issue_comment_url":"https://api.github.com/repos/elixir-lang/elixir/issues/comments{/number}","contents_url":"https://api.github.com/repos/elixir-lang/elixir/contents/{+path}","compare_url":"https://api.github.com/repos/elixir-lang/elixir/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elixir-lang/elixir/merges","archive_url":"https://api.github.com/repos/elixir-lang/elixir/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elixir-lang/elixir/downloads","issues_url":"https://api.github.com/repos/elixir-lang/elixir/issues{/number}","pulls_url":"https://api.github.com/repos/elixir-lang/elixir/pulls{/number}","milestones_url":"https://api.github.com/repos/elixir-lang/elixir/milestones{/number}","notifications_url":"https://api.github.com/repos/elixir-lang/elixir/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elixir-lang/elixir/labels{/name}","releases_url":"https://api.github.com/repos/elixir-lang/elixir/releases{/id}","deployments_url":"https://api.github.com/repos/elixir-lang/elixir/deployments","created_at":"2011-01-09T08:43:57Z","updated_at":"2018-08-05T19:34:28Z","pushed_at":"2018-08-05T19:25:13Z","git_url":"git://github.com/elixir-lang/elixir.git","ssh_url":"git@github.com:elixir-lang/elixir.git","clone_url":"https://github.com/elixir-lang/elixir.git","svn_url":"https://github.com/elixir-lang/elixir","homepage":"http://elixir-lang.org/","size":37446,"stargazers_count":13574,"watchers_count":13574,"language":"Elixir","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1978,"mirror_url":null,"archived":false,"open_issues_count":21,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":1978,"open_issues":21,"watchers":13574,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elixir-lang/elixir/pulls/8042"},"html":{"href":"https://github.com/elixir-lang/elixir/pull/8042"},"issue":{"href":"https://api.github.com/repos/elixir-lang/elixir/issues/8042"},"comments":{"href":"https://api.github.com/repos/elixir-lang/elixir/issues/8042/comments"},"review_comments":{"href":"https://api.github.com/repos/elixir-lang/elixir/pulls/8042/comments"},"review_comment":{"href":"https://api.github.com/repos/elixir-lang/elixir/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elixir-lang/elixir/pulls/8042/commits"},"statuses":{"href":"https://api.github.com/repos/elixir-lang/elixir/statuses/c8f0bd68cb5a8e69520d0d1a7a1ff47a40e7e750"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"fertapric"}}