| 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" |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 Isolate* Dart::CreateIsolate(const char* name_prefix) { | 184 Isolate* Dart::CreateIsolate(const char* name_prefix) { |
| 185 // Create a new isolate. | 185 // Create a new isolate. |
| 186 Isolate* isolate = Isolate::Init(name_prefix); | 186 Isolate* isolate = Isolate::Init(name_prefix); |
| 187 ASSERT(isolate != NULL); | 187 ASSERT(isolate != NULL); |
| 188 return isolate; | 188 return isolate; |
| 189 } | 189 } |
| 190 | 190 |
| 191 | 191 |
| 192 RawError* Dart::InitializeIsolate(const uint8_t* snapshot_buffer, void* data) { | 192 RawError* Dart::InitializeIsolate(const uint8_t* snapshot_buffer, void* data) { |
| 193 // Initialize the new isolate. | 193 // Initialize the new isolate. |
| 194 TIMERSCOPE(time_isolate_initialization); | |
| 195 Isolate* isolate = Isolate::Current(); | 194 Isolate* isolate = Isolate::Current(); |
| 195 TIMERSCOPE(isolate, time_isolate_initialization); |
| 196 ASSERT(isolate != NULL); | 196 ASSERT(isolate != NULL); |
| 197 StackZone zone(isolate); | 197 StackZone zone(isolate); |
| 198 HandleScope handle_scope(isolate); | 198 HandleScope handle_scope(isolate); |
| 199 Heap::Init(isolate); | 199 Heap::Init(isolate); |
| 200 ObjectIdRing::Init(isolate); | 200 ObjectIdRing::Init(isolate); |
| 201 ObjectStore::Init(isolate); | 201 ObjectStore::Init(isolate); |
| 202 | 202 |
| 203 if (snapshot_buffer == NULL) { | 203 if (snapshot_buffer == NULL) { |
| 204 const Error& error = Error::Handle(Object::Init(isolate)); | 204 const Error& error = Error::Handle(Object::Init(isolate)); |
| 205 if (!error.IsNull()) { | 205 if (!error.IsNull()) { |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 return predefined_handles_->handles_.AllocateScopedHandle(); | 270 return predefined_handles_->handles_.AllocateScopedHandle(); |
| 271 } | 271 } |
| 272 | 272 |
| 273 | 273 |
| 274 bool Dart::IsReadOnlyHandle(uword address) { | 274 bool Dart::IsReadOnlyHandle(uword address) { |
| 275 ASSERT(predefined_handles_ != NULL); | 275 ASSERT(predefined_handles_ != NULL); |
| 276 return predefined_handles_->handles_.IsValidScopedHandle(address); | 276 return predefined_handles_->handles_.IsValidScopedHandle(address); |
| 277 } | 277 } |
| 278 | 278 |
| 279 } // namespace dart | 279 } // namespace dart |
| OLD | NEW |