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

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

Issue 1285293004: Migrate most uses of StackZone(Isolate*) to Thread*. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Final cleanup. Created 5 years, 4 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.cc ('k') | runtime/vm/megamorphic_cache_table.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 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 524
525 void GCMarker::MarkObjects(Isolate* isolate, 525 void GCMarker::MarkObjects(Isolate* isolate,
526 PageSpace* page_space, 526 PageSpace* page_space,
527 bool invoke_api_callbacks, 527 bool invoke_api_callbacks,
528 bool collect_code) { 528 bool collect_code) {
529 const bool visit_function_code = !collect_code; 529 const bool visit_function_code = !collect_code;
530 Prologue(isolate, invoke_api_callbacks); 530 Prologue(isolate, invoke_api_callbacks);
531 // The API prologue/epilogue may create/destroy zones, so we must not 531 // The API prologue/epilogue may create/destroy zones, so we must not
532 // depend on zone allocations surviving beyond the epilogue callback. 532 // depend on zone allocations surviving beyond the epilogue callback.
533 { 533 {
534 StackZone zone(isolate); 534 StackZone zone(Thread::Current());
535 MarkingStack marking_stack; 535 MarkingStack marking_stack;
536 DelaySet delay_set; 536 DelaySet delay_set;
537 MarkingVisitor mark(isolate, heap_, page_space, &marking_stack, 537 MarkingVisitor mark(isolate, heap_, page_space, &marking_stack,
538 &delay_set, visit_function_code); 538 &delay_set, visit_function_code);
539 IterateRoots(isolate, &mark, !invoke_api_callbacks); 539 IterateRoots(isolate, &mark, !invoke_api_callbacks);
540 mark.DrainMarkingStack(); 540 mark.DrainMarkingStack();
541 IterateWeakReferences(isolate, &mark); 541 IterateWeakReferences(isolate, &mark);
542 MarkingWeakVisitor mark_weak; 542 MarkingWeakVisitor mark_weak;
543 IterateWeakRoots(isolate, &mark_weak, invoke_api_callbacks); 543 IterateWeakRoots(isolate, &mark_weak, invoke_api_callbacks);
544 // TODO(koda): Add hand-over callback and centralize skipped code functions. 544 // TODO(koda): Add hand-over callback and centralize skipped code functions.
545 marked_bytes_ = mark.marked_bytes(); 545 marked_bytes_ = mark.marked_bytes();
546 mark.Finalize(); 546 mark.Finalize();
547 delay_set.ClearReferences(); 547 delay_set.ClearReferences();
548 ProcessWeakTables(page_space); 548 ProcessWeakTables(page_space);
549 ProcessObjectIdTable(isolate); 549 ProcessObjectIdTable(isolate);
550 } 550 }
551 Epilogue(isolate, invoke_api_callbacks); 551 Epilogue(isolate, invoke_api_callbacks);
552 } 552 }
553 553
554 } // namespace dart 554 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph.cc ('k') | runtime/vm/megamorphic_cache_table.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698