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

Issue 9402008: Uniformly handle 'undefined' store to Float64Array and Float32Array. (Closed)

Created:
8 years, 10 months ago by danno
Modified:
8 years, 10 months ago
Reviewers:
Michael Starzinger
CC:
v8-dev
Visibility:
Public.

Description

Uniformly handle 'undefined' store to Float64Array and Float32Array. Previous behavior diverged in ICs and Crankshaft. When storing to a Float32Array or Float64Array, the ICs treated undefined as zero while Crankshaft treated it as NaN. Now both ICs and Crankshaft treat it as NaN, which is consistent with the WebGL & ECMAScript spec. R=mstarzinger@chromium.org Committed: https://code.google.com/p/v8/source/detail?r=10714

Patch Set 1 #

Total comments: 12

Patch Set 2 : Review feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+47 lines, -6 lines) Patch
M src/objects.cc View 1 4 chunks +4 lines, -4 lines 0 comments Download
M test/cctest/test-api.cc View 1 1 chunk +9 lines, -2 lines 0 comments Download
M test/mjsunit/external-array.js View 1 1 chunk +34 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
danno
8 years, 10 months ago (2012-02-15 11:45:07 UTC) #1
Michael Starzinger
LGTM (with a few comments). Could you also add a short description to the CL ...
8 years, 10 months ago (2012-02-15 13:39:28 UTC) #2
danno
8 years, 10 months ago (2012-02-16 07:55:40 UTC) #3
Feedback addressed, landing.

http://codereview.chromium.org/9402008/diff/1/src/objects.cc
File src/objects.cc (right):

http://codereview.chromium.org/9402008/diff/1/src/objects.cc#newcode11770
src/objects.cc:11770: // Clamp undefined to zero (default). All other types have
been
On 2012/02/15 13:39:29, Michael Starzinger wrote:
> Comment no longer applies, it should say "clamp undefined to nan".

Done.

http://codereview.chromium.org/9402008/diff/1/src/objects.cc#newcode11790
src/objects.cc:11790: // Clamp undefined to zero (default). All other types have
been
On 2012/02/15 13:39:29, Michael Starzinger wrote:
> Likewise.

Done.

http://codereview.chromium.org/9402008/diff/1/test/mjsunit/external-array.js
File test/mjsunit/external-array.js (right):

http://codereview.chromium.org/9402008/diff/1/test/mjsunit/external-array.js#...
test/mjsunit/external-array.js:324: for (var i = 0; i < 8; i++) {
On 2012/02/15 13:39:29, Michael Starzinger wrote:
> Is there a particular reason the assignment has to be done in a loop?

Done.

http://codereview.chromium.org/9402008/diff/1/test/mjsunit/external-array.js#...
test/mjsunit/external-array.js:339: store_float32_undefined(float32_array);
On 2012/02/15 13:39:29, Michael Starzinger wrote:
> Is there a particular reason the store function is called twice here?

Done.

http://codereview.chromium.org/9402008/diff/1/test/mjsunit/external-array.js#...
test/mjsunit/external-array.js:343: for (var i = 0; i < 8; i++) {
On 2012/02/15 13:39:29, Michael Starzinger wrote:
> Likewise.

Done.

http://codereview.chromium.org/9402008/diff/1/test/mjsunit/external-array.js#...
test/mjsunit/external-array.js:358: store_float64_undefined(float64_array);
On 2012/02/15 13:39:29, Michael Starzinger wrote:
> Likewise.

Done.

Powered by Google App Engine
This is Rietveld 408576698