| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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/isolate.h" | 5 #include "vm/isolate.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "lib/mirrors.h" | 9 #include "lib/mirrors.h" |
| 10 #include "vm/compiler_stats.h" | 10 #include "vm/compiler_stats.h" |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 random_seed_(Random::kDefaultRandomSeed), | 144 random_seed_(Random::kDefaultRandomSeed), |
| 145 top_exit_frame_info_(0), | 145 top_exit_frame_info_(0), |
| 146 init_callback_data_(NULL), | 146 init_callback_data_(NULL), |
| 147 library_tag_handler_(NULL), | 147 library_tag_handler_(NULL), |
| 148 api_state_(NULL), | 148 api_state_(NULL), |
| 149 stub_code_(NULL), | 149 stub_code_(NULL), |
| 150 debugger_(NULL), | 150 debugger_(NULL), |
| 151 long_jump_base_(NULL), | 151 long_jump_base_(NULL), |
| 152 timer_list_(), | 152 timer_list_(), |
| 153 ast_node_id_(AstNode::kNoId), | 153 ast_node_id_(AstNode::kNoId), |
| 154 computation_id_(AstNode::kNoId), |
| 155 ic_data_array_(Array::null()), |
| 154 mutex_(new Mutex()), | 156 mutex_(new Mutex()), |
| 155 stack_limit_(0), | 157 stack_limit_(0), |
| 156 saved_stack_limit_(0), | 158 saved_stack_limit_(0), |
| 157 message_handler_(NULL), | 159 message_handler_(NULL), |
| 158 spawn_data_(NULL) { | 160 spawn_data_(NULL) { |
| 159 } | 161 } |
| 160 | 162 |
| 161 | 163 |
| 162 Isolate::~Isolate() { | 164 Isolate::~Isolate() { |
| 163 delete [] name_; | 165 delete [] name_; |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 } | 440 } |
| 439 | 441 |
| 440 // Visit the dart api state for all local and persistent handles. | 442 // Visit the dart api state for all local and persistent handles. |
| 441 if (api_state() != NULL) { | 443 if (api_state() != NULL) { |
| 442 api_state()->VisitObjectPointers(visitor, visit_prologue_weak_handles); | 444 api_state()->VisitObjectPointers(visitor, visit_prologue_weak_handles); |
| 443 } | 445 } |
| 444 | 446 |
| 445 // Visit the top context which is stored in the isolate. | 447 // Visit the top context which is stored in the isolate. |
| 446 visitor->VisitPointer(reinterpret_cast<RawObject**>(&top_context_)); | 448 visitor->VisitPointer(reinterpret_cast<RawObject**>(&top_context_)); |
| 447 | 449 |
| 450 // Visit the currently active IC data array. |
| 451 visitor->VisitPointer(reinterpret_cast<RawObject**>(&ic_data_array_)); |
| 452 |
| 448 // Visit objects in the debugger. | 453 // Visit objects in the debugger. |
| 449 debugger()->VisitObjectPointers(visitor); | 454 debugger()->VisitObjectPointers(visitor); |
| 450 } | 455 } |
| 451 | 456 |
| 452 | 457 |
| 453 void Isolate::VisitWeakPersistentHandles(HandleVisitor* visitor, | 458 void Isolate::VisitWeakPersistentHandles(HandleVisitor* visitor, |
| 454 bool visit_prologue_weak_handles) { | 459 bool visit_prologue_weak_handles) { |
| 455 if (api_state() != NULL) { | 460 if (api_state() != NULL) { |
| 456 api_state()->VisitWeakHandles(visitor, visit_prologue_weak_handles); | 461 api_state()->VisitWeakHandles(visitor, visit_prologue_weak_handles); |
| 457 } | 462 } |
| 458 } | 463 } |
| 459 | 464 |
| 460 } // namespace dart | 465 } // namespace dart |
| OLD | NEW |