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

Issue 115024: Changelist for a readability review. Not for direct commit. (Closed)

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

Description

Changelist for a readability review. Not for direct commit. I've combined main parts of issues 62146 and 108011 in order to obtain a C++ readability. I've merged readability changes: http://codereview.chromium.org/113763 and another one with nested namespaces formatting: http://codereview.chromium.org/115756

Patch Set 1 #

Patch Set 2 : fixed lint errors #

Total comments: 10

Patch Set 3 : Fixed style violations pointed out by Soeren #

Total comments: 10

Patch Set 4 : Fixed Brett's comments #

Total comments: 8

Patch Set 5 : Second round of changes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+809 lines, -101 lines) Patch
M src/codegen.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/compiler.cc View 2 chunks +2 lines, -2 lines 0 comments Download
A src/func-name-inferrer.h View 1 2 3 1 chunk +140 lines, -0 lines 0 comments Download
A src/func-name-inferrer.cc View 1 2 3 1 chunk +74 lines, -0 lines 0 comments Download
M src/log.h View 1 2 3 9 chunks +12 lines, -23 lines 0 comments Download
M src/log.cc View 1 2 3 4 44 chunks +252 lines, -75 lines 0 comments Download
A test/cctest/test-func-name-inference.cc View 1 2 3 4 1 chunk +226 lines, -0 lines 0 comments Download
A test/cctest/test-log.cc View 1 chunk +102 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
Mikhail Naganov
Hi Søren, Can you please take another look at this code (from already submitted changelists) ...
11 years, 7 months ago (2009-05-06 13:02:17 UTC) #1
Søren Thygesen Gjesse
A few comments with reference to the public Google C++ Style Guide (http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml). When submitting ...
11 years, 7 months ago (2009-05-06 16:10:35 UTC) #2
Mikhail Naganov
Thank you very much! http://codereview.chromium.org/115024/diff/1001/16 File src/func-name-inferrer.h (right): http://codereview.chromium.org/115024/diff/1001/16#newcode45 Line 45: FuncNameInferrer() : On 2009/05/06 ...
11 years, 7 months ago (2009-05-07 08:11:11 UTC) #3
brettw
Hi Søren, Here is my first pass of comments. Overall, thanks for writing good code! ...
11 years, 7 months ago (2009-05-18 20:12:45 UTC) #4
Mikhail Naganov
Hi Brett, I've made fixed according to your suggestions. (BTW, you accidentally confused me with ...
11 years, 7 months ago (2009-05-19 14:10:35 UTC) #5
brettw
I'm starting another pass on this. Note that you'll need to check in the changes ...
11 years, 7 months ago (2009-05-19 19:38:18 UTC) #6
brettw
Thanks, here is my next round of comments. I think the include paths are wrong, ...
11 years, 7 months ago (2009-05-19 20:22:41 UTC) #7
Mikhail Naganov
Thanks, Brett! Code is getting better and better. I understand that I'll need to upstream ...
11 years, 7 months ago (2009-05-20 13:29:29 UTC) #8
brettw
LGTM, thanks! When you check this in, please ping me and I'll mark the bug ...
11 years, 7 months ago (2009-05-20 16:56:16 UTC) #9
iposva
11 years, 7 months ago (2009-05-20 17:41:25 UTC) #10
http://codereview.chromium.org/115024/diff/1021/1028
File test/cctest/test-func-name-inference.cc (right):

http://codereview.chromium.org/115024/diff/1021/1028#newcode42
Line 42: namespace i = ::v8::internal;
On 2009/05/20 16:56:16, brettw wrote:
> On 2009/05/20 13:29:30, Mikhail Naganov wrote:
> > On 2009/05/19 20:22:41, brettw wrote:
> > > I didn't know you could even do this, and I looked at a couple other test
> > files
> > > and they just say "using". I think i is particularly confusing since it's
> > often
> > > used as a loop index (I realize they won't collide).
> > > 
> > > I realize you're trying to be nicer not bringing all of v8 into your
scope,
> > but
> > > I think using or saying v8::internal everywhere are more clear than this
> > > uncommon syntax.
> > 
> > I've got rid of this namespace alias, but want to mention that this idiom
> isn't
> > uncommon in V8: grep for "namespace = i" and you'll find a couple of
entries:
> > 
> > src/d8.h:38:namespace i = v8::internal;
> > src/mksnapshot.cc:42:namespace i = v8::internal;
> > src/v8.h:95:namespace i = v8::internal;
> > test/cctest/test-api.cc:59:namespace i = ::v8::internal;
> > 
> > Also namespace aliases are allowed by the style guide too:
> >
>
http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml?showone=Namesp...
> > (see the very end of the section).
> 
> I learn something every time! If you do this, I think "i" is a bad namespace
> alias, though, given the common use of i for other things.

Coming to Mikhail's defense here. One of the style guide's principles is to stay
consistent with existing code. The namespace i:: use is rather common in the
rest of the V8 code where we need to refer to the v8::internal namespace,
although I like Mikhail's current solution better because it specifically names
the internal classes his test code is using.

-Ivan

Powered by Google App Engine
This is Rietveld 408576698