Implement array methods on %TypedArray%

RESOLVED FIXED

Status

()

RESOLVED FIXED
4 years ago
2 years ago

People

(Reporter: fscholz, Assigned: mrrrgn)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

4 years ago
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.

Comment 1

4 years ago
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.

Updated

4 years ago
Depends on: 1078975
Depends on: 1081435
Depends on: 1101256
Depends on: 1101258
Depends on: 1107567
Depends on: 1107601
Depends on: 1107645

Updated

4 years ago
Depends on: 1111516
Depends on: 1113722

Updated

4 years ago
Depends on: 1115361

Updated

4 years ago
Depends on: 1115817

Updated

4 years ago
Depends on: 1116390

Updated

4 years ago
Depends on: 1117350

Updated

4 years ago
Depends on: 896608
(Reporter)

Comment 2

4 years ago
Nice progress so far! :)

fwiw, it seems like I forgot 

%TypedArray%.prototype.toString
%TypedArray%.prototype.toLocaleString

in the list above.
Depends on: 1119217

Updated

4 years ago
Depends on: 1121935

Updated

4 years ago
Depends on: 1121936

Updated

4 years ago
Depends on: 1121937

Updated

4 years ago
Depends on: 1121938
Depends on: 1138906
(Assignee)

Updated

2 years ago
Assignee: nobody → winter2718
No longer blocks: 694100
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
(Reporter)

Comment 3

2 years ago
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.