OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 "platform/json.h" | 9 #include "platform/json.h" |
10 #include "vm/code_observers.h" | 10 #include "vm/code_observers.h" |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 Isolate::Isolate() | 394 Isolate::Isolate() |
395 : store_buffer_(), | 395 : store_buffer_(), |
396 message_notify_callback_(NULL), | 396 message_notify_callback_(NULL), |
397 name_(NULL), | 397 name_(NULL), |
398 start_time_(OS::GetCurrentTimeMicros()), | 398 start_time_(OS::GetCurrentTimeMicros()), |
399 main_port_(0), | 399 main_port_(0), |
400 pause_capability_(0), | 400 pause_capability_(0), |
401 terminate_capability_(0), | 401 terminate_capability_(0), |
402 heap_(NULL), | 402 heap_(NULL), |
403 object_store_(NULL), | 403 object_store_(NULL), |
404 top_context_(Context::null()), | |
405 top_exit_frame_info_(0), | 404 top_exit_frame_info_(0), |
406 init_callback_data_(NULL), | 405 init_callback_data_(NULL), |
407 environment_callback_(NULL), | 406 environment_callback_(NULL), |
408 library_tag_handler_(NULL), | 407 library_tag_handler_(NULL), |
409 api_state_(NULL), | 408 api_state_(NULL), |
410 stub_code_(NULL), | 409 stub_code_(NULL), |
411 debugger_(NULL), | 410 debugger_(NULL), |
412 single_step_(false), | 411 single_step_(false), |
413 resume_request_(false), | 412 resume_request_(false), |
414 random_(), | 413 random_(), |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 : store_buffer_(true), | 453 : store_buffer_(true), |
455 class_table_(original->class_table()), | 454 class_table_(original->class_table()), |
456 message_notify_callback_(NULL), | 455 message_notify_callback_(NULL), |
457 name_(NULL), | 456 name_(NULL), |
458 start_time_(OS::GetCurrentTimeMicros()), | 457 start_time_(OS::GetCurrentTimeMicros()), |
459 main_port_(0), | 458 main_port_(0), |
460 pause_capability_(0), | 459 pause_capability_(0), |
461 terminate_capability_(0), | 460 terminate_capability_(0), |
462 heap_(NULL), | 461 heap_(NULL), |
463 object_store_(NULL), | 462 object_store_(NULL), |
464 top_context_(Context::null()), | |
465 top_exit_frame_info_(0), | 463 top_exit_frame_info_(0), |
466 init_callback_data_(NULL), | 464 init_callback_data_(NULL), |
467 environment_callback_(NULL), | 465 environment_callback_(NULL), |
468 library_tag_handler_(NULL), | 466 library_tag_handler_(NULL), |
469 api_state_(NULL), | 467 api_state_(NULL), |
470 stub_code_(NULL), | 468 stub_code_(NULL), |
471 debugger_(NULL), | 469 debugger_(NULL), |
472 single_step_(false), | 470 single_step_(false), |
473 resume_request_(false), | 471 resume_request_(false), |
474 random_(), | 472 random_(), |
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1123 while (frame != NULL) { | 1121 while (frame != NULL) { |
1124 frame->VisitObjectPointers(visitor); | 1122 frame->VisitObjectPointers(visitor); |
1125 frame = frames_iterator.NextFrame(); | 1123 frame = frames_iterator.NextFrame(); |
1126 } | 1124 } |
1127 | 1125 |
1128 // Visit the dart api state for all local and persistent handles. | 1126 // Visit the dart api state for all local and persistent handles. |
1129 if (api_state() != NULL) { | 1127 if (api_state() != NULL) { |
1130 api_state()->VisitObjectPointers(visitor, visit_prologue_weak_handles); | 1128 api_state()->VisitObjectPointers(visitor, visit_prologue_weak_handles); |
1131 } | 1129 } |
1132 | 1130 |
1133 // Visit the top context which is stored in the isolate. | |
1134 visitor->VisitPointer(reinterpret_cast<RawObject**>(&top_context_)); | |
1135 | |
1136 // Visit the current tag which is stored in the isolate. | 1131 // Visit the current tag which is stored in the isolate. |
1137 visitor->VisitPointer(reinterpret_cast<RawObject**>(¤t_tag_)); | 1132 visitor->VisitPointer(reinterpret_cast<RawObject**>(¤t_tag_)); |
1138 | 1133 |
1139 // Visit the default tag which is stored in the isolate. | 1134 // Visit the default tag which is stored in the isolate. |
1140 visitor->VisitPointer(reinterpret_cast<RawObject**>(&default_tag_)); | 1135 visitor->VisitPointer(reinterpret_cast<RawObject**>(&default_tag_)); |
1141 | 1136 |
1142 // Visit the tag table which is stored in the isolate. | 1137 // Visit the tag table which is stored in the isolate. |
1143 visitor->VisitPointer(reinterpret_cast<RawObject**>(&tag_table_)); | 1138 visitor->VisitPointer(reinterpret_cast<RawObject**>(&tag_table_)); |
1144 | 1139 |
1145 // Visit objects in the debugger. | 1140 // Visit objects in the debugger. |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1581 serialized_message_, serialized_message_len_); | 1576 serialized_message_, serialized_message_len_); |
1582 } | 1577 } |
1583 | 1578 |
1584 | 1579 |
1585 void IsolateSpawnState::Cleanup() { | 1580 void IsolateSpawnState::Cleanup() { |
1586 SwitchIsolateScope switch_scope(I); | 1581 SwitchIsolateScope switch_scope(I); |
1587 Dart::ShutdownIsolate(); | 1582 Dart::ShutdownIsolate(); |
1588 } | 1583 } |
1589 | 1584 |
1590 } // namespace dart | 1585 } // namespace dart |
OLD | NEW |