New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 9 users
Status: Fixed
Last visit > 30 days ago
Closed: Jul 2012
HW: ----
NextAction: ----
OS: ----
Priority: ----
Type: FeatureRequest

Sign in to add a comment
subarray(), set() not present on typed arrays in d8
Reported by, Nov 13 2011 Back to list
Typed array in d8 do not have the subarray or set methods, which are in the spec.

For example,

(new Int32Array(22)).subarray

returns undefined.

However, these functions *do* exist in Chrome. They are only missing in d8.

Status: Assigned
I just noticed that ArrayBuffer is also missing from d8, but present in Chrome.

The "buffer" property of typed arrays is also missing in d8.
Comment 4 by, Apr 13 2012
To pile onto this bug, the constructors don't work either

d8> foo = new Int32Array([1,2,3,4])
d8> foo[0] === undefined

Why is there a delta between the d8 typed arrays and Chrome typed arrays?
Labels: Type-FeatureRequest
The creation of typed arrays a.k.a. external arrays is within the responsibility of the embedder. V8 basically only understands "here's a typed array, do something with its elements". 
Chrome's implementation of the constructors and other methods is in WebKit's V8 bindings. In d8, we have replicated the functionality that we needed for tests and benchmarks, but not everything contained in the spec. There is no reason not to extend d8's external array implementation in the future, but I currently don't see a need to work on it with high priority either.
Status: Fixed
Typed array support in d8 is now complete (not counting the DataView constructor).
I see that .subarray() is now present, nice!

However .set() is still missing (it is present in the browser, but not in d8).

.set landed on bleeding edge yesterday, see r11983.
Great, thanks for the info!
Sign in to add a comment