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

Issue 23463050: Allocate typed arrays uninitialized when constructing from array-like. (Closed)

Created:
7 years, 3 months ago by Dmitry Lomov (no reviews)
Modified:
7 years, 3 months ago
Reviewers:
Yang
CC:
v8-dev
Visibility:
Public.

Description

Allocate typed arrays uninitialized when constructing from array-like. This is a fix for performance regression. For new Uint8Array(arrayLike) and the likes, we allocate the backing store of typed array uninitialized and then proceed to feel it in with elements of arrayLike. If the loop over arrayLike runs to completion, we know that all elements of typed arrays had been assigned to and there is no uninitialized memory. If the loop does not run to completion, we propagate the exception to constructor caller, therefore the typed array is not exposed to user program. BUG=270507 R=yangguo@chromium.org Committed: https://code.google.com/p/v8/source/detail?r=16914

Patch Set 1 #

Patch Set 2 : #

Total comments: 2

Patch Set 3 : Patch for landing #

Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -5 lines) Patch
M src/runtime.cc View 1 1 chunk +11 lines, -4 lines 0 comments Download
M src/typedarray.js View 1 2 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 4 (0 generated)
Dmitry Lomov (no reviews)
PTAL
7 years, 3 months ago (2013-09-24 10:42:48 UTC) #1
Yang
On 2013/09/24 10:42:48, Dmitry Lomov (chromium) wrote: > PTAL LGTM.
7 years, 3 months ago (2013-09-24 10:46:45 UTC) #2
Yang
https://codereview.chromium.org/23463050/diff/3001/src/typedarray.js File src/typedarray.js (right): https://codereview.chromium.org/23463050/diff/3001/src/typedarray.js#newcode79 src/typedarray.js:79: var l = ToPositiveInteger(length, "invalid_typed_array_length"); Please remove that extra ...
7 years, 3 months ago (2013-09-24 10:46:49 UTC) #3
Dmitry Lomov (no reviews)
7 years, 3 months ago (2013-09-24 10:50:25 UTC) #4
Message was sent while issue was closed.
Committed patchset #3 manually as r16914 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698