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

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

Issue 904633003: Just visit young array buffers during scavenge. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
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 1846 matching lines...) Expand 10 before | Expand all | Expand 10 after
1857 Heap::UpdateAllocationSiteFeedback(object, Heap::RECORD_SCRATCHPAD_SLOT); 1857 Heap::UpdateAllocationSiteFeedback(object, Heap::RECORD_SCRATCHPAD_SLOT);
1858 1858
1859 offset++; 1859 offset++;
1860 current_cell >>= 1; 1860 current_cell >>= 1;
1861 1861
1862 // TODO(hpayer): Refactor EvacuateObject and call this function instead. 1862 // TODO(hpayer): Refactor EvacuateObject and call this function instead.
1863 if (heap()->ShouldBePromoted(object->address(), size) && 1863 if (heap()->ShouldBePromoted(object->address(), size) &&
1864 TryPromoteObject(object, size)) { 1864 TryPromoteObject(object, size)) {
1865 continue; 1865 continue;
1866 } 1866 }
1867 heap()->set_promotion_failure(true);
1867 1868
1868 AllocationResult allocation = new_space->AllocateRaw(size); 1869 AllocationResult allocation = new_space->AllocateRaw(size);
1869 if (allocation.IsRetry()) { 1870 if (allocation.IsRetry()) {
1870 if (!new_space->AddFreshPage()) { 1871 if (!new_space->AddFreshPage()) {
1871 // Shouldn't happen. We are sweeping linearly, and to-space 1872 // Shouldn't happen. We are sweeping linearly, and to-space
1872 // 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
1873 // always room. 1874 // always room.
1874 UNREACHABLE(); 1875 UNREACHABLE();
1875 } 1876 }
1876 allocation = new_space->AllocateRaw(size); 1877 allocation = new_space->AllocateRaw(size);
(...skipping 2545 matching lines...) Expand 10 before | Expand all | Expand 10 after
4422 SlotsBuffer* buffer = *buffer_address; 4423 SlotsBuffer* buffer = *buffer_address;
4423 while (buffer != NULL) { 4424 while (buffer != NULL) {
4424 SlotsBuffer* next_buffer = buffer->next(); 4425 SlotsBuffer* next_buffer = buffer->next();
4425 DeallocateBuffer(buffer); 4426 DeallocateBuffer(buffer);
4426 buffer = next_buffer; 4427 buffer = next_buffer;
4427 } 4428 }
4428 *buffer_address = NULL; 4429 *buffer_address = NULL;
4429 } 4430 }
4430 } 4431 }
4431 } // namespace v8::internal 4432 } // 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