{"action":"opened","number":13,"pull_request":{"url":"https://api.github.com/repos/SquidDev-CC/Studio/pulls/13","id":31690970,"html_url":"https://github.com/SquidDev-CC/Studio/pull/13","diff_url":"https://github.com/SquidDev-CC/Studio/pull/13.diff","patch_url":"https://github.com/SquidDev-CC/Studio/pull/13.patch","issue_url":"https://api.github.com/repos/SquidDev-CC/Studio/issues/13","number":13,"state":"open","locked":false,"title":"Fix edge case with many arguments","user":{"login":"SquidDev","id":4346137,"avatar_url":"https://avatars.githubusercontent.com/u/4346137?v=3","gravatar_id":"","url":"https://api.github.com/users/SquidDev","html_url":"https://github.com/SquidDev","followers_url":"https://api.github.com/users/SquidDev/followers","following_url":"https://api.github.com/users/SquidDev/following{/other_user}","gists_url":"https://api.github.com/users/SquidDev/gists{/gist_id}","starred_url":"https://api.github.com/users/SquidDev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SquidDev/subscriptions","organizations_url":"https://api.github.com/users/SquidDev/orgs","repos_url":"https://api.github.com/users/SquidDev/repos","events_url":"https://api.github.com/users/SquidDev/events{/privacy}","received_events_url":"https://api.github.com/users/SquidDev/received_events","type":"User","site_admin":false},"body":"There was an issue with code similar to this:\r\n\r\n```lua\r\nlocal function arg(a, b, ...)\r\n\tif a then error() end\r\n\tb = b + 1 -- Error occurs here\r\nend\r\n```\r\nThe issue lies in the code being a `VarArgFunction`, and so variables have to be extracted into slots. However the slot variable for `b` is never set as it doesn't think the argument is being used. You can see from the block breakdown that `block 5-6` has 2 previous blocks. As a result it didn't know which variable to use and so it never said that the argument was used.\r\n\r\n```\r\nproto 'EdgeCases_LuaCompiled$0'\r\n\tblock 1-2  nxt: (3,5)\r\n\t\t 0.p    1.p    2.p    3.p        1  [-]  TEST  0 0 0\r\n\t\t 0.p    1.p    2.p    3.p        2  [4]  JMP  2  ; to 5\r\n\tblock 3-4  prv: (2)  nxt: (5)\r\n\t\t 0.p    1.p    2.p    3.2        3  [4]  GETGLOBAL  3 -1  ; \"error\"\r\n\t\t 0.p    1.p    2.p    x.x        4  [4]  CALL  3 1 1\r\n\tblock 5-6  prv: (4,2)\r\n\t\t 0.p    1.4    2.p    x.x        5  [5]  ADD  1 1 -2  ; - 1\r\n\t\t 0.p    1.4    2.p    x.x        6  [6]  RETURN  0 1\r\n```\r\n\r\nThe fix checks that if all slots in previous blocks are the same then this slot must be equal to that one.","created_at":"2015-03-22T17:06:47Z","updated_at":"2015-03-22T17:06:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/SquidDev-CC/Studio/pulls/13/commits","review_comments_url":"https://api.github.com/repos/SquidDev-CC/Studio/pulls/13/comments","review_comment_url":"https://api.github.com/repos/SquidDev-CC/Studio/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SquidDev-CC/Studio/issues/13/comments","statuses_url":"https://api.github.com/repos/SquidDev-CC/Studio/statuses/58ed3d5b70d10260a28c2f54ab232affd86f418f","head":{"label":"SquidDev-CC:bugfix/luajc-manyargs","ref":"bugfix/luajc-manyargs","sha":"58ed3d5b70d10260a28c2f54ab232affd86f418f","user":{"login":"SquidDev-CC","id":10090366,"avatar_url":"https://avatars.githubusercontent.com/u/10090366?v=3","gravatar_id":"","url":"https://api.github.com/users/SquidDev-CC","html_url":"https://github.com/SquidDev-CC","followers_url":"https://api.github.com/users/SquidDev-CC/followers","following_url":"https://api.github.com/users/SquidDev-CC/following{/other_user}","gists_url":"https://api.github.com/users/SquidDev-CC/gists{/gist_id}","starred_url":"https://api.github.com/users/SquidDev-CC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SquidDev-CC/subscriptions","organizations_url":"https://api.github.com/users/SquidDev-CC/orgs","repos_url":"https://api.github.com/users/SquidDev-CC/repos","events_url":"https://api.github.com/users/SquidDev-CC/events{/privacy}","received_events_url":"https://api.github.com/users/SquidDev-CC/received_events","type":"Organization","site_admin":false},"repo":{"id":28787120,"name":"Studio","full_name":"SquidDev-CC/Studio","owner":{"login":"SquidDev-CC","id":10090366,"avatar_url":"https://avatars.githubusercontent.com/u/10090366?v=3","gravatar_id":"","url":"https://api.github.com/users/SquidDev-CC","html_url":"https://github.com/SquidDev-CC","followers_url":"https://api.github.com/users/SquidDev-CC/followers","following_url":"https://api.github.com/users/SquidDev-CC/following{/other_user}","gists_url":"https://api.github.com/users/SquidDev-CC/gists{/gist_id}","starred_url":"https://api.github.com/users/SquidDev-CC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SquidDev-CC/subscriptions","organizations_url":"https://api.github.com/users/SquidDev-CC/orgs","repos_url":"https://api.github.com/users/SquidDev-CC/repos","events_url":"https://api.github.com/users/SquidDev-CC/events{/privacy}","received_events_url":"https://api.github.com/users/SquidDev-CC/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SquidDev-CC/Studio","description":"CC Emulator for devlopers","fork":false,"url":"https://api.github.com/repos/SquidDev-CC/Studio","forks_url":"https://api.github.com/repos/SquidDev-CC/Studio/forks","keys_url":"https://api.github.com/repos/SquidDev-CC/Studio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SquidDev-CC/Studio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SquidDev-CC/Studio/teams","hooks_url":"https://api.github.com/repos/SquidDev-CC/Studio/hooks","issue_events_url":"https://api.github.com/repos/SquidDev-CC/Studio/issues/events{/number}","events_url":"https://api.github.com/repos/SquidDev-CC/Studio/events","assignees_url":"https://api.github.com/repos/SquidDev-CC/Studio/assignees{/user}","branches_url":"https://api.github.com/repos/SquidDev-CC/Studio/branches{/branch}","tags_url":"https://api.github.com/repos/SquidDev-CC/Studio/tags","blobs_url":"https://api.github.com/repos/SquidDev-CC/Studio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SquidDev-CC/Studio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SquidDev-CC/Studio/git/refs{/sha}","trees_url":"https://api.github.com/repos/SquidDev-CC/Studio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SquidDev-CC/Studio/statuses/{sha}","languages_url":"https://api.github.com/repos/SquidDev-CC/Studio/languages","stargazers_url":"https://api.github.com/repos/SquidDev-CC/Studio/stargazers","contributors_url":"https://api.github.com/repos/SquidDev-CC/Studio/contributors","subscribers_url":"https://api.github.com/repos/SquidDev-CC/Studio/subscribers","subscription_url":"https://api.github.com/repos/SquidDev-CC/Studio/subscription","commits_url":"https://api.github.com/repos/SquidDev-CC/Studio/commits{/sha}","git_commits_url":"https://api.github.com/repos/SquidDev-CC/Studio/git/commits{/sha}","comments_url":"https://api.github.com/repos/SquidDev-CC/Studio/comments{/number}","issue_comment_url":"https://api.github.com/repos/SquidDev-CC/Studio/issues/comments{/number}","contents_url":"https://api.github.com/repos/SquidDev-CC/Studio/contents/{+path}","compare_url":"https://api.github.com/repos/SquidDev-CC/Studio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SquidDev-CC/Studio/merges","archive_url":"https://api.github.com/repos/SquidDev-CC/Studio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SquidDev-CC/Studio/downloads","issues_url":"https://api.github.com/repos/SquidDev-CC/Studio/issues{/number}","pulls_url":"https://api.github.com/repos/SquidDev-CC/Studio/pulls{/number}","milestones_url":"https://api.github.com/repos/SquidDev-CC/Studio/milestones{/number}","notifications_url":"https://api.github.com/repos/SquidDev-CC/Studio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SquidDev-CC/Studio/labels{/name}","releases_url":"https://api.github.com/repos/SquidDev-CC/Studio/releases{/id}","created_at":"2015-01-04T21:49:34Z","updated_at":"2015-03-21T08:42:30Z","pushed_at":"2015-03-22T16:57:27Z","git_url":"git://github.com/SquidDev-CC/Studio.git","ssh_url":"git@github.com:SquidDev-CC/Studio.git","clone_url":"https://github.com/SquidDev-CC/Studio.git","svn_url":"https://github.com/SquidDev-CC/Studio","homepage":null,"size":1836,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":1,"default_branch":"master"}},"base":{"label":"SquidDev-CC:master","ref":"master","sha":"6b179001d34ad82346828146e9e7d1d6833de717","user":{"login":"SquidDev-CC","id":10090366,"avatar_url":"https://avatars.githubusercontent.com/u/10090366?v=3","gravatar_id":"","url":"https://api.github.com/users/SquidDev-CC","html_url":"https://github.com/SquidDev-CC","followers_url":"https://api.github.com/users/SquidDev-CC/followers","following_url":"https://api.github.com/users/SquidDev-CC/following{/other_user}","gists_url":"https://api.github.com/users/SquidDev-CC/gists{/gist_id}","starred_url":"https://api.github.com/users/SquidDev-CC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SquidDev-CC/subscriptions","organizations_url":"https://api.github.com/users/SquidDev-CC/orgs","repos_url":"https://api.github.com/users/SquidDev-CC/repos","events_url":"https://api.github.com/users/SquidDev-CC/events{/privacy}","received_events_url":"https://api.github.com/users/SquidDev-CC/received_events","type":"Organization","site_admin":false},"repo":{"id":28787120,"name":"Studio","full_name":"SquidDev-CC/Studio","owner":{"login":"SquidDev-CC","id":10090366,"avatar_url":"https://avatars.githubusercontent.com/u/10090366?v=3","gravatar_id":"","url":"https://api.github.com/users/SquidDev-CC","html_url":"https://github.com/SquidDev-CC","followers_url":"https://api.github.com/users/SquidDev-CC/followers","following_url":"https://api.github.com/users/SquidDev-CC/following{/other_user}","gists_url":"https://api.github.com/users/SquidDev-CC/gists{/gist_id}","starred_url":"https://api.github.com/users/SquidDev-CC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SquidDev-CC/subscriptions","organizations_url":"https://api.github.com/users/SquidDev-CC/orgs","repos_url":"https://api.github.com/users/SquidDev-CC/repos","events_url":"https://api.github.com/users/SquidDev-CC/events{/privacy}","received_events_url":"https://api.github.com/users/SquidDev-CC/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SquidDev-CC/Studio","description":"CC Emulator for devlopers","fork":false,"url":"https://api.github.com/repos/SquidDev-CC/Studio","forks_url":"https://api.github.com/repos/SquidDev-CC/Studio/forks","keys_url":"https://api.github.com/repos/SquidDev-CC/Studio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SquidDev-CC/Studio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SquidDev-CC/Studio/teams","hooks_url":"https://api.github.com/repos/SquidDev-CC/Studio/hooks","issue_events_url":"https://api.github.com/repos/SquidDev-CC/Studio/issues/events{/number}","events_url":"https://api.github.com/repos/SquidDev-CC/Studio/events","assignees_url":"https://api.github.com/repos/SquidDev-CC/Studio/assignees{/user}","branches_url":"https://api.github.com/repos/SquidDev-CC/Studio/branches{/branch}","tags_url":"https://api.github.com/repos/SquidDev-CC/Studio/tags","blobs_url":"https://api.github.com/repos/SquidDev-CC/Studio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SquidDev-CC/Studio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SquidDev-CC/Studio/git/refs{/sha}","trees_url":"https://api.github.com/repos/SquidDev-CC/Studio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SquidDev-CC/Studio/statuses/{sha}","languages_url":"https://api.github.com/repos/SquidDev-CC/Studio/languages","stargazers_url":"https://api.github.com/repos/SquidDev-CC/Studio/stargazers","contributors_url":"https://api.github.com/repos/SquidDev-CC/Studio/contributors","subscribers_url":"https://api.github.com/repos/SquidDev-CC/Studio/subscribers","subscription_url":"https://api.github.com/repos/SquidDev-CC/Studio/subscription","commits_url":"https://api.github.com/repos/SquidDev-CC/Studio/commits{/sha}","git_commits_url":"https://api.github.com/repos/SquidDev-CC/Studio/git/commits{/sha}","comments_url":"https://api.github.com/repos/SquidDev-CC/Studio/comments{/number}","issue_comment_url":"https://api.github.com/repos/SquidDev-CC/Studio/issues/comments{/number}","contents_url":"https://api.github.com/repos/SquidDev-CC/Studio/contents/{+path}","compare_url":"https://api.github.com/repos/SquidDev-CC/Studio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SquidDev-CC/Studio/merges","archive_url":"https://api.github.com/repos/SquidDev-CC/Studio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SquidDev-CC/Studio/downloads","issues_url":"https://api.github.com/repos/SquidDev-CC/Studio/issues{/number}","pulls_url":"https://api.github.com/repos/SquidDev-CC/Studio/pulls{/number}","milestones_url":"https://api.github.com/repos/SquidDev-CC/Studio/milestones{/number}","notifications_url":"https://api.github.com/repos/SquidDev-CC/Studio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SquidDev-CC/Studio/labels{/name}","releases_url":"https://api.github.com/repos/SquidDev-CC/Studio/releases{/id}","created_at":"2015-01-04T21:49:34Z","updated_at":"2015-03-21T08:42:30Z","pushed_at":"2015-03-22T16:57:27Z","git_url":"git://github.com/SquidDev-CC/Studio.git","ssh_url":"git@github.com:SquidDev-CC/Studio.git","clone_url":"https://github.com/SquidDev-CC/Studio.git","svn_url":"https://github.com/SquidDev-CC/Studio","homepage":null,"size":1836,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SquidDev-CC/Studio/pulls/13"},"html":{"href":"https://github.com/SquidDev-CC/Studio/pull/13"},"issue":{"href":"https://api.github.com/repos/SquidDev-CC/Studio/issues/13"},"comments":{"href":"https://api.github.com/repos/SquidDev-CC/Studio/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/SquidDev-CC/Studio/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/SquidDev-CC/Studio/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SquidDev-CC/Studio/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/SquidDev-CC/Studio/statuses/58ed3d5b70d10260a28c2f54ab232affd86f418f"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":4,"additions":1353,"deletions":85,"changed_files":6}}