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

Issue 551080: Refactor GenericBinaryOperation and its helper functions to always return a R... (Closed)

Created:
10 years, 11 months ago by fschneider
Modified:
9 years, 6 months ago
CC:
v8-dev
Visibility:
Public.

Description

Refactor GenericBinaryOperation and its helper functions to always return a Result. This is a preparation step for including number type information in the virtual frame. We need a common place where we can update the number type information of the result of a binary operation since we should not modify the state of the virtual frame elements directly. Committed: http://code.google.com/p/v8/source/detail?r=3661

Patch Set 1 #

Total comments: 14

Patch Set 2 : '' #

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+156 lines, -207 lines) Patch
M src/ia32/codegen-ia32.h View 1 2 1 chunk +10 lines, -10 lines 0 comments Download
M src/ia32/codegen-ia32.cc View 1 2 22 chunks +67 lines, -94 lines 0 comments Download
M src/x64/codegen-x64.h View 1 2 1 chunk +10 lines, -10 lines 0 comments Download
M src/x64/codegen-x64.cc View 1 2 20 chunks +69 lines, -93 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
fschneider
10 years, 11 months ago (2010-01-20 12:19:42 UTC) #1
Kevin Millikin (Chromium)
LGTM, but I have some style suggestions. http://codereview.chromium.org/551080/diff/1/2 File src/ia32/codegen-ia32.cc (right): http://codereview.chromium.org/551080/diff/1/2#newcode917 src/ia32/codegen-ia32.cc:917: GenericBinaryFlags flags; ...
10 years, 11 months ago (2010-01-20 15:38:45 UTC) #2
fschneider
10 years, 11 months ago (2010-01-20 16:04:08 UTC) #3
Also changed the x64 version accordingly.

http://codereview.chromium.org/551080/diff/1/2
File src/ia32/codegen-ia32.cc (right):

http://codereview.chromium.org/551080/diff/1/2#newcode917
src/ia32/codegen-ia32.cc:917: GenericBinaryFlags flags;
On 2010/01/20 15:38:45, Kevin Millikin wrote:
> It looks like the flags aren't needed until later, and aren't always needed. 
> You could consider moving this switch later in the function so the use isn't
so
> far from the definition.
> 
> We also have a function Token::IsBitOp that helps here:
> 
> if (loop_nesting() > 0 &&
>     (Token::IsBitOp(op) || type->IsLikelySmi())) {
>   flags = NO_SMI_CODE_IN_STUB;
> }
> 

Done.

http://codereview.chromium.org/551080/diff/1/2#newcode991
src/ia32/codegen-ia32.cc:991: type, false, overwrite_mode);
On 2010/01/20 15:38:45, Kevin Millikin wrote:
> Indentation is now off here.

Done.

http://codereview.chromium.org/551080/diff/1/2#newcode993
src/ia32/codegen-ia32.cc:993: answer = ConstantSmiBinaryOperation(op, &right,
left.handle(),
On 2010/01/20 15:38:45, Kevin Millikin wrote:
> And here.

Done.

http://codereview.chromium.org/551080/diff/1/2#newcode1664
src/ia32/codegen-ia32.cc:1664: return LikelySmiBinaryOperation(op,
&constant_operand, operand,
On 2010/01/20 15:38:45, Kevin Millikin wrote:
> You could do 'answer =' instead of 'return' here for symmetry with the other
> cases.

Done.

http://codereview.chromium.org/551080/diff/1/2#newcode1692
src/ia32/codegen-ia32.cc:1692: return LikelySmiBinaryOperation(op,
&constant_operand, operand,
On 2010/01/20 15:38:45, Kevin Millikin wrote:
> Same comment.

Done.

http://codereview.chromium.org/551080/diff/1/2#newcode1874
src/ia32/codegen-ia32.cc:1874: return LikelySmiBinaryOperation(op,
&constant_operand, operand,
On 2010/01/20 15:38:45, Kevin Millikin wrote:
> Maybe have 'answer =' here instead of 'return'.

Done.

http://codereview.chromium.org/551080/diff/1/2#newcode1877
src/ia32/codegen-ia32.cc:1877: return LikelySmiBinaryOperation(op, operand,
&constant_operand,
On 2010/01/20 15:38:45, Kevin Millikin wrote:
> And here.

Done.

Powered by Google App Engine
This is Rietveld 408576698