{"action":"created","comment":{"url":"https://api.github.com/repos/tc39/test262/pulls/comments/47011222","id":47011222,"diff_hunk":"@@ -0,0 +1,59 @@\n+//  Copyright (C) 2015\n+//\n+//  This software is provided 'as-is', without any express or implied\n+//  warranty.  In no event will the authors be held liable for any damages\n+//  arising from the use of this software.\n+//\n+//  Permission is granted to anyone to use this software for any purpose,\n+//  including commercial applications, and to alter it and redistribute it\n+//  freely, subject to the following restrictions:\n+//\n+//  1. The origin of this software must not be misrepresented; you must not\n+//     claim that you wrote the original software. If you use this software\n+//     in a product, an acknowledgment in the product documentation would be\n+//     appreciated but is not required.\n+//  2. Altered source versions must be plainly marked as such, and must not be\n+//     misrepresented as being the original software.\n+//  3. This notice may not be removed or altered from any source distribution.\n+\n+/*---\n+description: Tests Simd swizzle.\n+includes: [simdUtilities.js]\n+---*/\n+\n+function testSwizzle(type) {\n+  assert.sameValue('function', typeof type.fn.swizzle);\n+  var a = createTestValue(type);  // 0, 1, 2, 3, 4, 5, 6, ...\n+  var indices = [];\n+  // Identity swizzle.\n+  for (var i = 0; i < type.lanes; i++) indices.push(i);\n+  var result = type.fn.swizzle.apply(type.fn, [a].concat(indices));\n+  checkValue(type, result, function(index) { return type.fn.extractLane(a, index); });\n+  // Reverse swizzle.\n+  indices.reverse();\n+  var result = type.fn.swizzle.apply(type.fn, [a].concat(indices));\n+  checkValue(type, result, function(index) { return type.fn.extractLane(a, type.lanes - index - 1); });\n+\n+  function testIndexCheck(index) {\n+    for (var i = 0; i < type.lanes; i++) {\n+      var args = [a].concat(indices);\n+      args[i + 1] = index;\n+      throws(function() { type.fn.swizzle.apply(type.fn, args); });","path":"test/built-ins/Simd/Simd.swizzle.js","position":45,"original_position":41,"commit_id":"711c0949f616764ce4dd506f6ba21a194455d936","original_commit_id":"d9fd1b7664f1d4dc7d77e5719cb05f3e9e102dbd","user":{"login":"dtig","id":11527586,"avatar_url":"https://avatars.githubusercontent.com/u/11527586?v=3","gravatar_id":"","url":"https://api.github.com/users/dtig","html_url":"https://github.com/dtig","followers_url":"https://api.github.com/users/dtig/followers","following_url":"https://api.github.com/users/dtig/following{/other_user}","gists_url":"https://api.github.com/users/dtig/gists{/gist_id}","starred_url":"https://api.github.com/users/dtig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dtig/subscriptions","organizations_url":"https://api.github.com/users/dtig/orgs","repos_url":"https://api.github.com/users/dtig/repos","events_url":"https://api.github.com/users/dtig/events{/privacy}","received_events_url":"https://api.github.com/users/dtig/received_events","type":"User","site_admin":false},"body":"Some throws functions have been refactored to use assert.throws, for the rest see first note in the description of the pull request. ","created_at":"2015-12-08T20:47:31Z","updated_at":"2015-12-08T20:47:31Z","html_url":"https://github.com/tc39/test262/pull/442#discussion_r47011222","pull_request_url":"https://api.github.com/repos/tc39/test262/pulls/442","_links":{"self":{"href":"https://api.github.com/repos/tc39/test262/pulls/comments/47011222"},"html":{"href":"https://github.com/tc39/test262/pull/442#discussion_r47011222"},"pull_request":{"href":"https://api.github.com/repos/tc39/test262/pulls/442"}}},"pull_request":{"url":"https://api.github.com/repos/tc39/test262/pulls/442","id":50291195,"html_url":"https://github.com/tc39/test262/pull/442","diff_url":"https://github.com/tc39/test262/pull/442.diff","patch_url":"https://github.com/tc39/test262/pull/442.patch","issue_url":"https://api.github.com/repos/tc39/test262/issues/442","number":442,"state":"open","locked":false,"title":"Adding initial SIMD test suite and utility functions.","user":{"login":"dtig","id":11527586,"avatar_url":"https://avatars.githubusercontent.com/u/11527586?v=3","gravatar_id":"","url":"https://api.github.com/users/dtig","html_url":"https://github.com/dtig","followers_url":"https://api.github.com/users/dtig/followers","following_url":"https://api.github.com/users/dtig/following{/other_user}","gists_url":"https://api.github.com/users/dtig/gists{/gist_id}","starred_url":"https://api.github.com/users/dtig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dtig/subscriptions","organizations_url":"https://api.github.com/users/dtig/orgs","repos_url":"https://api.github.com/users/dtig/repos","events_url":"https://api.github.com/users/dtig/events{/privacy}","received_events_url":"https://api.github.com/users/dtig/received_events","type":"User","site_admin":false},"body":"Adding SIMD test suite - #441\r\nGeneric utility functions ported to harness/simdUtilities.js\r\nOther files that test the specification are in test/built-ins/Simd\r\n\r\nAdditional notes: \r\n1. Custom throws implementation is used in this pull request. This should be temporary and will soon be refactored to use assert.throws. Custom throws function used because assert.throws requires an error object that in some cases the V8 implementation that I am testing with does not throw and asserts on runtime instead. This should be fixed soon, using the custom throws function to test the porting efforts until then. \r\n2. Value semantics tests are not added in this version as there has to be a way to disabled based on whether the tests are running with the polyfill, this has not been added yet. ","created_at":"2015-11-10T18:23:58Z","updated_at":"2015-12-08T20:47:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a0283fab5b35475623130a8e3825ea9bedceb02b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tc39/test262/pulls/442/commits","review_comments_url":"https://api.github.com/repos/tc39/test262/pulls/442/comments","review_comment_url":"https://api.github.com/repos/tc39/test262/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tc39/test262/issues/442/comments","statuses_url":"https://api.github.com/repos/tc39/test262/statuses/711c0949f616764ce4dd506f6ba21a194455d936","head":{"label":"dtig:ecmascript_simd","ref":"ecmascript_simd","sha":"711c0949f616764ce4dd506f6ba21a194455d936","user":{"login":"dtig","id":11527586,"avatar_url":"https://avatars.githubusercontent.com/u/11527586?v=3","gravatar_id":"","url":"https://api.github.com/users/dtig","html_url":"https://github.com/dtig","followers_url":"https://api.github.com/users/dtig/followers","following_url":"https://api.github.com/users/dtig/following{/other_user}","gists_url":"https://api.github.com/users/dtig/gists{/gist_id}","starred_url":"https://api.github.com/users/dtig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dtig/subscriptions","organizations_url":"https://api.github.com/users/dtig/orgs","repos_url":"https://api.github.com/users/dtig/repos","events_url":"https://api.github.com/users/dtig/events{/privacy}","received_events_url":"https://api.github.com/users/dtig/received_events","type":"User","site_admin":false},"repo":{"id":43573261,"name":"test262","full_name":"dtig/test262","owner":{"login":"dtig","id":11527586,"avatar_url":"https://avatars.githubusercontent.com/u/11527586?v=3","gravatar_id":"","url":"https://api.github.com/users/dtig","html_url":"https://github.com/dtig","followers_url":"https://api.github.com/users/dtig/followers","following_url":"https://api.github.com/users/dtig/following{/other_user}","gists_url":"https://api.github.com/users/dtig/gists{/gist_id}","starred_url":"https://api.github.com/users/dtig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dtig/subscriptions","organizations_url":"https://api.github.com/users/dtig/orgs","repos_url":"https://api.github.com/users/dtig/repos","events_url":"https://api.github.com/users/dtig/events{/privacy}","received_events_url":"https://api.github.com/users/dtig/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dtig/test262","description":"Official ECMAScript Conformance Test Suite","fork":true,"url":"https://api.github.com/repos/dtig/test262","forks_url":"https://api.github.com/repos/dtig/test262/forks","keys_url":"https://api.github.com/repos/dtig/test262/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dtig/test262/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dtig/test262/teams","hooks_url":"https://api.github.com/repos/dtig/test262/hooks","issue_events_url":"https://api.github.com/repos/dtig/test262/issues/events{/number}","events_url":"https://api.github.com/repos/dtig/test262/events","assignees_url":"https://api.github.com/repos/dtig/test262/assignees{/user}","branches_url":"https://api.github.com/repos/dtig/test262/branches{/branch}","tags_url":"https://api.github.com/repos/dtig/test262/tags","blobs_url":"https://api.github.com/repos/dtig/test262/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dtig/test262/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dtig/test262/git/refs{/sha}","trees_url":"https://api.github.com/repos/dtig/test262/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dtig/test262/statuses/{sha}","languages_url":"https://api.github.com/repos/dtig/test262/languages","stargazers_url":"https://api.github.com/repos/dtig/test262/stargazers","contributors_url":"https://api.github.com/repos/dtig/test262/contributors","subscribers_url":"https://api.github.com/repos/dtig/test262/subscribers","subscription_url":"https://api.github.com/repos/dtig/test262/subscription","commits_url":"https://api.github.com/repos/dtig/test262/commits{/sha}","git_commits_url":"https://api.github.com/repos/dtig/test262/git/commits{/sha}","comments_url":"https://api.github.com/repos/dtig/test262/comments{/number}","issue_comment_url":"https://api.github.com/repos/dtig/test262/issues/comments{/number}","contents_url":"https://api.github.com/repos/dtig/test262/contents/{+path}","compare_url":"https://api.github.com/repos/dtig/test262/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dtig/test262/merges","archive_url":"https://api.github.com/repos/dtig/test262/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dtig/test262/downloads","issues_url":"https://api.github.com/repos/dtig/test262/issues{/number}","pulls_url":"https://api.github.com/repos/dtig/test262/pulls{/number}","milestones_url":"https://api.github.com/repos/dtig/test262/milestones{/number}","notifications_url":"https://api.github.com/repos/dtig/test262/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dtig/test262/labels{/name}","releases_url":"https://api.github.com/repos/dtig/test262/releases{/id}","created_at":"2015-10-02T19:53:13Z","updated_at":"2015-10-02T19:53:35Z","pushed_at":"2015-12-08T20:39:29Z","git_url":"git://github.com/dtig/test262.git","ssh_url":"git@github.com:dtig/test262.git","clone_url":"https://github.com/dtig/test262.git","svn_url":"https://github.com/dtig/test262","homepage":"test262.ecmascript.org","size":115559,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"tc39:master","ref":"master","sha":"59dfae63119dae2002acaa7e0639392dbc0bc698","user":{"login":"tc39","id":1725583,"avatar_url":"https://avatars.githubusercontent.com/u/1725583?v=3","gravatar_id":"","url":"https://api.github.com/users/tc39","html_url":"https://github.com/tc39","followers_url":"https://api.github.com/users/tc39/followers","following_url":"https://api.github.com/users/tc39/following{/other_user}","gists_url":"https://api.github.com/users/tc39/gists{/gist_id}","starred_url":"https://api.github.com/users/tc39/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tc39/subscriptions","organizations_url":"https://api.github.com/users/tc39/orgs","repos_url":"https://api.github.com/users/tc39/repos","events_url":"https://api.github.com/users/tc39/events{/privacy}","received_events_url":"https://api.github.com/users/tc39/received_events","type":"Organization","site_admin":false},"repo":{"id":16147933,"name":"test262","full_name":"tc39/test262","owner":{"login":"tc39","id":1725583,"avatar_url":"https://avatars.githubusercontent.com/u/1725583?v=3","gravatar_id":"","url":"https://api.github.com/users/tc39","html_url":"https://github.com/tc39","followers_url":"https://api.github.com/users/tc39/followers","following_url":"https://api.github.com/users/tc39/following{/other_user}","gists_url":"https://api.github.com/users/tc39/gists{/gist_id}","starred_url":"https://api.github.com/users/tc39/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tc39/subscriptions","organizations_url":"https://api.github.com/users/tc39/orgs","repos_url":"https://api.github.com/users/tc39/repos","events_url":"https://api.github.com/users/tc39/events{/privacy}","received_events_url":"https://api.github.com/users/tc39/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tc39/test262","description":"Official ECMAScript Conformance Test Suite","fork":false,"url":"https://api.github.com/repos/tc39/test262","forks_url":"https://api.github.com/repos/tc39/test262/forks","keys_url":"https://api.github.com/repos/tc39/test262/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tc39/test262/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tc39/test262/teams","hooks_url":"https://api.github.com/repos/tc39/test262/hooks","issue_events_url":"https://api.github.com/repos/tc39/test262/issues/events{/number}","events_url":"https://api.github.com/repos/tc39/test262/events","assignees_url":"https://api.github.com/repos/tc39/test262/assignees{/user}","branches_url":"https://api.github.com/repos/tc39/test262/branches{/branch}","tags_url":"https://api.github.com/repos/tc39/test262/tags","blobs_url":"https://api.github.com/repos/tc39/test262/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tc39/test262/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tc39/test262/git/refs{/sha}","trees_url":"https://api.github.com/repos/tc39/test262/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tc39/test262/statuses/{sha}","languages_url":"https://api.github.com/repos/tc39/test262/languages","stargazers_url":"https://api.github.com/repos/tc39/test262/stargazers","contributors_url":"https://api.github.com/repos/tc39/test262/contributors","subscribers_url":"https://api.github.com/repos/tc39/test262/subscribers","subscription_url":"https://api.github.com/repos/tc39/test262/subscription","commits_url":"https://api.github.com/repos/tc39/test262/commits{/sha}","git_commits_url":"https://api.github.com/repos/tc39/test262/git/commits{/sha}","comments_url":"https://api.github.com/repos/tc39/test262/comments{/number}","issue_comment_url":"https://api.github.com/repos/tc39/test262/issues/comments{/number}","contents_url":"https://api.github.com/repos/tc39/test262/contents/{+path}","compare_url":"https://api.github.com/repos/tc39/test262/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tc39/test262/merges","archive_url":"https://api.github.com/repos/tc39/test262/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tc39/test262/downloads","issues_url":"https://api.github.com/repos/tc39/test262/issues{/number}","pulls_url":"https://api.github.com/repos/tc39/test262/pulls{/number}","milestones_url":"https://api.github.com/repos/tc39/test262/milestones{/number}","notifications_url":"https://api.github.com/repos/tc39/test262/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tc39/test262/labels{/name}","releases_url":"https://api.github.com/repos/tc39/test262/releases{/id}","created_at":"2014-01-22T18:20:05Z","updated_at":"2015-12-07T18:49:36Z","pushed_at":"2015-12-08T20:39:30Z","git_url":"git://github.com/tc39/test262.git","ssh_url":"git@github.com:tc39/test262.git","clone_url":"https://github.com/tc39/test262.git","svn_url":"https://github.com/tc39/test262","homepage":"test262.ecmascript.org","size":116924,"stargazers_count":208,"watchers_count":208,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":81,"mirror_url":null,"open_issues_count":47,"forks":81,"open_issues":47,"watchers":208,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tc39/test262/pulls/442"},"html":{"href":"https://github.com/tc39/test262/pull/442"},"issue":{"href":"https://api.github.com/repos/tc39/test262/issues/442"},"comments":{"href":"https://api.github.com/repos/tc39/test262/issues/442/comments"},"review_comments":{"href":"https://api.github.com/repos/tc39/test262/pulls/442/comments"},"review_comment":{"href":"https://api.github.com/repos/tc39/test262/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tc39/test262/pulls/442/commits"},"statuses":{"href":"https://api.github.com/repos/tc39/test262/statuses/711c0949f616764ce4dd506f6ba21a194455d936"}}}}