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

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

Issue 753553002: Phantom references support internal fields (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Don't forget to visit pointers to live objects so they can be updated to new location 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
« src/global-handles.cc ('K') | « src/global-handles.cc ('k') | 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 2195 matching lines...) Expand 10 before | Expand all | Expand 10 after
2206 // The objects reachable from the roots, weak maps or object groups 2206 // The objects reachable from the roots, weak maps or object groups
2207 // are marked, yet unreachable objects are unmarked. Mark objects 2207 // are marked, yet unreachable objects are unmarked. Mark objects
2208 // reachable only from weak global handles. 2208 // reachable only from weak global handles.
2209 // 2209 //
2210 // First we identify nonlive weak handles and mark them as pending 2210 // First we identify nonlive weak handles and mark them as pending
2211 // destruction. 2211 // destruction.
2212 heap()->isolate()->global_handles()->IdentifyWeakHandles( 2212 heap()->isolate()->global_handles()->IdentifyWeakHandles(
2213 &IsUnmarkedHeapObject); 2213 &IsUnmarkedHeapObject);
2214 // Then we mark the objects and process the transitive closure. 2214 // Then we mark the objects and process the transitive closure.
2215 heap()->isolate()->global_handles()->IterateWeakRoots(&root_visitor); 2215 heap()->isolate()->global_handles()->IterateWeakRoots(&root_visitor);
2216 while (marking_deque_.overflowed()) { 2216
2217 RefillMarkingDeque(); 2217 ProcessMarkingDeque();
2218 EmptyMarkingDeque();
2219 }
2220 2218
2221 // Repeat host application specific and Harmony weak maps marking to 2219 // Repeat host application specific and Harmony weak maps marking to
2222 // mark unmarked objects reachable from the weak roots. 2220 // mark unmarked objects reachable from the weak roots.
2223 ProcessEphemeralMarking(&root_visitor); 2221 ProcessEphemeralMarking(&root_visitor);
2224 2222
2225 AfterMarking(); 2223 AfterMarking();
2226 2224
2227 if (FLAG_print_cumulative_gc_stat) { 2225 if (FLAG_print_cumulative_gc_stat) {
2228 heap_->tracer()->AddMarkingTime(base::OS::TimeCurrentMillis() - start_time); 2226 heap_->tracer()->AddMarkingTime(base::OS::TimeCurrentMillis() - start_time);
2229 } 2227 }
(...skipping 2180 matching lines...) Expand 10 before | Expand all | Expand 10 after
4410 SlotsBuffer* buffer = *buffer_address; 4408 SlotsBuffer* buffer = *buffer_address;
4411 while (buffer != NULL) { 4409 while (buffer != NULL) {
4412 SlotsBuffer* next_buffer = buffer->next(); 4410 SlotsBuffer* next_buffer = buffer->next();
4413 DeallocateBuffer(buffer); 4411 DeallocateBuffer(buffer);
4414 buffer = next_buffer; 4412 buffer = next_buffer;
4415 } 4413 }
4416 *buffer_address = NULL; 4414 *buffer_address = NULL;
4417 } 4415 }
4418 } 4416 }
4419 } // namespace v8::internal 4417 } // namespace v8::internal
OLDNEW
« src/global-handles.cc ('K') | « src/global-handles.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698