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

Side by Side Diff: src/mark-compact.cc

Issue 139133004: Merged r19024, r19026 into trunk branch. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/hydrogen.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2989 matching lines...) Expand 10 before | Expand all | Expand 10 after
3000 3000
3001 // Store allocation range before flipping semispaces. 3001 // Store allocation range before flipping semispaces.
3002 Address from_bottom = new_space->bottom(); 3002 Address from_bottom = new_space->bottom();
3003 Address from_top = new_space->top(); 3003 Address from_top = new_space->top();
3004 3004
3005 // Flip the semispaces. After flipping, to space is empty, from space has 3005 // Flip the semispaces. After flipping, to space is empty, from space has
3006 // live objects. 3006 // live objects.
3007 new_space->Flip(); 3007 new_space->Flip();
3008 new_space->ResetAllocationInfo(); 3008 new_space->ResetAllocationInfo();
3009 3009
3010 // UpdateAllocationSiteFeedback expects that only objects at the end of
3011 // newspace are not guaranteed to have the next word clear. It relies on
3012 // FromSpacePageHigh to check whether an object is at the end of newspace.
3013 // However, it is possible that newspace is being evacuated without it being
3014 // full, e.g. to make the heap iterable, hence top will not equal high. In
3015 // that case, fill up newspace with a filler to ensure the next word is
3016 // cleared.
3017 if (FLAG_allocation_site_pretenuring &&
3018 from_top < new_space->FromSpacePageHigh()) {
3019 Address limit = NewSpacePage::FromLimit(from_top)->area_end();
3020 int remaining_in_page = static_cast<int>(limit - from_top);
3021 heap()->CreateFillerObjectAt(from_top, remaining_in_page);
3022 }
3023
3024 int survivors_size = 0; 3010 int survivors_size = 0;
3025 3011
3026 // First pass: traverse all objects in inactive semispace, remove marks, 3012 // First pass: traverse all objects in inactive semispace, remove marks,
3027 // migrate live objects and write forwarding addresses. This stage puts 3013 // migrate live objects and write forwarding addresses. This stage puts
3028 // new entries in the store buffer and may cause some pages to be marked 3014 // new entries in the store buffer and may cause some pages to be marked
3029 // scan-on-scavenge. 3015 // scan-on-scavenge.
3030 NewSpacePageIterator it(from_bottom, from_top); 3016 NewSpacePageIterator it(from_bottom, from_top);
3031 while (it.has_next()) { 3017 while (it.has_next()) {
3032 NewSpacePage* p = it.next(); 3018 NewSpacePage* p = it.next();
3033 survivors_size += DiscoverAndPromoteBlackObjectsOnPage(new_space, p); 3019 survivors_size += DiscoverAndPromoteBlackObjectsOnPage(new_space, p);
(...skipping 1376 matching lines...) Expand 10 before | Expand all | Expand 10 after
4410 while (buffer != NULL) { 4396 while (buffer != NULL) {
4411 SlotsBuffer* next_buffer = buffer->next(); 4397 SlotsBuffer* next_buffer = buffer->next();
4412 DeallocateBuffer(buffer); 4398 DeallocateBuffer(buffer);
4413 buffer = next_buffer; 4399 buffer = next_buffer;
4414 } 4400 }
4415 *buffer_address = NULL; 4401 *buffer_address = NULL;
4416 } 4402 }
4417 4403
4418 4404
4419 } } // namespace v8::internal 4405 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698