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

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

Issue 777643002: Check whether the marking deque overflowed in ProcessEphemeralMarking (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 6 years 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 | « no previous file | no next file » | 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 2223 matching lines...) Expand 10 before | Expand all | Expand 10 after
2234 // are marked. Objects pointed to only by weak global handles cannot be 2234 // are marked. Objects pointed to only by weak global handles cannot be
2235 // immediately reclaimed. Instead, we have to mark them as pending and mark 2235 // immediately reclaimed. Instead, we have to mark them as pending and mark
2236 // objects reachable from them. 2236 // objects reachable from them.
2237 // 2237 //
2238 // First we identify nonlive weak handles and mark them as pending 2238 // First we identify nonlive weak handles and mark them as pending
2239 // destruction. 2239 // destruction.
2240 heap()->isolate()->global_handles()->IdentifyWeakHandles( 2240 heap()->isolate()->global_handles()->IdentifyWeakHandles(
2241 &IsUnmarkedHeapObject); 2241 &IsUnmarkedHeapObject);
2242 // Then we mark the objects. 2242 // Then we mark the objects.
2243 heap()->isolate()->global_handles()->IterateWeakRoots(&root_visitor); 2243 heap()->isolate()->global_handles()->IterateWeakRoots(&root_visitor);
2244 ProcessMarkingDeque();
2244 2245
2245 // Repeat Harmony weak maps marking to mark unmarked objects reachable from 2246 // Repeat Harmony weak maps marking to mark unmarked objects reachable from
2246 // the weak roots we just marked as pending destruction. 2247 // the weak roots we just marked as pending destruction.
2247 // 2248 //
2248 // We only process harmony collections, as all object groups have been fully 2249 // We only process harmony collections, as all object groups have been fully
2249 // processed and no weakly reachable node can discover new objects groups. 2250 // processed and no weakly reachable node can discover new objects groups.
2250 ProcessEphemeralMarking(&root_visitor, true); 2251 ProcessEphemeralMarking(&root_visitor, true);
2251 } 2252 }
2252 2253
2253 AfterMarking(); 2254 AfterMarking();
(...skipping 2185 matching lines...) Expand 10 before | Expand all | Expand 10 after
4439 SlotsBuffer* buffer = *buffer_address; 4440 SlotsBuffer* buffer = *buffer_address;
4440 while (buffer != NULL) { 4441 while (buffer != NULL) {
4441 SlotsBuffer* next_buffer = buffer->next(); 4442 SlotsBuffer* next_buffer = buffer->next();
4442 DeallocateBuffer(buffer); 4443 DeallocateBuffer(buffer);
4443 buffer = next_buffer; 4444 buffer = next_buffer;
4444 } 4445 }
4445 *buffer_address = NULL; 4446 *buffer_address = NULL;
4446 } 4447 }
4447 } 4448 }
4448 } // namespace v8::internal 4449 } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698