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

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

Issue 933533003: Version 4.2.70.1 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@4.2.70
Patch Set: Created 5 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
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/objects-visiting.h » ('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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/base/atomicops.h" 7 #include "src/base/atomicops.h"
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/compilation-cache.h" 10 #include "src/compilation-cache.h"
(...skipping 1847 matching lines...) Expand 10 before | Expand all | Expand 10 after
1858 Heap::UpdateAllocationSiteFeedback(object, Heap::RECORD_SCRATCHPAD_SLOT); 1858 Heap::UpdateAllocationSiteFeedback(object, Heap::RECORD_SCRATCHPAD_SLOT);
1859 1859
1860 offset++; 1860 offset++;
1861 current_cell >>= 1; 1861 current_cell >>= 1;
1862 1862
1863 // TODO(hpayer): Refactor EvacuateObject and call this function instead. 1863 // TODO(hpayer): Refactor EvacuateObject and call this function instead.
1864 if (heap()->ShouldBePromoted(object->address(), size) && 1864 if (heap()->ShouldBePromoted(object->address(), size) &&
1865 TryPromoteObject(object, size)) { 1865 TryPromoteObject(object, size)) {
1866 continue; 1866 continue;
1867 } 1867 }
1868 heap()->set_promotion_failure(true);
1869 1868
1870 AllocationResult allocation = new_space->AllocateRaw(size); 1869 AllocationResult allocation = new_space->AllocateRaw(size);
1871 if (allocation.IsRetry()) { 1870 if (allocation.IsRetry()) {
1872 if (!new_space->AddFreshPage()) { 1871 if (!new_space->AddFreshPage()) {
1873 // Shouldn't happen. We are sweeping linearly, and to-space 1872 // Shouldn't happen. We are sweeping linearly, and to-space
1874 // has the same number of pages as from-space, so there is 1873 // has the same number of pages as from-space, so there is
1875 // always room. 1874 // always room.
1876 UNREACHABLE(); 1875 UNREACHABLE();
1877 } 1876 }
1878 allocation = new_space->AllocateRaw(size); 1877 allocation = new_space->AllocateRaw(size);
(...skipping 2449 matching lines...) Expand 10 before | Expand all | Expand 10 after
4328 SlotsBuffer* buffer = *buffer_address; 4327 SlotsBuffer* buffer = *buffer_address;
4329 while (buffer != NULL) { 4328 while (buffer != NULL) {
4330 SlotsBuffer* next_buffer = buffer->next(); 4329 SlotsBuffer* next_buffer = buffer->next();
4331 DeallocateBuffer(buffer); 4330 DeallocateBuffer(buffer);
4332 buffer = next_buffer; 4331 buffer = next_buffer;
4333 } 4332 }
4334 *buffer_address = NULL; 4333 *buffer_address = NULL;
4335 } 4334 }
4336 } 4335 }
4337 } // namespace v8::internal 4336 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/objects-visiting.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698