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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 // originating from this weak property. | 194 // originating from this weak property. |
195 VisitingOldObject(cur_weak); | 195 VisitingOldObject(cur_weak); |
196 cur_weak->VisitPointers(this); | 196 cur_weak->VisitPointers(this); |
197 } else { | 197 } else { |
198 // Requeue this weak property to be handled later. | 198 // Requeue this weak property to be handled later. |
199 EnqueueWeakProperty(cur_weak); | 199 EnqueueWeakProperty(cur_weak); |
200 } | 200 } |
201 // Advance to next weak property in the queue. | 201 // Advance to next weak property in the queue. |
202 cur_weak = reinterpret_cast<RawWeakProperty*>(next_weak); | 202 cur_weak = reinterpret_cast<RawWeakProperty*>(next_weak); |
203 } | 203 } |
204 | 204 VisitingOldObject(NULL); |
205 return marked; | 205 return marked; |
206 } | 206 } |
207 | 207 |
208 void DrainMarkingStack() { | 208 void DrainMarkingStack() { |
209 RawObject* raw_obj = work_list_.Pop(); | 209 RawObject* raw_obj = work_list_.Pop(); |
210 if ((raw_obj == NULL) && ProcessPendingWeakProperties()) { | 210 if ((raw_obj == NULL) && ProcessPendingWeakProperties()) { |
211 raw_obj = work_list_.Pop(); | 211 raw_obj = work_list_.Pop(); |
212 } | 212 } |
213 | 213 |
214 if (raw_obj == NULL) { | 214 if (raw_obj == NULL) { |
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
751 // Phase 3: Finalize results from all markers (detach code, etc.). | 751 // Phase 3: Finalize results from all markers (detach code, etc.). |
752 barrier.Exit(); | 752 barrier.Exit(); |
753 } | 753 } |
754 ProcessWeakTables(page_space); | 754 ProcessWeakTables(page_space); |
755 ProcessObjectIdTable(isolate); | 755 ProcessObjectIdTable(isolate); |
756 } | 756 } |
757 Epilogue(isolate, invoke_api_callbacks); | 757 Epilogue(isolate, invoke_api_callbacks); |
758 } | 758 } |
759 | 759 |
760 } // namespace dart | 760 } // namespace dart |
OLD | NEW |