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

Issue 552066: Fix map compact implementation.... (Closed)

Created:
10 years, 11 months ago by antonm
Modified:
9 years, 4 months ago
CC:
v8-dev
Visibility:
Public.

Description

Fix map compact implementation. Always invoke HeapObjectIterator::has_next() before invoking HeapObjectIterator::next(). This is necessary as ::has_next() has an important side-effect of going to the next page when current page is exhausted. And to find if pointers are encodable use more precise data---top of map space, not a number of pages, as pages might stay in map space due to chunking. Committed: http://code.google.com/p/v8/source/detail?r=3672

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+20 lines, -8 lines) Patch
M src/flag-definitions.h View 1 chunk +1 line, -1 line 0 comments Download
M src/mark-compact.cc View 2 chunks +3 lines, -0 lines 1 comment Download
M src/spaces.h View 3 chunks +16 lines, -4 lines 2 comments Download
M test/cctest/cctest.status View 1 chunk +0 lines, -3 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
antonm
Søren, I was surprised to find necessity to invoke has_next as otherwise iterator goes wild. ...
10 years, 11 months ago (2010-01-20 16:48:23 UTC) #1
antonm
(sending again as I made a type in the email.) Søren, I was surprised to ...
10 years, 11 months ago (2010-01-20 16:49:36 UTC) #2
Søren Thygesen Gjesse
LGTM I think you should raise a bug on the iterator next()/has_next() semantics to track ...
10 years, 11 months ago (2010-01-21 07:57:41 UTC) #3
antonm
10 years, 11 months ago (2010-01-21 14:25:58 UTC) #4
Thanks a lot for review, Søren.

http://code.google.com/p/v8/issues/detail?id=586 filed and referenced in changed
files.

yours,
anton.

On 2010/01/21 07:57:41, Søren Gjesse wrote:
> LGTM
> 
> I think you should raise a bug on the iterator next()/has_next() semantics to
> track this issue. Maybe add a reference from the bug to this change.
> 
> http://codereview.chromium.org/552066/diff/1/5
> File src/mark-compact.cc (right):
> 
> http://codereview.chromium.org/552066/diff/1/5#newcode1294
> src/mark-compact.cc:1294: it.has_next();
> Please add a comment here.
> 
> http://codereview.chromium.org/552066/diff/1/3
> File src/spaces.h (right):
> 
> http://codereview.chromium.org/552066/diff/1/3#newcode1803
> src/spaces.h:1803: it.has_next();
> Please add a comment here.
> 
> http://codereview.chromium.org/552066/diff/1/3#newcode1807
> src/spaces.h:1807: it.has_next();
> And here.

Powered by Google App Engine
This is Rietveld 408576698