https://codereview.chromium.org/11415070/diff/3003/src/spaces.h File src/spaces.h (right):
https://codereview.chromium.org/11415070/diff/3003/src/spaces.h#newcode506 src/spaces.h:506: bool IsAheadOfProgressBar(Object** slot) { Apparently we have a different understanding of the semantics of "ahead of" because for me it means exactly the opposite of what this functions is checking. So this proves two things: a) We need a better name. How about IsLeftOfProgressBar? b) We need a short comment explaining this method. https://codereview.chromium.org/11415070/diff/3003/src/spaces.h#newcode508 src/spaces.h:508: if (reinterpret_cast<Address>(slot) - reinterpret_cast<Address>(this) < The pointer arithmetic is off. The progress bar actually specifies the offset into the object, not the offset into the memory chunk. So you need to take kObjectStartOffset into account. That would be an awfully hard to find bug. Also can we just return the result of the comparison instead of doing an if and the returning boolean constants? https://codereview.chromium.org/11415070/ -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
