| 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/dart.h" | 5 #include "vm/dart.h" |
| 6 | 6 |
| 7 #include "vm/code_observers.h" | 7 #include "vm/code_observers.h" |
| 8 #include "vm/dart_api_state.h" | 8 #include "vm/dart_api_state.h" |
| 9 #include "vm/dart_entry.h" | 9 #include "vm/dart_entry.h" |
| 10 #include "vm/flags.h" | 10 #include "vm/flags.h" |
| 11 #include "vm/freelist.h" | 11 #include "vm/freelist.h" |
| 12 #include "vm/handles.h" | 12 #include "vm/handles.h" |
| 13 #include "vm/heap.h" | 13 #include "vm/heap.h" |
| 14 #include "vm/isolate.h" | 14 #include "vm/isolate.h" |
| 15 #include "vm/object.h" | 15 #include "vm/object.h" |
| 16 #include "vm/object_store.h" | 16 #include "vm/object_store.h" |
| 17 #include "vm/object_id_ring.h" | 17 #include "vm/object_id_ring.h" |
| 18 #include "vm/port.h" | 18 #include "vm/port.h" |
| 19 #include "vm/profiler.h" | 19 #include "vm/profiler.h" |
| 20 #include "vm/signal_handler.h" | |
| 21 #include "vm/simulator.h" | 20 #include "vm/simulator.h" |
| 22 #include "vm/snapshot.h" | 21 #include "vm/snapshot.h" |
| 23 #include "vm/stub_code.h" | 22 #include "vm/stub_code.h" |
| 24 #include "vm/symbols.h" | 23 #include "vm/symbols.h" |
| 25 #include "vm/thread_pool.h" | 24 #include "vm/thread_pool.h" |
| 26 #include "vm/virtual_memory.h" | 25 #include "vm/virtual_memory.h" |
| 27 #include "vm/zone.h" | 26 #include "vm/zone.h" |
| 28 | 27 |
| 29 namespace dart { | 28 namespace dart { |
| 30 | 29 |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 Isolate::SetCurrent(vm_isolate_); | 165 Isolate::SetCurrent(vm_isolate_); |
| 167 | 166 |
| 168 // There is a planned and known asymmetry here: We exit one scope for the VM | 167 // There is a planned and known asymmetry here: We exit one scope for the VM |
| 169 // isolate to account for the scope that was entered in Dart_InitOnce. | 168 // isolate to account for the scope that was entered in Dart_InitOnce. |
| 170 Dart_ExitScope(); | 169 Dart_ExitScope(); |
| 171 | 170 |
| 172 ShutdownIsolate(); | 171 ShutdownIsolate(); |
| 173 vm_isolate_ = NULL; | 172 vm_isolate_ = NULL; |
| 174 #endif | 173 #endif |
| 175 | 174 |
| 176 ScopedSignalBlocker ssb; | |
| 177 ProfilerManager::Shutdown(); | 175 ProfilerManager::Shutdown(); |
| 178 CodeObservers::DeleteAll(); | 176 CodeObservers::DeleteAll(); |
| 179 | 177 |
| 180 return NULL; | 178 return NULL; |
| 181 } | 179 } |
| 182 | 180 |
| 183 | 181 |
| 184 Isolate* Dart::CreateIsolate(const char* name_prefix) { | 182 Isolate* Dart::CreateIsolate(const char* name_prefix) { |
| 185 // Create a new isolate. | 183 // Create a new isolate. |
| 186 Isolate* isolate = Isolate::Init(name_prefix); | 184 Isolate* isolate = Isolate::Init(name_prefix); |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 return predefined_handles_->handles_.AllocateScopedHandle(); | 270 return predefined_handles_->handles_.AllocateScopedHandle(); |
| 273 } | 271 } |
| 274 | 272 |
| 275 | 273 |
| 276 bool Dart::IsReadOnlyHandle(uword address) { | 274 bool Dart::IsReadOnlyHandle(uword address) { |
| 277 ASSERT(predefined_handles_ != NULL); | 275 ASSERT(predefined_handles_ != NULL); |
| 278 return predefined_handles_->handles_.IsValidScopedHandle(address); | 276 return predefined_handles_->handles_.IsValidScopedHandle(address); |
| 279 } | 277 } |
| 280 | 278 |
| 281 } // namespace dart | 279 } // namespace dart |
| OLD | NEW |