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

Issue 496009: Added pre- and postfix count operations to top-level compiler.... (Closed)

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

Description

Added general pre- and postfix count operations to top-level compiler. Until now we only supported postfix operations on global variables. This change add generic count operations to the top-level compiler. I tried to re-use code from the code generator used for assignment expressions where possible. Committed: http://code.google.com/p/v8/source/detail?r=3530

Patch Set 1 #

Total comments: 18

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Total comments: 21

Patch Set 6 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+639 lines, -223 lines) Patch
M src/arm/fast-codegen-arm.cc View 4 5 12 chunks +154 lines, -62 lines 0 comments Download
M src/compiler.cc View 1 2 3 4 5 4 chunks +29 lines, -14 lines 0 comments Download
M src/fast-codegen.h View 1 2 3 4 3 chunks +5 lines, -4 lines 0 comments Download
M src/fast-codegen.cc View 1 2 3 4 2 chunks +3 lines, -2 lines 0 comments Download
M src/ia32/fast-codegen-ia32.cc View 1 2 3 4 5 9 chunks +157 lines, -59 lines 0 comments Download
M src/x64/fast-codegen-x64.cc View 4 5 9 chunks +180 lines, -82 lines 0 comments Download
A test/mjsunit/compiler/countoperation.js View 1 chunk +111 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
fschneider
Here's the IA32 part for pre-/postfix operations for review. The code definitely has potential for ...
11 years ago (2009-12-14 15:05:53 UTC) #1
Kevin Millikin (Chromium)
Seems about as simple as it can be. It will also be nicer to allow ...
11 years ago (2009-12-14 17:06:24 UTC) #2
fschneider
Addresses comments. + Factored out common code sequence "Move TOS -> expression context" http://codereview.chromium.org/496009/diff/1/5 File ...
11 years ago (2009-12-15 12:04:24 UTC) #3
fschneider
Uploaded new version. Please take a look at the x64 and ARM code. Changes: + ...
10 years, 12 months ago (2009-12-29 14:09:25 UTC) #4
Kevin Millikin (Chromium)
LGTM. I can't quite figure out the logic behind where SetSourcePosition is being called. As ...
10 years, 11 months ago (2010-01-04 12:48:37 UTC) #5
fschneider
10 years, 11 months ago (2010-01-04 13:55:34 UTC) #6
For now I'm leaving the calls to SetSourcePosition as is, but but yes, we should
do it in a consistent way in the future. I'll look at this in a separate change.

http://codereview.chromium.org/496009/diff/14001/14008
File src/arm/fast-codegen-arm.cc (right):

http://codereview.chromium.org/496009/diff/14001/14008#newcode1012
src/arm/fast-codegen-arm.cc:1012: Move(context, r3);
On 2010/01/04 12:48:38, Kevin Millikin wrote:
> Indentation looks off here.

Done.

http://codereview.chromium.org/496009/diff/14001/14008#newcode1461
src/arm/fast-codegen-arm.cc:1461: } else  {
On 2010/01/04 12:48:38, Kevin Millikin wrote:
> Too many spaces after else?

Done.

http://codereview.chromium.org/496009/diff/14001/14008#newcode1517
src/arm/fast-codegen-arm.cc:1517: __ CallRuntime(Runtime::kNumberAdd, 2);
On 2010/01/04 12:48:38, Kevin Millikin wrote:
> For the INC case, we can use stm to push the two arguments to the runtime
call. 
> Didn't we decide that was better?

In this case I didn't use it since the previous call to TO_NUMBER returns the
result already in r0. We'd have to move the first argument into a higher-number
register to use stm (or change the order of the arguments for the runtime call
NumberAdd.)

http://codereview.chromium.org/496009/diff/14001/14008#newcode1551
src/arm/fast-codegen-arm.cc:1551: } break;
On 2010/01/04 12:48:38, Kevin Millikin wrote:
> We usually put break inside the braces.

Done.

http://codereview.chromium.org/496009/diff/14001/14008#newcode1563
src/arm/fast-codegen-arm.cc:1563: } break;
On 2010/01/04 12:48:38, Kevin Millikin wrote:
> And here.

Done.

http://codereview.chromium.org/496009/diff/14001/14005
File src/compiler.cc (right):

http://codereview.chromium.org/496009/diff/14001/14005#newcode653
src/compiler.cc:653: // expression context state.
On 2010/01/04 12:48:38, Kevin Millikin wrote:
> Comment can go away.

Done.

http://codereview.chromium.org/496009/diff/14001/14004
File src/ia32/fast-codegen-ia32.cc (right):

http://codereview.chromium.org/496009/diff/14001/14004#newcode1527
src/ia32/fast-codegen-ia32.cc:1527: } break;
On 2010/01/04 12:48:38, Kevin Millikin wrote:
> Break inside braces.

Done.

http://codereview.chromium.org/496009/diff/14001/14004#newcode1542
src/ia32/fast-codegen-ia32.cc:1542: } break;
On 2010/01/04 12:48:38, Kevin Millikin wrote:
> And here.

Done.

Powered by Google App Engine
This is Rietveld 408576698