| 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 "vm/allocation.h" | 7 #include "vm/allocation.h" |
| 8 #include "vm/dart_api_state.h" | 8 #include "vm/dart_api_state.h" |
| 9 #include "vm/isolate.h" | 9 #include "vm/isolate.h" |
| 10 #include "vm/log.h" | 10 #include "vm/log.h" |
| (...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 527 if (raw_obj->IsOldObject() && !raw_obj->IsMarked()) { | 527 if (raw_obj->IsOldObject() && !raw_obj->IsMarked()) { |
| 528 // Object has become garbage. Replace it will null. | 528 // Object has become garbage. Replace it will null. |
| 529 *current = Object::null(); | 529 *current = Object::null(); |
| 530 } | 530 } |
| 531 } | 531 } |
| 532 } | 532 } |
| 533 }; | 533 }; |
| 534 | 534 |
| 535 | 535 |
| 536 void GCMarker::ProcessObjectIdTable(Isolate* isolate) { | 536 void GCMarker::ProcessObjectIdTable(Isolate* isolate) { |
| 537 #ifndef PRODUCT |
| 537 if (!FLAG_support_service) { | 538 if (!FLAG_support_service) { |
| 538 return; | 539 return; |
| 539 } | 540 } |
| 540 ObjectIdRingClearPointerVisitor visitor(isolate); | 541 ObjectIdRingClearPointerVisitor visitor(isolate); |
| 541 ObjectIdRing* ring = isolate->object_id_ring(); | 542 ObjectIdRing* ring = isolate->object_id_ring(); |
| 542 ASSERT(ring != NULL); | 543 ASSERT(ring != NULL); |
| 543 ring->VisitPointers(&visitor); | 544 ring->VisitPointers(&visitor); |
| 545 #endif // !PRODUCT |
| 544 } | 546 } |
| 545 | 547 |
| 546 | 548 |
| 547 class MarkTask : public ThreadPool::Task { | 549 class MarkTask : public ThreadPool::Task { |
| 548 public: | 550 public: |
| 549 MarkTask(GCMarker* marker, | 551 MarkTask(GCMarker* marker, |
| 550 Isolate* isolate, | 552 Isolate* isolate, |
| 551 Heap* heap, | 553 Heap* heap, |
| 552 PageSpace* page_space, | 554 PageSpace* page_space, |
| 553 MarkingStack* marking_stack, | 555 MarkingStack* marking_stack, |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 777 // Phase 3: Finalize results from all markers (detach code, etc.). | 779 // Phase 3: Finalize results from all markers (detach code, etc.). |
| 778 barrier.Exit(); | 780 barrier.Exit(); |
| 779 } | 781 } |
| 780 ProcessWeakTables(page_space); | 782 ProcessWeakTables(page_space); |
| 781 ProcessObjectIdTable(isolate); | 783 ProcessObjectIdTable(isolate); |
| 782 } | 784 } |
| 783 Epilogue(isolate, invoke_api_callbacks); | 785 Epilogue(isolate, invoke_api_callbacks); |
| 784 } | 786 } |
| 785 | 787 |
| 786 } // namespace dart | 788 } // namespace dart |
| OLD | NEW |