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

Issue 7014033: Support conversion of clamped double values for pixel arrays in Crankshaft. (Closed)

Created:
9 years, 7 months ago by danno
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Support conversion of clamped double values for pixel arrays in Crankshaft. BUG=1313 TEST=test/mjsunit/external-array.js Committed: http://code.google.com/p/v8/source/detail?r=7901

Patch Set 1 #

Patch Set 2 : tweaks #

Total comments: 25

Patch Set 3 : review feedback #

Total comments: 14

Patch Set 4 : review feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+587 lines, -58 lines) Patch
M src/arm/lithium-arm.h View 1 2 chunks +41 lines, -0 lines 0 comments Download
M src/arm/lithium-arm.cc View 1 2 3 1 chunk +18 lines, -0 lines 0 comments Download
M src/arm/lithium-codegen-arm.cc View 1 2 3 2 chunks +53 lines, -3 lines 0 comments Download
M src/arm/macro-assembler-arm.h View 1 1 chunk +7 lines, -0 lines 0 comments Download
M src/arm/macro-assembler-arm.cc View 1 2 1 chunk +38 lines, -0 lines 0 comments Download
M src/assembler.h View 2 chunks +4 lines, -0 lines 0 comments Download
M src/assembler.cc View 2 chunks +14 lines, -0 lines 0 comments Download
M src/hydrogen.cc View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M src/hydrogen-instructions.h View 1 2 3 3 chunks +41 lines, -1 line 0 comments Download
M src/hydrogen-instructions.cc View 2 chunks +2 lines, -1 line 0 comments Download
M src/ia32/lithium-codegen-ia32.cc View 1 2 chunks +49 lines, -18 lines 0 comments Download
M src/ia32/lithium-ia32.h View 1 2 chunks +40 lines, -0 lines 0 comments Download
M src/ia32/lithium-ia32.cc View 1 2 3 2 chunks +21 lines, -8 lines 0 comments Download
M src/ia32/macro-assembler-ia32.h View 1 1 chunk +7 lines, -0 lines 0 comments Download
M src/ia32/macro-assembler-ia32.cc View 1 2 1 chunk +30 lines, -0 lines 0 comments Download
M src/x64/lithium-codegen-x64.cc View 1 2 3 2 chunks +51 lines, -10 lines 0 comments Download
M src/x64/lithium-x64.h View 1 2 chunks +44 lines, -0 lines 0 comments Download
M src/x64/lithium-x64.cc View 1 2 3 1 chunk +21 lines, -0 lines 0 comments Download
M src/x64/macro-assembler-x64.h View 1 1 chunk +7 lines, -0 lines 0 comments Download
M src/x64/macro-assembler-x64.cc View 1 2 1 chunk +31 lines, -0 lines 0 comments Download
M test/mjsunit/external-array.js View 1 2 3 chunks +63 lines, -17 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
danno
Please review, thanks!
9 years, 7 months ago (2011-05-13 08:04:52 UTC) #1
Lasse Reichstein
Drive-by x64 comments. http://codereview.chromium.org/7014033/diff/4001/src/x64/macro-assembler-x64.cc File src/x64/macro-assembler-x64.cc (right): http://codereview.chromium.org/7014033/diff/4001/src/x64/macro-assembler-x64.cc#newcode2593 src/x64/macro-assembler-x64.cc:2593: Set(result_reg, 0); How about setting result ...
9 years, 7 months ago (2011-05-13 13:17:23 UTC) #2
Lasse Reichstein
http://codereview.chromium.org/7014033/diff/4001/src/x64/macro-assembler-x64.cc File src/x64/macro-assembler-x64.cc (right): http://codereview.chromium.org/7014033/diff/4001/src/x64/macro-assembler-x64.cc#newcode2592 src/x64/macro-assembler-x64.cc:2592: j(above, &above_zero, Label::kNear); I believe NaN should also be ...
9 years, 7 months ago (2011-05-14 09:34:38 UTC) #3
danno
Updated with feedback addressed. http://codereview.chromium.org/7014033/diff/4001/src/x64/macro-assembler-x64.cc File src/x64/macro-assembler-x64.cc (right): http://codereview.chromium.org/7014033/diff/4001/src/x64/macro-assembler-x64.cc#newcode2592 src/x64/macro-assembler-x64.cc:2592: j(above, &above_zero, Label::kNear); NaN does ...
9 years, 7 months ago (2011-05-15 05:50:27 UTC) #4
Lasse Reichstein
http://codereview.chromium.org/7014033/diff/4001/src/x64/macro-assembler-x64.cc File src/x64/macro-assembler-x64.cc (right): http://codereview.chromium.org/7014033/diff/4001/src/x64/macro-assembler-x64.cc#newcode2592 src/x64/macro-assembler-x64.cc:2592: j(above, &above_zero, Label::kNear); Ack, yes. I didn't consider that ...
9 years, 7 months ago (2011-05-15 10:18:50 UTC) #5
Kevin Millikin (Chromium)
I have some naming suggestions, and beefed up comments/asserts. Suggestions in the ARM files apply ...
9 years, 7 months ago (2011-05-16 07:06:34 UTC) #6
danno
9 years, 7 months ago (2011-05-16 14:13:43 UTC) #7
Review feedback addressed, final version committed.

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

