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

Issue 6963008: A few "extract method" refactorings, trying to get individual method definitions (Closed)

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

Description

A few "extract method" refactorings, trying to get individual method definitions onto a sinlge 30" screen. A lot of times, the AST visitor stops a bit too early, so we have to do the rest of the dispatch by hand. This is caused by the fact that the kind of the AST nodes are a bit too coarse for some traversals (e.g. a single node type for all binary ops), perhaps one could try to refine this a little bit more. Committed: http://code.google.com/p/v8/source/detail?r=7839

Patch Set 1 #

Total comments: 12

Patch Set 2 : '' #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+262 lines, -223 lines) Patch
M src/hydrogen.h View 1 2 chunks +16 lines, -0 lines 0 comments Download
M src/hydrogen.cc View 1 4 chunks +246 lines, -223 lines 1 comment Download

Messages

Total messages: 7 (0 generated)
Sven Panne
9 years, 7 months ago (2011-05-09 09:25:25 UTC) #1
fschneider
LGTM. http://codereview.chromium.org/6963008/diff/1/src/hydrogen.cc File src/hydrogen.cc (right): http://codereview.chromium.org/6963008/diff/1/src/hydrogen.cc#newcode4572 src/hydrogen.cc:4572: case Token::DELETE: return VisitUnaryOperationDelete(expr); Indent all case-clauses by ...
9 years, 7 months ago (2011-05-09 15:05:35 UTC) #2
Kevin Millikin (Chromium)
I'm not sure I like this change. These functions only work when called in 'tail ...
9 years, 7 months ago (2011-05-09 15:14:05 UTC) #3
Sven Panne
On 2011/05/09 15:14:05, Kevin Millikin wrote: > [...] These functions only work when called in ...
9 years, 7 months ago (2011-05-10 07:48:29 UTC) #4
Sven Panne
http://codereview.chromium.org/6963008/diff/1/src/hydrogen.cc File src/hydrogen.cc (right): http://codereview.chromium.org/6963008/diff/1/src/hydrogen.cc#newcode4572 src/hydrogen.cc:4572: case Token::DELETE: return VisitUnaryOperationDelete(expr); On 2011/05/09 15:05:35, fschneider wrote: ...
9 years, 7 months ago (2011-05-10 07:48:47 UTC) #5
Sven Panne
Feedback integrated, take another look, please...
9 years, 7 months ago (2011-05-10 08:33:18 UTC) #6
fschneider
9 years, 7 months ago (2011-05-10 13:34:20 UTC) #7
http://codereview.chromium.org/6963008/diff/7001/src/hydrogen.cc
File src/hydrogen.cc (right):

http://codereview.chromium.org/6963008/diff/7001/src/hydrogen.cc#newcode4864
src/hydrogen.cc:4864: HInstruction* instr = BuildBinaryOperation(expr->op(),
left, right, info);
I agree with Kevin to a degree.

Having two function BuildBinaryOperation is a little confusing. Also the
overhead of doing 3 calls for this common case seems too much.
(VisitBinaryOperation->VisitCommon->BuildBinaryOperation->BuildBinaryOperation)
We should not slow down the common case.

Helper for logical && and || seems fine. Helper for COMMA is only one line, so
not really needed.

Powered by Google App Engine
This is Rietveld 408576698