| 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/cpu.h" | 8 #include "vm/cpu.h" |
| 9 #include "vm/dart_api_state.h" | 9 #include "vm/dart_api_state.h" |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 Isolate* Dart::CreateIsolate(const char* name_prefix) { | 189 Isolate* Dart::CreateIsolate(const char* name_prefix) { |
| 190 // Create a new isolate. | 190 // Create a new isolate. |
| 191 Isolate* isolate = Isolate::Init(name_prefix); | 191 Isolate* isolate = Isolate::Init(name_prefix); |
| 192 ASSERT(isolate != NULL); | 192 ASSERT(isolate != NULL); |
| 193 return isolate; | 193 return isolate; |
| 194 } | 194 } |
| 195 | 195 |
| 196 | 196 |
| 197 RawError* Dart::InitializeIsolate(const uint8_t* snapshot_buffer, void* data) { | 197 RawError* Dart::InitializeIsolate(const uint8_t* snapshot_buffer, void* data) { |
| 198 // Initialize the new isolate. | 198 // Initialize the new isolate. |
| 199 TIMERSCOPE(time_isolate_initialization); | |
| 200 Isolate* isolate = Isolate::Current(); | 199 Isolate* isolate = Isolate::Current(); |
| 200 TIMERSCOPE(isolate, time_isolate_initialization); |
| 201 ASSERT(isolate != NULL); | 201 ASSERT(isolate != NULL); |
| 202 StackZone zone(isolate); | 202 StackZone zone(isolate); |
| 203 HandleScope handle_scope(isolate); | 203 HandleScope handle_scope(isolate); |
| 204 Heap::Init(isolate); | 204 Heap::Init(isolate); |
| 205 ObjectIdRing::Init(isolate); | 205 ObjectIdRing::Init(isolate); |
| 206 ObjectStore::Init(isolate); | 206 ObjectStore::Init(isolate); |
| 207 | 207 |
| 208 if (snapshot_buffer == NULL) { | 208 if (snapshot_buffer == NULL) { |
| 209 const Error& error = Error::Handle(Object::Init(isolate)); | 209 const Error& error = Error::Handle(Object::Init(isolate)); |
| 210 if (!error.IsNull()) { | 210 if (!error.IsNull()) { |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 return predefined_handles_->handles_.AllocateScopedHandle(); | 275 return predefined_handles_->handles_.AllocateScopedHandle(); |
| 276 } | 276 } |
| 277 | 277 |
| 278 | 278 |
| 279 bool Dart::IsReadOnlyHandle(uword address) { | 279 bool Dart::IsReadOnlyHandle(uword address) { |
| 280 ASSERT(predefined_handles_ != NULL); | 280 ASSERT(predefined_handles_ != NULL); |
| 281 return predefined_handles_->handles_.IsValidScopedHandle(address); | 281 return predefined_handles_->handles_.IsValidScopedHandle(address); |
| 282 } | 282 } |
| 283 | 283 |
| 284 } // namespace dart | 284 } // namespace dart |
| OLD | NEW |