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

Issue 6541044: Refactored PathTracer in heap.cc.... (Closed)

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

Description

Refactored PathTracer in heap.cc. This is so that it can be reused by LOL code later. Committed: http://code.google.com/p/v8/source/detail?r=6886

Patch Set 1 #

Total comments: 16

Patch Set 2 : '' #

Total comments: 13

Patch Set 3 : '' #

Total comments: 14

Patch Set 4 : '' #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+161 lines, -79 lines) Patch
M src/heap.h View 1 2 3 2 chunks +61 lines, -0 lines 1 comment Download
M src/heap.cc View 1 2 3 5 chunks +100 lines, -79 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
marklam
Mikhail, Here's a first step at refactoring the debug MarkRootObjectVisitor mechanism in heap.cc. I've now ...
9 years, 10 months ago (2011-02-20 00:41:14 UTC) #1
marklam
I've updated the CL with a bug fix for the kFindFirst mode of operation. This ...
9 years, 10 months ago (2011-02-20 08:23:06 UTC) #2
mnaganov (inactive)
http://codereview.chromium.org/6541044/diff/1003/src/heap.cc File src/heap.cc (right): http://codereview.chromium.org/6541044/diff/1003/src/heap.cc#newcode5187 src/heap.cc:5187: if (search_for_any_global_) { Using two version of the constructor ...
9 years, 10 months ago (2011-02-21 10:59:46 UTC) #3
marklam
I've addressed all your comments except for the one in heap.cc about using 2 constructors. ...
9 years, 10 months ago (2011-02-21 17:45:15 UTC) #4
mnaganov (inactive)
Looks almost good, some more comments. http://codereview.chromium.org/6541044/diff/4003/src/heap.h File src/heap.h (right): http://codereview.chromium.org/6541044/diff/4003/src/heap.h#newcode2161 src/heap.h:2161: class PathTracer: public ...
9 years, 10 months ago (2011-02-21 18:08:28 UTC) #5
marklam
3rd time's the charm ... hopefully. =) http://codereview.chromium.org/6541044/diff/4003/src/heap.h File src/heap.h (right): http://codereview.chromium.org/6541044/diff/4003/src/heap.h#newcode2161 src/heap.h:2161: class PathTracer: ...
9 years, 10 months ago (2011-02-22 03:11:14 UTC) #6
Søren Thygesen Gjesse
LGTM http://codereview.chromium.org/6541044/diff/1004/src/heap.h File src/heap.h (right): http://codereview.chromium.org/6541044/diff/1004/src/heap.h#newcode2163 src/heap.h:2163: enum WhatToFind { Going forward we should try ...
9 years, 10 months ago (2011-02-22 08:13:24 UTC) #7
Søren Thygesen Gjesse
Committed: http://code.google.com/p/v8/source/detail?r=6886. Thank you for the patch.
9 years, 10 months ago (2011-02-22 10:06:30 UTC) #8
mnaganov (inactive)
9 years, 10 months ago (2011-02-22 10:12:01 UTC) #9
http://codereview.chromium.org/6541044/diff/4003/src/heap.h
File src/heap.h (right):

http://codereview.chromium.org/6541044/diff/4003/src/heap.h#newcode2184
src/heap.h:2184: void VisitPointers(Object** start, Object** end) {
On 2011/02/22 03:11:15, marklam wrote:
> On 2011/02/21 18:08:28, Mikhail Naganov (Chromium) wrote:
> > Does this method need to be inline?
> 
> Done.  This is a virtual method override (and I think the compiler will make
> sure to only instantiate one instance of it).  The pattern of specifying this
> inline is used in lots of places from what I can tell.  I didn't know if that
> was the preferred expression.  Anyway, I've moved it to the cc file now.

I'm just against having too much code in .h file. It is preferred to leave only
getters and setters there. If some non-trivial code really needs to be inline,
we usually have -inl.h file for it.

http://codereview.chromium.org/6541044/diff/4003/src/heap.h#newcode2203
src/heap.h:2203: protected:
On 2011/02/22 03:11:15, marklam wrote:
> On 2011/02/21 18:08:28, Mikhail Naganov (Chromium) wrote:
> > I'd prefer to use 'private:' in all cases, except when you really design
your
> > class to be subclassed.
> 
> I do intend for this class to be subclassed.  That will come in the LOL code
> (which is what prompted this refactoring in the first place).  This is also
why
> ProcessResults() is virtual.
> 

OK, I just wanted to be sure. Sorry, I forgot the whole picture.

> Or do you mean that you want some members to be limited to being private
instead
> of protected?  Currently, I don't think the LOL implementation needs access to
> all of these members, but it seems extremely limiting to assume what the
> subclass needs and not need in the future.  Unless you object to it being
> somewhat general like this for forward looking purposes, I would prefer to
keep
> all these members protected instead of private.

That's OK.

Powered by Google App Engine
This is Rietveld 408576698