Closed
Bug 1111516
Opened 11 years ago
Closed 11 years ago
Implement %TypedArray%.prototype.reverse
Categories
(Core :: JavaScript: Standard Library, defect)
Core
JavaScript: Standard Library
Tracking
()
RESOLVED
FIXED
mozilla37
People
(Reporter: 446240525, Assigned: 446240525)
References
Details
(Keywords: dev-doc-complete, Whiteboard: [DocArea=JS])
Attachments
(1 file, 3 obsolete files)
|
5.85 KB,
patch
|
446240525
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Attachment #8537168 -
Flags: review?(evilpies)
Attachment #8537168 -
Attachment is obsolete: true
Attachment #8537168 -
Flags: review?(evilpies)
Attachment #8537655 -
Flags: review?(evilpies)
Attachment #8537655 -
Attachment is obsolete: true
Attachment #8537655 -
Flags: review?(evilpies)
Attachment #8537839 -
Flags: review?(evilpies)
Comment 4•11 years ago
|
||
Sorry, I will try to review this in 24hours.
Comment 5•11 years ago
|
||
Comment on attachment 8537839 [details] [diff] [review]
added `if (typeof newGlobal === "function"){...}`
Review of attachment 8537839 [details] [diff] [review]:
-----------------------------------------------------------------
Looks perfect, can't really think of anything, but adding a few more step annotations.
::: js/src/builtin/TypedArray.js
@@ +175,5 @@
> + // Step 6.
> + var middle = std_Math_floor(len / 2);
> +
> + // Steps 7-8.
> + // Omit some steps, since there are no holes in typed arrays.
// Especially all the HasProperty/*exists checks always succeed.
@@ +177,5 @@
> +
> + // Steps 7-8.
> + // Omit some steps, since there are no holes in typed arrays.
> + for (var lower = 0, upper, temp; lower !== middle; lower++) {
> + upper = len - lower - 1;
// a.
var upper =
@@ +178,5 @@
> + // Steps 7-8.
> + // Omit some steps, since there are no holes in typed arrays.
> + for (var lower = 0, upper, temp; lower !== middle; lower++) {
> + upper = len - lower - 1;
> + temp = O[lower];
var lowerValue = O[lower];
var upperValue = O[upper];
// We always end up in the j. case
O[lower] = ..
...
::: js/src/tests/ecma_6/TypedArray/reverse.js
@@ +14,5 @@
> +
> + assertDeepEq(constructor.prototype.reverse.length, 0);
> +
> + assertDeepEq(new constructor().reverse(), new constructor());
> + assertDeepEq(new constructor(1000).reverse(), new constructor(1000));
I think 10 is probably enough.
Attachment #8537839 -
Flags: review?(evilpies) → review+
Attachment #8537839 -
Attachment is obsolete: true
Attachment #8539002 -
Flags: review+
Keywords: checkin-needed
Comment 8•11 years ago
|
||
Keywords: checkin-needed
Comment 9•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
Comment 10•11 years ago
|
||
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse
https://developer.mozilla.org/en-US/Firefox/Releases/37#JavaScript
Keywords: dev-doc-needed → dev-doc-complete
You need to log in
before you can comment on or make changes to this bug.
Description
•