| Index: runtime/vm/gc_marker.cc
|
| diff --git a/runtime/vm/gc_marker.cc b/runtime/vm/gc_marker.cc
|
| index 95acfbbbad40e0aba5faabde103065f6e5ceec47..0acd8bc76acf0774c4cfb507d55b42124f937be6 100644
|
| --- a/runtime/vm/gc_marker.cc
|
| +++ b/runtime/vm/gc_marker.cc
|
| @@ -8,6 +8,7 @@
|
| #include "vm/dart_api_state.h"
|
| #include "vm/isolate.h"
|
| #include "vm/log.h"
|
| +#include "vm/object_id_ring.h"
|
| #include "vm/pages.h"
|
| #include "vm/raw_object.h"
|
| #include "vm/stack_frame.h"
|
| @@ -17,7 +18,6 @@
|
| #include "vm/thread_registry.h"
|
| #include "vm/timeline.h"
|
| #include "vm/visitor.h"
|
| -#include "vm/object_id_ring.h"
|
|
|
| namespace dart {
|
|
|
| @@ -85,7 +85,6 @@ class SkippedCodeFunctions : public ZoneAllocated {
|
| DISALLOW_COPY_AND_ASSIGN(SkippedCodeFunctions);
|
| };
|
|
|
| -
|
| class MarkerWorkList : public ValueObject {
|
| public:
|
| explicit MarkerWorkList(MarkingStack* marking_stack)
|
| @@ -137,7 +136,6 @@ class MarkerWorkList : public ValueObject {
|
| MarkingStack* marking_stack_;
|
| };
|
|
|
| -
|
| template <bool sync>
|
| class MarkingVisitorBase : public ObjectPointerVisitor {
|
| public:
|
| @@ -416,11 +414,9 @@ class MarkingVisitorBase : public ObjectPointerVisitor {
|
| DISALLOW_IMPLICIT_CONSTRUCTORS(MarkingVisitorBase);
|
| };
|
|
|
| -
|
| typedef MarkingVisitorBase<false> UnsyncMarkingVisitor;
|
| typedef MarkingVisitorBase<true> SyncMarkingVisitor;
|
|
|
| -
|
| static bool IsUnreachable(const RawObject* raw_obj) {
|
| if (!raw_obj->IsHeapObject()) {
|
| return false;
|
| @@ -434,7 +430,6 @@ static bool IsUnreachable(const RawObject* raw_obj) {
|
| return !raw_obj->IsMarked();
|
| }
|
|
|
| -
|
| class MarkingWeakVisitor : public HandleVisitor {
|
| public:
|
| explicit MarkingWeakVisitor(Thread* thread) : HandleVisitor(thread) {}
|
| @@ -452,7 +447,6 @@ class MarkingWeakVisitor : public HandleVisitor {
|
| DISALLOW_COPY_AND_ASSIGN(MarkingWeakVisitor);
|
| };
|
|
|
| -
|
| void GCMarker::Prologue(Isolate* isolate, bool invoke_api_callbacks) {
|
| if (invoke_api_callbacks && (isolate->gc_prologue_callback() != NULL)) {
|
| (isolate->gc_prologue_callback())();
|
| @@ -462,14 +456,12 @@ void GCMarker::Prologue(Isolate* isolate, bool invoke_api_callbacks) {
|
| isolate->store_buffer()->Reset();
|
| }
|
|
|
| -
|
| void GCMarker::Epilogue(Isolate* isolate, bool invoke_api_callbacks) {
|
| if (invoke_api_callbacks && (isolate->gc_epilogue_callback() != NULL)) {
|
| (isolate->gc_epilogue_callback())();
|
| }
|
| }
|
|
|
| -
|
| void GCMarker::IterateRoots(Isolate* isolate,
|
| ObjectPointerVisitor* visitor,
|
| intptr_t slice_index,
|
| @@ -487,14 +479,12 @@ void GCMarker::IterateRoots(Isolate* isolate,
|
| // slices are empty.
|
| }
|
|
|
| -
|
| void GCMarker::IterateWeakRoots(Isolate* isolate, HandleVisitor* visitor) {
|
| ApiState* state = isolate->api_state();
|
| ASSERT(state != NULL);
|
| isolate->VisitWeakPersistentHandles(visitor);
|
| }
|
|
|
| -
|
| void GCMarker::ProcessWeakTables(PageSpace* page_space) {
|
| for (int sel = 0; sel < Heap::kNumWeakSelectors; sel++) {
|
| WeakTable* table =
|
| @@ -512,13 +502,11 @@ void GCMarker::ProcessWeakTables(PageSpace* page_space) {
|
| }
|
| }
|
|
|
| -
|
| class ObjectIdRingClearPointerVisitor : public ObjectPointerVisitor {
|
| public:
|
| explicit ObjectIdRingClearPointerVisitor(Isolate* isolate)
|
| : ObjectPointerVisitor(isolate) {}
|
|
|
| -
|
| void VisitPointers(RawObject** first, RawObject** last) {
|
| for (RawObject** current = first; current <= last; current++) {
|
| RawObject* raw_obj = *current;
|
| @@ -531,7 +519,6 @@ class ObjectIdRingClearPointerVisitor : public ObjectPointerVisitor {
|
| }
|
| };
|
|
|
| -
|
| void GCMarker::ProcessObjectIdTable(Isolate* isolate) {
|
| #ifndef PRODUCT
|
| if (!FLAG_support_service) {
|
| @@ -544,7 +531,6 @@ void GCMarker::ProcessObjectIdTable(Isolate* isolate) {
|
| #endif // !PRODUCT
|
| }
|
|
|
| -
|
| class MarkTask : public ThreadPool::Task {
|
| public:
|
| MarkTask(GCMarker* marker,
|
| @@ -668,7 +654,6 @@ class MarkTask : public ThreadPool::Task {
|
| DISALLOW_COPY_AND_ASSIGN(MarkTask);
|
| };
|
|
|
| -
|
| template <class MarkingVisitorType>
|
| void GCMarker::FinalizeResultsFrom(MarkingVisitorType* visitor) {
|
| {
|
| @@ -690,7 +675,6 @@ void GCMarker::FinalizeResultsFrom(MarkingVisitorType* visitor) {
|
| visitor->Finalize();
|
| }
|
|
|
| -
|
| void GCMarker::MarkObjects(Isolate* isolate,
|
| PageSpace* page_space,
|
| bool invoke_api_callbacks,
|
|
|