http://codereview.chromium.org/7014033/diff/4001/test/mjsunit/external-array....
test/mjsunit/external-array.js:155: 
I'll write and submit the test in a separate CL.
 On 2011/05/13 13:17:24, Lasse Reichstein wrote:
> Test 0.49999999999999994, please :).
> 
> And both 1.5 and 2.5.

http://codereview.chromium.org/7014033/diff/1025/src/arm/lithium-arm.cc
File src/arm/lithium-arm.cc (right):

http://codereview.chromium.org/7014033/diff/1025/src/arm/lithium-arm.cc#newco...
src/arm/lithium-arm.cc:1756: Representation rep = value->representation();
On 2011/05/16 07:06:35, Kevin Millikin wrote:
> Can we rename this to input_rep and assert that instr->representation is
int32?

Done.

http://codereview.chromium.org/7014033/diff/1025/src/arm/lithium-arm.cc#newco...
src/arm/lithium-arm.cc:1759: return DefineAsRegister(new
LClampDoubleToUint8(reg, FixedTemp(d1)));
On 2011/05/16 07:06:35, Kevin Millikin wrote:
> Probably needs a comment that the fixed register is because register allocator
> does not (yet) support allocation of double temporaries.  I'd be puzzled if I
> read this code again in a month.

Done.

http://codereview.chromium.org/7014033/diff/1025/src/arm/lithium-codegen-arm.cc
File src/arm/lithium-codegen-arm.cc (right):

http://codereview.chromium.org/7014033/diff/1025/src/arm/lithium-codegen-arm....
src/arm/lithium-codegen-arm.cc:3356: __ Usat(value, 8, Operand(value));
On 2011/05/16 07:06:35, Kevin Millikin wrote:
> Should this be removed?

Done.

http://codereview.chromium.org/7014033/diff/1025/src/arm/lithium-codegen-arm....
src/arm/lithium-codegen-arm.cc:4052: __ b(al, &done);
On 2011/05/16 07:06:35, Kevin Millikin wrote:
> There is __ jmp(&done) for ARM, which just emits __b(al, &done).  I find it
> clearer when reading ARM code but I'm not sure if everyone agrees with that.

Done.

http://codereview.chromium.org/7014033/diff/1025/src/arm/lithium-codegen-arm....
src/arm/lithium-codegen-arm.cc:4057: __ vldr(double_scratch0(), scratch0(),
HeapNumber::kValueOffset);
On 2011/05/16 07:06:35, Kevin Millikin wrote:
> Someone has kindly implemented vldr to take a MemOperand!  So you should be
able
> to get rid of the sub and the scratch0 register use and write:
> 
> __ vldr(double_scratch0(), FieldMemOperand(input_reg,
> HeapNumber::kValueOffset));
> 
> I guess this code was copied from somewhere, so you could change it there too.

Done.

http://codereview.chromium.org/7014033/diff/1025/src/hydrogen-instructions.h
File src/hydrogen-instructions.h (right):

http://codereview.chromium.org/7014033/diff/1025/src/hydrogen-instructions.h#...
src/hydrogen-instructions.h:1061: SetFlag(kFlexibleRepresentation);
On 2011/05/16 07:06:35, Kevin Millikin wrote:
> Everywhere else we have kFlexibleRepresentation, we also have
> set_representation(Representation::Tagged()) to establish a default
> representation.  I don't know that the representation inference algorithm
> depends on it, but maybe it should be here for safety should somebody later
> assume it.

Done.

http://codereview.chromium.org/7014033/diff/1025/src/x64/lithium-codegen-x64.cc
File src/x64/lithium-codegen-x64.cc (right):

http://codereview.chromium.org/7014033/diff/1025/src/x64/lithium-codegen-x64....
src/x64/lithium-codegen-x64.cc:3188: {  // Clamp the value to [0..255].
On 2011/05/16 07:06:35, Kevin Millikin wrote:
> Can we remove this clamping?

Done.

Powered by Google App Engine
This is Rietveld 408576698