Closed Bug 1071668 Opened 10 years ago Closed 8 years ago

Implement array methods on %TypedArray%

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: fs, Assigned: mrrrgn)

References

(Blocks 1 open bug)

Details

In the current ES6 spec, Array.prototype methods are present on %TypedArray%.prototype as well: %TypedArray%.prototype.copyWithin - implemented in bug 1021379 %TypedArray%.prototype.entries %TypedArray%.prototype.every %TypedArray%.prototype.fill %TypedArray%.prototype.filter %TypedArray%.prototype.find %TypedArray%.prototype.findIndex %TypedArray%.prototype.forEach %TypedArray%.prototype.indexOf %TypedArray%.prototype.join %TypedArray%.prototype.key %TypedArray%.prototype.lastIndexOf %TypedArray%.prototype.map %TypedArray%.prototype.reduce %TypedArray%.prototype.reduceRight %TypedArray%.prototype.reverse %TypedArray%.prototype.slice %TypedArray%.prototype.some %TypedArray%.prototype.sort %TypedArray%.prototype.values - also not on Array yet, see bug 875433. %TypedArray%.{of, from} is bug 896608 Definitions start here: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-%typedarray%.prototype.copywithin See also this v8 issue: https://code.google.com/p/v8/issues/detail?id=3578 We might want separate bugs for these methods, in that case this bug could act as a tracking bug.
In case anyone's thinking of working on these: *please* *please* do them self-hosted. (This will be far easier after bug 896116 lands, soon. We'll need to add an intrinsic or two to help out, but it should be easy enough.) C++ implementations for this are more fragile than I care to accept, and indeed I plan to self-host the current C++ functions Real Soon Now after that bug lands.
Depends on: 1078975
Depends on: 1081435
Depends on: 1101256
Depends on: 1101258
Depends on: 1107567
Depends on: 1107601
Depends on: 1107645
Depends on: 1111516
Depends on: 1113722
Depends on: 1115361
Depends on: 1115817
Depends on: 1116390
Depends on: 1117350
Depends on: 896608
Nice progress so far! :) fwiw, it seems like I forgot %TypedArray%.prototype.toString %TypedArray%.prototype.toLocaleString in the list above.
Depends on: 1119217
Depends on: 1121935
Depends on: 1121936
Depends on: 1121937
Depends on: 1121938
Depends on: 1138906
Assignee: nobody → winter2718
No longer blocks: es6
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Yay! \o/
Keywords: dev-doc-needed
Whiteboard: [DocArea=JS]
You need to log in before you can comment on or make changes to this bug.