| 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 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 588 marking_stack_(marking_stack), | 588 marking_stack_(marking_stack), |
| 589 delay_set_(delay_set), | 589 delay_set_(delay_set), |
| 590 barrier_(barrier), | 590 barrier_(barrier), |
| 591 collect_code_(collect_code), | 591 collect_code_(collect_code), |
| 592 task_index_(task_index), | 592 task_index_(task_index), |
| 593 num_tasks_(num_tasks), | 593 num_tasks_(num_tasks), |
| 594 num_busy_(num_busy) { | 594 num_busy_(num_busy) { |
| 595 } | 595 } |
| 596 | 596 |
| 597 virtual void Run() { | 597 virtual void Run() { |
| 598 Thread::EnterIsolateAsHelper(isolate_, true); | 598 bool result = Thread::EnterIsolateAsHelper(isolate_, true); |
| 599 ASSERT(result); |
| 599 { | 600 { |
| 600 StackZone stack_zone(Thread::Current()); | 601 StackZone stack_zone(Thread::Current()); |
| 601 Zone* zone = stack_zone.GetZone(); | 602 Zone* zone = stack_zone.GetZone(); |
| 602 SkippedCodeFunctions* skipped_code_functions = | 603 SkippedCodeFunctions* skipped_code_functions = |
| 603 collect_code_ ? new(zone) SkippedCodeFunctions() : NULL; | 604 collect_code_ ? new(zone) SkippedCodeFunctions() : NULL; |
| 604 SyncMarkingVisitor visitor(isolate_, heap_, page_space_, marking_stack_, | 605 SyncMarkingVisitor visitor(isolate_, heap_, page_space_, marking_stack_, |
| 605 delay_set_, skipped_code_functions); | 606 delay_set_, skipped_code_functions); |
| 606 // Phase 1: Iterate over roots and drain marking stack in tasks. | 607 // Phase 1: Iterate over roots and drain marking stack in tasks. |
| 607 marker_->IterateRoots(isolate_, &visitor, task_index_, num_tasks_); | 608 marker_->IterateRoots(isolate_, &visitor, task_index_, num_tasks_); |
| 608 do { | 609 do { |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 740 barrier.Exit(); | 741 barrier.Exit(); |
| 741 } | 742 } |
| 742 delay_set.ClearReferences(); | 743 delay_set.ClearReferences(); |
| 743 ProcessWeakTables(page_space); | 744 ProcessWeakTables(page_space); |
| 744 ProcessObjectIdTable(isolate); | 745 ProcessObjectIdTable(isolate); |
| 745 } | 746 } |
| 746 Epilogue(isolate, invoke_api_callbacks); | 747 Epilogue(isolate, invoke_api_callbacks); |
| 747 } | 748 } |
| 748 | 749 |
| 749 } // namespace dart | 750 } // namespace dart |
| OLD | NEW |