Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(158)

Issue 1754593003: Implement TypedArray(typedarray) constructor (Closed)

Created:
4 years, 9 months ago by Dan Ehrenberg
Modified:
4 years, 9 months ago
Reviewers:
adamk
CC:
v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Implement TypedArray(typedarray) constructor The ES2016 draft spec defines a sort of fast path for constructing a TypedArray based on another TypedArray. This patch implements that alternative path in TypedArray construction. It is verified by test262 tests, which now pass. This patch also has a slight cleanup of TypedArray code by using a macro for TypedArray type checks, as is done for other types. This patch includes a minor spec violation: In the same-type case, the spec indicates that the underlying ArrayBuffer should be copied until the end, and this is fixed up by making the [[ArrayLength]] shorter. This is observable with the buffer getter. This patch just copies the used part of the underlying ArrayBuffer. R=adamk BUG=v8:4726 LOG=Y Committed: https://crrev.com/2fa1c88442d83865f611efb890642d1eb643f320 Cr-Commit-Position: refs/heads/master@{#34443}

Patch Set 1 #

Patch Set 2 : fix comment and test262 #

Total comments: 4

Patch Set 3 : Remove outdated comment #

Total comments: 2

Patch Set 4 : rebase #

Patch Set 5 : Do SetPrototype only when needed #

Patch Set 6 : use the right equality #

Unified diffs Side-by-side diffs Delta from patch set Stats (+53 lines, -43 lines) Patch
M src/js/macros.py View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M src/js/typedarray.js View 1 2 3 4 5 28 chunks +52 lines, -29 lines 0 comments Download
M test/test262/test262.status View 1 2 3 1 chunk +0 lines, -14 lines 0 comments Download

Messages

Total messages: 38 (19 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1754593003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1754593003/1
4 years, 9 months ago (2016-03-01 08:41:45 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1754593003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1754593003/20001
4 years, 9 months ago (2016-03-01 08:43:52 UTC) #4
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_mac_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_mac_rel/builds/16255)
4 years, 9 months ago (2016-03-01 08:50:08 UTC) #6
Dan Ehrenberg
4 years, 9 months ago (2016-03-01 09:00:27 UTC) #7
adamk
lgtm once TODO is gone https://codereview.chromium.org/1754593003/diff/20001/src/js/typedarray.js File src/js/typedarray.js (right): https://codereview.chromium.org/1754593003/diff/20001/src/js/typedarray.js#newcode259 src/js/typedarray.js:259: %InternalSetPrototype(data, prototype); Looks like ...
4 years, 9 months ago (2016-03-01 18:49:46 UTC) #8
Dan Ehrenberg
https://codereview.chromium.org/1754593003/diff/20001/src/js/typedarray.js File src/js/typedarray.js (right): https://codereview.chromium.org/1754593003/diff/20001/src/js/typedarray.js#newcode259 src/js/typedarray.js:259: %InternalSetPrototype(data, prototype); On 2016/03/01 at 18:49:46, adamk wrote: > ...
4 years, 9 months ago (2016-03-01 19:34:19 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1754593003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1754593003/40001
4 years, 9 months ago (2016-03-01 19:34:29 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: v8_linux_arm64_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_arm64_rel/builds/16150) v8_linux_dbg_ng on tryserver.v8 (JOB_FAILED, ...
4 years, 9 months ago (2016-03-01 19:35:40 UTC) #15
adamk
https://codereview.chromium.org/1754593003/diff/40001/src/js/typedarray.js File src/js/typedarray.js (right): https://codereview.chromium.org/1754593003/diff/40001/src/js/typedarray.js#newcode259 src/js/typedarray.js:259: %InternalSetPrototype(data, prototype); Could we skip this in the common ...
4 years, 9 months ago (2016-03-01 19:36:37 UTC) #16
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1754593003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1754593003/80001
4 years, 9 months ago (2016-03-01 19:39:39 UTC) #18
Dan Ehrenberg
https://codereview.chromium.org/1754593003/diff/40001/src/js/typedarray.js File src/js/typedarray.js (right): https://codereview.chromium.org/1754593003/diff/40001/src/js/typedarray.js#newcode259 src/js/typedarray.js:259: %InternalSetPrototype(data, prototype); On 2016/03/01 at 19:36:36, adamk wrote: > ...
4 years, 9 months ago (2016-03-01 19:41:36 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1754593003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1754593003/80001
4 years, 9 months ago (2016-03-01 19:42:29 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1754593003/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1754593003/100001
4 years, 9 months ago (2016-03-02 17:31:25 UTC) #27
commit-bot: I haz the power
Try jobs failed on following builders: v8_linux_nodcheck_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_nodcheck_rel/builds/13124) v8_linux_rel_ng on tryserver.v8 (JOB_FAILED, ...
4 years, 9 months ago (2016-03-02 17:34:40 UTC) #29
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1754593003/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1754593003/100001
4 years, 9 months ago (2016-03-02 17:44:44 UTC) #31
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 9 months ago (2016-03-02 18:00:56 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1754593003/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1754593003/100001
4 years, 9 months ago (2016-03-02 18:04:47 UTC) #35
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 9 months ago (2016-03-02 18:06:27 UTC) #36
commit-bot: I haz the power
4 years, 9 months ago (2016-03-02 18:06:38 UTC) #38
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/2fa1c88442d83865f611efb890642d1eb643f320
Cr-Commit-Position: refs/heads/master@{#34443}

Powered by Google App Engine
This is Rietveld 408576698