{"action":"created","comment":{"url":"https://api.github.com/repos/tc39/test262/pulls/comments/62351866","id":62351866,"diff_hunk":"@@ -0,0 +1,70 @@\n+// Copyright (C) 2016 the V8 project authors. All rights reserved.\n+// This code is governed by the BSD license found in the LICENSE file.\n+/*---\n+esid: sec-%typedarray%.prototype.fill\n+es6id: 22.2.3.8\n+description: Consistent canonicalization of NaN values\n+info: >\n+  22.2.3.8 %TypedArray%.prototype.fill (value [ , start [ , end ] ] )\n+\n+  %TypedArray%.prototype.fill is a distinct function that implements the same\n+  algorithm as Array.prototype.fill as defined in 22.1.3.6 except that the this\n+  object's [[ArrayLength]] internal slot is accessed in place of performing a\n+  [[Get]] of \"length\". The implementation of the algorithm may be optimized with\n+  the knowledge that the this value is an object that has a fixed length and\n+  whose integer indexed properties are not sparse. However, such optimization\n+  must not introduce any observable changes in the specified behaviour of the\n+  algorithm.\n+\n+  ...\n+\n+  22.1.3.6 Array.prototype.fill (value [ , start [ , end ] ] )\n+\n+  ...\n+  7. Repeat, while k < final\n+    a. Let Pk be ! ToString(k).\n+    b. Perform ? Set(O, Pk, value, true).\n+  ...\n+\n+  24.1.1.6 SetValueInBuffer ( arrayBuffer, byteIndex, type, value [ ,\n+  isLittleEndian ] )\n+\n+  ...\n+  8. If type is \"Float32\", then\n+     a. Set rawBytes to a List containing the 4 bytes that are the result\n+        of converting value to IEEE 754-2008 binary32 format using “Round to\n+        nearest, ties to even” rounding mode. If isLittleEndian is false, the\n+        bytes are arranged in big endian order. Otherwise, the bytes are\n+        arranged in little endian order. If value is NaN, rawValue may be set\n+        to any implementation chosen IEEE 754-2008 binary64 format Not-a-Number\n+        encoding. An implementation must always choose the same encoding for\n+        each implementation distinguishable NaN value.\n+  9. Else, if type is \"Float64\", then\n+     a. Set rawBytes to a List containing the 8 bytes that are the IEEE\n+        754-2008 binary64 format encoding of value. If isLittleEndian is false,\n+        the bytes are arranged in big endian order. Otherwise, the bytes are\n+        arranged in little endian order. If value is NaN, rawValue may be set\n+        to any implementation chosen IEEE 754-2008 binary32 format Not-a-Number\n+        encoding. An implementation must always choose the same encoding for\n+        each implementation distinguishable NaN value.\n+  ...\n+includes: [nans.js, testTypedArray.js, compareArray.js]\n+---*/\n+\n+function body(FloatArray) {\n+  var sample = new FloatArray(3);\n+  var control, idx, someNaN, sampleBytes, controlBytes;\n+\n+  for (idx = 0; idx < distinctNaNs.length; ++idx) {\n+    someNaN = distinctNaNs[idx];\n+    control = new FloatArray([someNaN, someNaN, someNaN]);\n+\n+    sample.fill(someNaN);","path":"test/built-ins/TypedArray/prototype/fill/fill-values-conversion-operations-consistent-nan.js","position":62,"original_position":62,"commit_id":"8454a227c1a35e611c6b931fe59910898dd1dc97","original_commit_id":"8454a227c1a35e611c6b931fe59910898dd1dc97","user":{"login":"leobalter","id":301201,"avatar_url":"https://avatars.githubusercontent.com/u/301201?v=3","gravatar_id":"","url":"https://api.github.com/users/leobalter","html_url":"https://github.com/leobalter","followers_url":"https://api.github.com/users/leobalter/followers","following_url":"https://api.github.com/users/leobalter/following{/other_user}","gists_url":"https://api.github.com/users/leobalter/gists{/gist_id}","starred_url":"https://api.github.com/users/leobalter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leobalter/subscriptions","organizations_url":"https://api.github.com/users/leobalter/orgs","repos_url":"https://api.github.com/users/leobalter/repos","events_url":"https://api.github.com/users/leobalter/events{/privacy}","received_events_url":"https://api.github.com/users/leobalter/received_events","type":"User","site_admin":false},"body":"Wow, you got it:\r\n\r\n```\r\n24.1.1.5 GetValueFromBuffer ( arrayBuffer, byteIndex, type [ , isLittleEndian ] )\r\n\r\n...\r\n11. If the first code unit of type is \"U\", then\r\n  a. Let intValue be the byte elements of rawValue concatenated and interpreted as a bit string encoding of an unsigned little-endian binary number.\r\n```\r\n\r\nThat's such an amazing test, thank you!","created_at":"2016-05-06T16:12:39Z","updated_at":"2016-05-06T16:12:39Z","html_url":"https://github.com/tc39/test262/pull/623#discussion_r62351866","pull_request_url":"https://api.github.com/repos/tc39/test262/pulls/623","_links":{"self":{"href":"https://api.github.com/repos/tc39/test262/pulls/comments/62351866"},"html":{"href":"https://github.com/tc39/test262/pull/623#discussion_r62351866"},"pull_request":{"href":"https://api.github.com/repos/tc39/test262/pulls/623"}}},"pull_request":{"url":"https://api.github.com/repos/tc39/test262/pulls/623","id":69169349,"html_url":"https://github.com/tc39/test262/pull/623","diff_url":"https://github.com/tc39/test262/pull/623.diff","patch_url":"https://github.com/tc39/test262/pull/623.patch","issue_url":"https://api.github.com/repos/tc39/test262/issues/623","number":623,"state":"open","locked":false,"title":"Add tests for NaN handling with Typed Arrays","user":{"login":"jugglinmike","id":677252,"avatar_url":"https://avatars.githubusercontent.com/u/677252?v=3","gravatar_id":"","url":"https://api.github.com/users/jugglinmike","html_url":"https://github.com/jugglinmike","followers_url":"https://api.github.com/users/jugglinmike/followers","following_url":"https://api.github.com/users/jugglinmike/following{/other_user}","gists_url":"https://api.github.com/users/jugglinmike/gists{/gist_id}","starred_url":"https://api.github.com/users/jugglinmike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jugglinmike/subscriptions","organizations_url":"https://api.github.com/users/jugglinmike/orgs","repos_url":"https://api.github.com/users/jugglinmike/repos","events_url":"https://api.github.com/users/jugglinmike/events{/privacy}","received_events_url":"https://api.github.com/users/jugglinmike/received_events","type":"User","site_admin":false},"body":"Given the highly technical nature of this aspect of the specification, the\r\nchances that I have made a mistake here are higher than normal--I'm still a\r\nlittle concerned that these tests are overly strict.\r\n\r\n@littledan can you verify that these tests accurately demonstrate the\r\nconditions required by the spec?\r\n\r\nFor context, SpiderMonkey fails:\r\n\r\n- `built-ins/TypedArray/prototype/map/return-new-typedarray-conversion-operation-consistent-nan.js`\r\n- `built-ins/TypedArray/prototype/slice/bit-precision.js`\r\n\r\nwhile V8 fails:\r\n\r\n- `built-ins/TypedArrays/internals/Set/conversion-operation-consistent-nan.js`\r\n\r\nCommit message:\r\n\r\n> Ensure that NaN values are canonicalized consistently by all invocations\r\n> of SetValueInBuffer. Also ensure that `%TypedArray%.prototype.set` and\r\n> `%TypedArray%.prototype.slice` preserve the bit-level encoding of the\r\n> source data.\r\n>\r\n> Use a set of experimentally-derived expressions known to produce NaN\r\n> values with distinct bit patterns in various platforms.","created_at":"2016-05-06T15:40:07Z","updated_at":"2016-05-06T16:12:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"99652fd086ba37f16e14bbe099219c8f45490111","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tc39/test262/pulls/623/commits","review_comments_url":"https://api.github.com/repos/tc39/test262/pulls/623/comments","review_comment_url":"https://api.github.com/repos/tc39/test262/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tc39/test262/issues/623/comments","statuses_url":"https://api.github.com/repos/tc39/test262/statuses/8454a227c1a35e611c6b931fe59910898dd1dc97","head":{"label":"bocoup:ta-bit-precision","ref":"ta-bit-precision","sha":"8454a227c1a35e611c6b931fe59910898dd1dc97","user":{"login":"bocoup","id":497466,"avatar_url":"https://avatars.githubusercontent.com/u/497466?v=3","gravatar_id":"","url":"https://api.github.com/users/bocoup","html_url":"https://github.com/bocoup","followers_url":"https://api.github.com/users/bocoup/followers","following_url":"https://api.github.com/users/bocoup/following{/other_user}","gists_url":"https://api.github.com/users/bocoup/gists{/gist_id}","starred_url":"https://api.github.com/users/bocoup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bocoup/subscriptions","organizations_url":"https://api.github.com/users/bocoup/orgs","repos_url":"https://api.github.com/users/bocoup/repos","events_url":"https://api.github.com/users/bocoup/events{/privacy}","received_events_url":"https://api.github.com/users/bocoup/received_events","type":"Organization","site_admin":false},"repo":{"id":30556261,"name":"test262","full_name":"bocoup/test262","owner":{"login":"bocoup","id":497466,"avatar_url":"https://avatars.githubusercontent.com/u/497466?v=3","gravatar_id":"","url":"https://api.github.com/users/bocoup","html_url":"https://github.com/bocoup","followers_url":"https://api.github.com/users/bocoup/followers","following_url":"https://api.github.com/users/bocoup/following{/other_user}","gists_url":"https://api.github.com/users/bocoup/gists{/gist_id}","starred_url":"https://api.github.com/users/bocoup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bocoup/subscriptions","organizations_url":"https://api.github.com/users/bocoup/orgs","repos_url":"https://api.github.com/users/bocoup/repos","events_url":"https://api.github.com/users/bocoup/events{/privacy}","received_events_url":"https://api.github.com/users/bocoup/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bocoup/test262","description":"","fork":true,"url":"https://api.github.com/repos/bocoup/test262","forks_url":"https://api.github.com/repos/bocoup/test262/forks","keys_url":"https://api.github.com/repos/bocoup/test262/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bocoup/test262/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bocoup/test262/teams","hooks_url":"https://api.github.com/repos/bocoup/test262/hooks","issue_events_url":"https://api.github.com/repos/bocoup/test262/issues/events{/number}","events_url":"https://api.github.com/repos/bocoup/test262/events","assignees_url":"https://api.github.com/repos/bocoup/test262/assignees{/user}","branches_url":"https://api.github.com/repos/bocoup/test262/branches{/branch}","tags_url":"https://api.github.com/repos/bocoup/test262/tags","blobs_url":"https://api.github.com/repos/bocoup/test262/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bocoup/test262/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bocoup/test262/git/refs{/sha}","trees_url":"https://api.github.com/repos/bocoup/test262/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bocoup/test262/statuses/{sha}","languages_url":"https://api.github.com/repos/bocoup/test262/languages","stargazers_url":"https://api.github.com/repos/bocoup/test262/stargazers","contributors_url":"https://api.github.com/repos/bocoup/test262/contributors","subscribers_url":"https://api.github.com/repos/bocoup/test262/subscribers","subscription_url":"https://api.github.com/repos/bocoup/test262/subscription","commits_url":"https://api.github.com/repos/bocoup/test262/commits{/sha}","git_commits_url":"https://api.github.com/repos/bocoup/test262/git/commits{/sha}","comments_url":"https://api.github.com/repos/bocoup/test262/comments{/number}","issue_comment_url":"https://api.github.com/repos/bocoup/test262/issues/comments{/number}","contents_url":"https://api.github.com/repos/bocoup/test262/contents/{+path}","compare_url":"https://api.github.com/repos/bocoup/test262/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bocoup/test262/merges","archive_url":"https://api.github.com/repos/bocoup/test262/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bocoup/test262/downloads","issues_url":"https://api.github.com/repos/bocoup/test262/issues{/number}","pulls_url":"https://api.github.com/repos/bocoup/test262/pulls{/number}","milestones_url":"https://api.github.com/repos/bocoup/test262/milestones{/number}","notifications_url":"https://api.github.com/repos/bocoup/test262/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bocoup/test262/labels{/name}","releases_url":"https://api.github.com/repos/bocoup/test262/releases{/id}","deployments_url":"https://api.github.com/repos/bocoup/test262/deployments","created_at":"2015-02-09T20:17:23Z","updated_at":"2016-02-10T20:14:58Z","pushed_at":"2016-05-06T15:37:59Z","git_url":"git://github.com/bocoup/test262.git","ssh_url":"git@github.com:bocoup/test262.git","clone_url":"https://github.com/bocoup/test262.git","svn_url":"https://github.com/bocoup/test262","homepage":"http://test262.ecmascript.org","size":54774,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":64,"forks":0,"open_issues":64,"watchers":0,"default_branch":"master"}},"base":{"label":"tc39:master","ref":"master","sha":"aebf3d63bc64bf5916cf1800cbe9e33cf526f091","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}","deployments_url":"https://api.github.com/repos/tc39/test262/deployments","created_at":"2014-01-22T18:20:05Z","updated_at":"2016-05-06T15:04:06Z","pushed_at":"2016-05-06T15:40:08Z","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":"","size":56247,"stargazers_count":291,"watchers_count":291,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":97,"mirror_url":null,"open_issues_count":83,"forks":97,"open_issues":83,"watchers":291,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tc39/test262/pulls/623"},"html":{"href":"https://github.com/tc39/test262/pull/623"},"issue":{"href":"https://api.github.com/repos/tc39/test262/issues/623"},"comments":{"href":"https://api.github.com/repos/tc39/test262/issues/623/comments"},"review_comments":{"href":"https://api.github.com/repos/tc39/test262/pulls/623/comments"},"review_comment":{"href":"https://api.github.com/repos/tc39/test262/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tc39/test262/pulls/623/commits"},"statuses":{"href":"https://api.github.com/repos/tc39/test262/statuses/8454a227c1a35e611c6b931fe59910898dd1dc97"}}}}