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

Unified Diff: src/mark-compact.cc

Issue 1700005: Fix bugs introduced by r4475:... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/spaces.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mark-compact.cc
===================================================================
--- src/mark-compact.cc (revision 4475)
+++ src/mark-compact.cc (working copy)
@@ -1056,21 +1056,15 @@
while (it.has_next()) {
Page* p = it.next();
- if (p->WasInUseBeforeMC()) {
- // The offset of each live object in the page from the first live object
- // in the page.
- int offset = 0;
- EncodeForwardingAddressesInRange<Alloc,
- EncodeForwardingAddressInPagedSpace,
- ProcessNonLive>(
- p->ObjectAreaStart(),
- p->AllocationTop(),
- &offset);
- } else {
- // Mark whole unused page as a free region.
- EncodeFreeRegion(p->ObjectAreaStart(),
- p->AllocationTop() - p->ObjectAreaStart());
- }
+ // The offset of each live object in the page from the first live object
+ // in the page.
+ int offset = 0;
+ EncodeForwardingAddressesInRange<Alloc,
+ EncodeForwardingAddressInPagedSpace,
+ ProcessNonLive>(
+ p->ObjectAreaStart(),
+ p->AllocationTop(),
+ &offset);
}
}
@@ -1397,17 +1391,17 @@
}
if (new_allocation_top != NULL) {
+#ifdef DEBUG
Page* new_allocation_top_page = Page::FromAllocationTop(new_allocation_top);
-
ASSERT(((first_empty_page == NULL) &&
Mads Ager (chromium) 2010/04/23 06:48:37 Now that you have an #ifdef DEBUG here in any case
(new_allocation_top_page == space->AllocationTopPage())) ||
((first_empty_page != NULL) && (last_free_size > 0) &&
(new_allocation_top_page == prec_first_empty_page)) ||
((first_empty_page != NULL) && (last_free_size == 0) &&
(new_allocation_top_page == first_empty_page)));
+#endif
- space->SetTop(new_allocation_top,
- new_allocation_top_page->ObjectAreaEnd());
+ space->SetTop(new_allocation_top);
}
}
« no previous file with comments | « no previous file | src/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698