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

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

Issue 1386503002: Initial design for background compilation (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Address Comments Created 5 years, 2 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/flow_graph_optimizer.cc ('k') | runtime/vm/isolate.h » ('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 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 visit_prologue_weak_persistent_handles_( 588 visit_prologue_weak_persistent_handles_(
589 visit_prologue_weak_persistent_handles) { 589 visit_prologue_weak_persistent_handles) {
590 } 590 }
591 591
592 virtual void Run() { 592 virtual void Run() {
593 Thread::EnterIsolateAsHelper(isolate_, true); 593 Thread::EnterIsolateAsHelper(isolate_, true);
594 { 594 {
595 StackZone stack_zone(Thread::Current()); 595 StackZone stack_zone(Thread::Current());
596 Zone* zone = stack_zone.GetZone(); 596 Zone* zone = stack_zone.GetZone();
597 SkippedCodeFunctions* skipped_code_functions = 597 SkippedCodeFunctions* skipped_code_functions =
598 collect_code_ ? new(zone) SkippedCodeFunctions() : NULL; 598 collect_code_ ? new(zone) SkippedCodeFunctions() : NULL;
599 MarkingVisitor visitor(isolate_, heap_, page_space_, marking_stack_, 599 MarkingVisitor visitor(isolate_, heap_, page_space_, marking_stack_,
600 delay_set_, skipped_code_functions); 600 delay_set_, skipped_code_functions);
601 // Phase 1: Populate and drain marking stack in task. 601 // Phase 1: Populate and drain marking stack in task.
602 // TODO(koda): Split root iteration work among multiple tasks. 602 // TODO(koda): Split root iteration work among multiple tasks.
603 marker_->IterateRoots(isolate_, &visitor, 603 marker_->IterateRoots(isolate_, &visitor,
604 visit_prologue_weak_persistent_handles_); 604 visit_prologue_weak_persistent_handles_);
605 visitor.DrainMarkingStack(); 605 visitor.DrainMarkingStack();
606 barrier_->Sync(); 606 barrier_->Sync();
607 // Phase 2: Weak processing and follow-up marking on main thread. 607 // Phase 2: Weak processing and follow-up marking on main thread.
608 barrier_->Sync(); 608 barrier_->Sync();
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 barrier.Exit(); 708 barrier.Exit();
709 } 709 }
710 delay_set.ClearReferences(); 710 delay_set.ClearReferences();
711 ProcessWeakTables(page_space); 711 ProcessWeakTables(page_space);
712 ProcessObjectIdTable(isolate); 712 ProcessObjectIdTable(isolate);
713 } 713 }
714 Epilogue(isolate, invoke_api_callbacks); 714 Epilogue(isolate, invoke_api_callbacks);
715 } 715 }
716 716
717 } // namespace dart 717 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698