| 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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 typedef std::multimap<RawObject*, RawWeakProperty*> DelaySet; | 275 typedef std::multimap<RawObject*, RawWeakProperty*> DelaySet; |
| 276 typedef std::pair<RawObject*, RawWeakProperty*> DelaySetEntry; | 276 typedef std::pair<RawObject*, RawWeakProperty*> DelaySetEntry; |
| 277 DelaySet delay_set_; | 277 DelaySet delay_set_; |
| 278 const bool visit_function_code_; | 278 const bool visit_function_code_; |
| 279 GrowableArray<RawFunction*> skipped_code_functions_; | 279 GrowableArray<RawFunction*> skipped_code_functions_; |
| 280 | 280 |
| 281 DISALLOW_IMPLICIT_CONSTRUCTORS(MarkingVisitor); | 281 DISALLOW_IMPLICIT_CONSTRUCTORS(MarkingVisitor); |
| 282 }; | 282 }; |
| 283 | 283 |
| 284 | 284 |
| 285 bool IsUnreachable(const RawObject* raw_obj) { | 285 static bool IsUnreachable(const RawObject* raw_obj) { |
| 286 if (!raw_obj->IsHeapObject()) { | 286 if (!raw_obj->IsHeapObject()) { |
| 287 return false; | 287 return false; |
| 288 } | 288 } |
| 289 if (raw_obj == Object::null()) { | 289 if (raw_obj == Object::null()) { |
| 290 return true; | 290 return true; |
| 291 } | 291 } |
| 292 if (!raw_obj->IsOldObject()) { | 292 if (!raw_obj->IsOldObject()) { |
| 293 return false; | 293 return false; |
| 294 } | 294 } |
| 295 return !raw_obj->IsMarked(); | 295 return !raw_obj->IsMarked(); |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 MarkingWeakVisitor mark_weak; | 511 MarkingWeakVisitor mark_weak; |
| 512 IterateWeakRoots(isolate, &mark_weak, invoke_api_callbacks); | 512 IterateWeakRoots(isolate, &mark_weak, invoke_api_callbacks); |
| 513 mark.Finalize(); | 513 mark.Finalize(); |
| 514 ProcessWeakTables(page_space); | 514 ProcessWeakTables(page_space); |
| 515 ProcessObjectIdTable(isolate); | 515 ProcessObjectIdTable(isolate); |
| 516 | 516 |
| 517 Epilogue(isolate, invoke_api_callbacks); | 517 Epilogue(isolate, invoke_api_callbacks); |
| 518 } | 518 } |
| 519 | 519 |
| 520 } // namespace dart | 520 } // namespace dart |
| OLD | NEW |