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 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
649 #define REUSABLE_HANDLE_SCOPE_INIT(object) | 649 #define REUSABLE_HANDLE_SCOPE_INIT(object) |
650 #endif // defined(DEBUG) | 650 #endif // defined(DEBUG) |
651 | 651 |
652 #define REUSABLE_HANDLE_INITIALIZERS(object) \ | 652 #define REUSABLE_HANDLE_INITIALIZERS(object) \ |
653 object##_handle_(NULL), | 653 object##_handle_(NULL), |
654 | 654 |
655 Isolate::Isolate(const Dart_IsolateFlags& api_flags) | 655 Isolate::Isolate(const Dart_IsolateFlags& api_flags) |
656 : vm_tag_(0), | 656 : vm_tag_(0), |
657 store_buffer_(new StoreBuffer()), | 657 store_buffer_(new StoreBuffer()), |
658 thread_registry_(new ThreadRegistry()), | 658 thread_registry_(new ThreadRegistry()), |
| 659 megamorphic_cache_table_(this), |
659 message_notify_callback_(NULL), | 660 message_notify_callback_(NULL), |
660 name_(NULL), | 661 name_(NULL), |
661 debugger_name_(NULL), | 662 debugger_name_(NULL), |
662 start_time_(OS::GetCurrentTimeMicros()), | 663 start_time_(OS::GetCurrentTimeMicros()), |
663 main_port_(0), | 664 main_port_(0), |
664 origin_id_(0), | 665 origin_id_(0), |
665 pause_capability_(0), | 666 pause_capability_(0), |
666 terminate_capability_(0), | 667 terminate_capability_(0), |
667 errors_fatal_(true), | 668 errors_fatal_(true), |
668 heap_(NULL), | 669 heap_(NULL), |
(...skipping 947 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1616 bool visit_prologue_weak_handles, | 1617 bool visit_prologue_weak_handles, |
1617 bool validate_frames) { | 1618 bool validate_frames) { |
1618 ASSERT(visitor != NULL); | 1619 ASSERT(visitor != NULL); |
1619 | 1620 |
1620 // Visit objects in the object store. | 1621 // Visit objects in the object store. |
1621 object_store()->VisitObjectPointers(visitor); | 1622 object_store()->VisitObjectPointers(visitor); |
1622 | 1623 |
1623 // Visit objects in the class table. | 1624 // Visit objects in the class table. |
1624 class_table()->VisitObjectPointers(visitor); | 1625 class_table()->VisitObjectPointers(visitor); |
1625 | 1626 |
1626 // Visit objects in the megamorphic cache. | |
1627 megamorphic_cache_table()->VisitObjectPointers(visitor); | |
1628 | |
1629 // Visit objects in per isolate stubs. | 1627 // Visit objects in per isolate stubs. |
1630 StubCode::VisitObjectPointers(visitor); | 1628 StubCode::VisitObjectPointers(visitor); |
1631 | 1629 |
1632 // Visit objects in isolate specific handles area. | 1630 // Visit objects in isolate specific handles area. |
1633 reusable_handles_.VisitObjectPointers(visitor); | 1631 reusable_handles_.VisitObjectPointers(visitor); |
1634 | 1632 |
1635 // Visit the dart api state for all local and persistent handles. | 1633 // Visit the dart api state for all local and persistent handles. |
1636 if (api_state() != NULL) { | 1634 if (api_state() != NULL) { |
1637 api_state()->VisitObjectPointers(visitor, visit_prologue_weak_handles); | 1635 api_state()->VisitObjectPointers(visitor, visit_prologue_weak_handles); |
1638 } | 1636 } |
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2349 serialized_message_, serialized_message_len_); | 2347 serialized_message_, serialized_message_len_); |
2350 } | 2348 } |
2351 | 2349 |
2352 | 2350 |
2353 void IsolateSpawnState::Cleanup() { | 2351 void IsolateSpawnState::Cleanup() { |
2354 SwitchIsolateScope switch_scope(I); | 2352 SwitchIsolateScope switch_scope(I); |
2355 Dart::ShutdownIsolate(); | 2353 Dart::ShutdownIsolate(); |
2356 } | 2354 } |
2357 | 2355 |
2358 } // namespace dart | 2356 } // namespace dart |
OLD | NEW |