{"action":"closed","number":1208,"pull_request":{"url":"https://api.github.com/repos/opal/opal/pulls/1208","id":52054830,"html_url":"https://github.com/opal/opal/pull/1208","diff_url":"https://github.com/opal/opal/pull/1208.diff","patch_url":"https://github.com/opal/opal/pull/1208.patch","issue_url":"https://api.github.com/repos/opal/opal/issues/1208","number":1208,"state":"closed","locked":false,"title":"Optimize super as a bareword","user":{"login":"jgaskins","id":108205,"avatar_url":"https://avatars.githubusercontent.com/u/108205?v=3","gravatar_id":"","url":"https://api.github.com/users/jgaskins","html_url":"https://github.com/jgaskins","followers_url":"https://api.github.com/users/jgaskins/followers","following_url":"https://api.github.com/users/jgaskins/following{/other_user}","gists_url":"https://api.github.com/users/jgaskins/gists{/gist_id}","starred_url":"https://api.github.com/users/jgaskins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgaskins/subscriptions","organizations_url":"https://api.github.com/users/jgaskins/orgs","repos_url":"https://api.github.com/users/jgaskins/repos","events_url":"https://api.github.com/users/jgaskins/events{/privacy}","received_events_url":"https://api.github.com/users/jgaskins/received_events","type":"User","site_admin":false},"body":"Currently, it's hardcoded in the compiler to use `$slice.call(arguments, 0)`. This PR just does the usual arguments->array copy via iteration while also making the JS code less terrible than I've been doing by declaring that target variable with the rest of the locals. :-)\r\n\r\nResults from `rake bench` (from left to right: master, this PR, MRI):\r\n\r\n```\r\ntest/cruby/benchmark/bm_vm2_zsuper.rb              13.864  1.780   0.547\r\n```\r\n\r\nAs a bonus, I renamed the index variable for splat args and added a local variable for it. I hadn't intended to commit it but I apparently wasn't paying attention. :-) The only reason I changed it at all was because I originally used `arg_index` in both places, but `Struct.new` uses both splat args and bareword `super` so `var arg_index` in two places within the same scope caused JSHint to barf.","created_at":"2015-11-29T04:45:45Z","updated_at":"2015-11-29T20:12:52Z","closed_at":"2015-11-29T20:12:52Z","merged_at":"2015-11-29T20:12:52Z","merge_commit_sha":"f763472ce2f8a4d5be2ad6423df634072f530f49","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/opal/opal/pulls/1208/commits","review_comments_url":"https://api.github.com/repos/opal/opal/pulls/1208/comments","review_comment_url":"https://api.github.com/repos/opal/opal/pulls/comments{/number}","comments_url":"https://api.github.com/repos/opal/opal/issues/1208/comments","statuses_url":"https://api.github.com/repos/opal/opal/statuses/2e0e0de6776bcc01ce9ec8b917230013385a731d","head":{"label":"jgaskins:optimize-zsuper","ref":"optimize-zsuper","sha":"2e0e0de6776bcc01ce9ec8b917230013385a731d","user":{"login":"jgaskins","id":108205,"avatar_url":"https://avatars.githubusercontent.com/u/108205?v=3","gravatar_id":"","url":"https://api.github.com/users/jgaskins","html_url":"https://github.com/jgaskins","followers_url":"https://api.github.com/users/jgaskins/followers","following_url":"https://api.github.com/users/jgaskins/following{/other_user}","gists_url":"https://api.github.com/users/jgaskins/gists{/gist_id}","starred_url":"https://api.github.com/users/jgaskins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgaskins/subscriptions","organizations_url":"https://api.github.com/users/jgaskins/orgs","repos_url":"https://api.github.com/users/jgaskins/repos","events_url":"https://api.github.com/users/jgaskins/events{/privacy}","received_events_url":"https://api.github.com/users/jgaskins/received_events","type":"User","site_admin":false},"repo":{"id":12773531,"name":"opal","full_name":"jgaskins/opal","owner":{"login":"jgaskins","id":108205,"avatar_url":"https://avatars.githubusercontent.com/u/108205?v=3","gravatar_id":"","url":"https://api.github.com/users/jgaskins","html_url":"https://github.com/jgaskins","followers_url":"https://api.github.com/users/jgaskins/followers","following_url":"https://api.github.com/users/jgaskins/following{/other_user}","gists_url":"https://api.github.com/users/jgaskins/gists{/gist_id}","starred_url":"https://api.github.com/users/jgaskins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgaskins/subscriptions","organizations_url":"https://api.github.com/users/jgaskins/orgs","repos_url":"https://api.github.com/users/jgaskins/repos","events_url":"https://api.github.com/users/jgaskins/events{/privacy}","received_events_url":"https://api.github.com/users/jgaskins/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jgaskins/opal","description":"Ruby to Javascript compiler","fork":true,"url":"https://api.github.com/repos/jgaskins/opal","forks_url":"https://api.github.com/repos/jgaskins/opal/forks","keys_url":"https://api.github.com/repos/jgaskins/opal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jgaskins/opal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jgaskins/opal/teams","hooks_url":"https://api.github.com/repos/jgaskins/opal/hooks","issue_events_url":"https://api.github.com/repos/jgaskins/opal/issues/events{/number}","events_url":"https://api.github.com/repos/jgaskins/opal/events","assignees_url":"https://api.github.com/repos/jgaskins/opal/assignees{/user}","branches_url":"https://api.github.com/repos/jgaskins/opal/branches{/branch}","tags_url":"https://api.github.com/repos/jgaskins/opal/tags","blobs_url":"https://api.github.com/repos/jgaskins/opal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jgaskins/opal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jgaskins/opal/git/refs{/sha}","trees_url":"https://api.github.com/repos/jgaskins/opal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jgaskins/opal/statuses/{sha}","languages_url":"https://api.github.com/repos/jgaskins/opal/languages","stargazers_url":"https://api.github.com/repos/jgaskins/opal/stargazers","contributors_url":"https://api.github.com/repos/jgaskins/opal/contributors","subscribers_url":"https://api.github.com/repos/jgaskins/opal/subscribers","subscription_url":"https://api.github.com/repos/jgaskins/opal/subscription","commits_url":"https://api.github.com/repos/jgaskins/opal/commits{/sha}","git_commits_url":"https://api.github.com/repos/jgaskins/opal/git/commits{/sha}","comments_url":"https://api.github.com/repos/jgaskins/opal/comments{/number}","issue_comment_url":"https://api.github.com/repos/jgaskins/opal/issues/comments{/number}","contents_url":"https://api.github.com/repos/jgaskins/opal/contents/{+path}","compare_url":"https://api.github.com/repos/jgaskins/opal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jgaskins/opal/merges","archive_url":"https://api.github.com/repos/jgaskins/opal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jgaskins/opal/downloads","issues_url":"https://api.github.com/repos/jgaskins/opal/issues{/number}","pulls_url":"https://api.github.com/repos/jgaskins/opal/pulls{/number}","milestones_url":"https://api.github.com/repos/jgaskins/opal/milestones{/number}","notifications_url":"https://api.github.com/repos/jgaskins/opal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jgaskins/opal/labels{/name}","releases_url":"https://api.github.com/repos/jgaskins/opal/releases{/id}","created_at":"2013-09-12T02:56:12Z","updated_at":"2015-09-07T06:01:50Z","pushed_at":"2015-11-29T19:40:44Z","git_url":"git://github.com/jgaskins/opal.git","ssh_url":"git@github.com:jgaskins/opal.git","clone_url":"https://github.com/jgaskins/opal.git","svn_url":"https://github.com/jgaskins/opal","homepage":"http://opalrb.org","size":9700,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"opal:master","ref":"master","sha":"be4e1de386da32b7fa1c2feee1f6f27f5e87e337","user":{"login":"opal","id":842643,"avatar_url":"https://avatars.githubusercontent.com/u/842643?v=3","gravatar_id":"","url":"https://api.github.com/users/opal","html_url":"https://github.com/opal","followers_url":"https://api.github.com/users/opal/followers","following_url":"https://api.github.com/users/opal/following{/other_user}","gists_url":"https://api.github.com/users/opal/gists{/gist_id}","starred_url":"https://api.github.com/users/opal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opal/subscriptions","organizations_url":"https://api.github.com/users/opal/orgs","repos_url":"https://api.github.com/users/opal/repos","events_url":"https://api.github.com/users/opal/events{/privacy}","received_events_url":"https://api.github.com/users/opal/received_events","type":"Organization","site_admin":false},"repo":{"id":184366,"name":"opal","full_name":"opal/opal","owner":{"login":"opal","id":842643,"avatar_url":"https://avatars.githubusercontent.com/u/842643?v=3","gravatar_id":"","url":"https://api.github.com/users/opal","html_url":"https://github.com/opal","followers_url":"https://api.github.com/users/opal/followers","following_url":"https://api.github.com/users/opal/following{/other_user}","gists_url":"https://api.github.com/users/opal/gists{/gist_id}","starred_url":"https://api.github.com/users/opal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opal/subscriptions","organizations_url":"https://api.github.com/users/opal/orgs","repos_url":"https://api.github.com/users/opal/repos","events_url":"https://api.github.com/users/opal/events{/privacy}","received_events_url":"https://api.github.com/users/opal/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opal/opal","description":"Ruby to JavaScript compiler","fork":false,"url":"https://api.github.com/repos/opal/opal","forks_url":"https://api.github.com/repos/opal/opal/forks","keys_url":"https://api.github.com/repos/opal/opal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opal/opal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opal/opal/teams","hooks_url":"https://api.github.com/repos/opal/opal/hooks","issue_events_url":"https://api.github.com/repos/opal/opal/issues/events{/number}","events_url":"https://api.github.com/repos/opal/opal/events","assignees_url":"https://api.github.com/repos/opal/opal/assignees{/user}","branches_url":"https://api.github.com/repos/opal/opal/branches{/branch}","tags_url":"https://api.github.com/repos/opal/opal/tags","blobs_url":"https://api.github.com/repos/opal/opal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opal/opal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opal/opal/git/refs{/sha}","trees_url":"https://api.github.com/repos/opal/opal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opal/opal/statuses/{sha}","languages_url":"https://api.github.com/repos/opal/opal/languages","stargazers_url":"https://api.github.com/repos/opal/opal/stargazers","contributors_url":"https://api.github.com/repos/opal/opal/contributors","subscribers_url":"https://api.github.com/repos/opal/opal/subscribers","subscription_url":"https://api.github.com/repos/opal/opal/subscription","commits_url":"https://api.github.com/repos/opal/opal/commits{/sha}","git_commits_url":"https://api.github.com/repos/opal/opal/git/commits{/sha}","comments_url":"https://api.github.com/repos/opal/opal/comments{/number}","issue_comment_url":"https://api.github.com/repos/opal/opal/issues/comments{/number}","contents_url":"https://api.github.com/repos/opal/opal/contents/{+path}","compare_url":"https://api.github.com/repos/opal/opal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opal/opal/merges","archive_url":"https://api.github.com/repos/opal/opal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opal/opal/downloads","issues_url":"https://api.github.com/repos/opal/opal/issues{/number}","pulls_url":"https://api.github.com/repos/opal/opal/pulls{/number}","milestones_url":"https://api.github.com/repos/opal/opal/milestones{/number}","notifications_url":"https://api.github.com/repos/opal/opal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opal/opal/labels{/name}","releases_url":"https://api.github.com/repos/opal/opal/releases{/id}","created_at":"2009-04-24T08:53:34Z","updated_at":"2015-11-29T12:50:52Z","pushed_at":"2015-11-29T20:12:53Z","git_url":"git://github.com/opal/opal.git","ssh_url":"git@github.com:opal/opal.git","clone_url":"https://github.com/opal/opal.git","svn_url":"https://github.com/opal/opal","homepage":"http://opalrb.org","size":13446,"stargazers_count":2989,"watchers_count":2989,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":212,"mirror_url":null,"open_issues_count":142,"forks":212,"open_issues":142,"watchers":2989,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/opal/opal/pulls/1208"},"html":{"href":"https://github.com/opal/opal/pull/1208"},"issue":{"href":"https://api.github.com/repos/opal/opal/issues/1208"},"comments":{"href":"https://api.github.com/repos/opal/opal/issues/1208/comments"},"review_comments":{"href":"https://api.github.com/repos/opal/opal/pulls/1208/comments"},"review_comment":{"href":"https://api.github.com/repos/opal/opal/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/opal/opal/pulls/1208/commits"},"statuses":{"href":"https://api.github.com/repos/opal/opal/statuses/2e0e0de6776bcc01ce9ec8b917230013385a731d"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"meh","id":40204,"avatar_url":"https://avatars.githubusercontent.com/u/40204?v=3","gravatar_id":"","url":"https://api.github.com/users/meh","html_url":"https://github.com/meh","followers_url":"https://api.github.com/users/meh/followers","following_url":"https://api.github.com/users/meh/following{/other_user}","gists_url":"https://api.github.com/users/meh/gists{/gist_id}","starred_url":"https://api.github.com/users/meh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meh/subscriptions","organizations_url":"https://api.github.com/users/meh/orgs","repos_url":"https://api.github.com/users/meh/repos","events_url":"https://api.github.com/users/meh/events{/privacy}","received_events_url":"https://api.github.com/users/meh/received_events","type":"User","site_admin":false},"comments":3,"review_comments":0,"commits":3,"additions":13,"deletions":4,"changed_files":1}}