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 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 | 478 |
479 private: | 479 private: |
480 DISALLOW_COPY_AND_ASSIGN(MarkingWeakVisitor); | 480 DISALLOW_COPY_AND_ASSIGN(MarkingWeakVisitor); |
481 }; | 481 }; |
482 | 482 |
483 | 483 |
484 void GCMarker::Prologue(Isolate* isolate, bool invoke_api_callbacks) { | 484 void GCMarker::Prologue(Isolate* isolate, bool invoke_api_callbacks) { |
485 if (invoke_api_callbacks && (isolate->gc_prologue_callback() != NULL)) { | 485 if (invoke_api_callbacks && (isolate->gc_prologue_callback() != NULL)) { |
486 (isolate->gc_prologue_callback())(); | 486 (isolate->gc_prologue_callback())(); |
487 } | 487 } |
488 isolate->thread_registry()->PrepareForGC(); | 488 isolate->PrepareForGC(); |
489 // The store buffers will be rebuilt as part of marking, reset them now. | 489 // The store buffers will be rebuilt as part of marking, reset them now. |
490 isolate->store_buffer()->Reset(); | 490 isolate->store_buffer()->Reset(); |
491 } | 491 } |
492 | 492 |
493 | 493 |
494 void GCMarker::Epilogue(Isolate* isolate, bool invoke_api_callbacks) { | 494 void GCMarker::Epilogue(Isolate* isolate, bool invoke_api_callbacks) { |
495 if (invoke_api_callbacks && (isolate->gc_epilogue_callback() != NULL)) { | 495 if (invoke_api_callbacks && (isolate->gc_epilogue_callback() != NULL)) { |
496 (isolate->gc_epilogue_callback())(); | 496 (isolate->gc_epilogue_callback())(); |
497 } | 497 } |
498 } | 498 } |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
742 barrier.Exit(); | 742 barrier.Exit(); |
743 } | 743 } |
744 delay_set.ClearReferences(); | 744 delay_set.ClearReferences(); |
745 ProcessWeakTables(page_space); | 745 ProcessWeakTables(page_space); |
746 ProcessObjectIdTable(isolate); | 746 ProcessObjectIdTable(isolate); |
747 } | 747 } |
748 Epilogue(isolate, invoke_api_callbacks); | 748 Epilogue(isolate, invoke_api_callbacks); |
749 } | 749 } |
750 | 750 |
751 } // namespace dart | 751 } // namespace dart |
OLD | NEW |