Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Side by Side Diff: runtime/vm/gc_marker.cc

Issue 1541073002: Implement safepointing of threads (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fix-typo Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/find_code_object_test.cc ('k') | runtime/vm/gc_sweeper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « runtime/vm/find_code_object_test.cc ('k') | runtime/vm/gc_sweeper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698