OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/gc_marker.h" | 5 #include "vm/gc_marker.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 } | 349 } |
350 } | 350 } |
351 | 351 |
352 | 352 |
353 void GCMarker::IterateRoots(Isolate* isolate, | 353 void GCMarker::IterateRoots(Isolate* isolate, |
354 ObjectPointerVisitor* visitor, | 354 ObjectPointerVisitor* visitor, |
355 bool visit_prologue_weak_persistent_handles) { | 355 bool visit_prologue_weak_persistent_handles) { |
356 isolate->VisitObjectPointers(visitor, | 356 isolate->VisitObjectPointers(visitor, |
357 visit_prologue_weak_persistent_handles, | 357 visit_prologue_weak_persistent_handles, |
358 StackFrameIterator::kDontValidateFrames); | 358 StackFrameIterator::kDontValidateFrames); |
359 heap_->IterateNewPointers(visitor); | 359 heap_->new_space()->VisitObjectPointers(visitor); |
360 } | 360 } |
361 | 361 |
362 | 362 |
363 void GCMarker::IterateWeakRoots(Isolate* isolate, | 363 void GCMarker::IterateWeakRoots(Isolate* isolate, |
364 HandleVisitor* visitor, | 364 HandleVisitor* visitor, |
365 bool visit_prologue_weak_persistent_handles) { | 365 bool visit_prologue_weak_persistent_handles) { |
366 ApiState* state = isolate->api_state(); | 366 ApiState* state = isolate->api_state(); |
367 ASSERT(state != NULL); | 367 ASSERT(state != NULL); |
368 isolate->VisitWeakPersistentHandles(visitor, | 368 isolate->VisitWeakPersistentHandles(visitor, |
369 visit_prologue_weak_persistent_handles); | 369 visit_prologue_weak_persistent_handles); |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 MarkingWeakVisitor mark_weak; | 534 MarkingWeakVisitor mark_weak; |
535 IterateWeakRoots(isolate, &mark_weak, invoke_api_callbacks); | 535 IterateWeakRoots(isolate, &mark_weak, invoke_api_callbacks); |
536 mark.Finalize(); | 536 mark.Finalize(); |
537 ProcessWeakTables(page_space); | 537 ProcessWeakTables(page_space); |
538 ProcessObjectIdTable(isolate); | 538 ProcessObjectIdTable(isolate); |
539 } | 539 } |
540 Epilogue(isolate, invoke_api_callbacks); | 540 Epilogue(isolate, invoke_api_callbacks); |
541 } | 541 } |
542 | 542 |
543 } // namespace dart | 543 } // namespace dart |
OLD | NEW |