| 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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 Metric::Cleanup(); | 261 Metric::Cleanup(); |
| 262 | 262 |
| 263 return NULL; | 263 return NULL; |
| 264 } | 264 } |
| 265 | 265 |
| 266 | 266 |
| 267 Isolate* Dart::CreateIsolate(const char* name_prefix, | 267 Isolate* Dart::CreateIsolate(const char* name_prefix, |
| 268 const Dart_IsolateFlags& api_flags) { | 268 const Dart_IsolateFlags& api_flags) { |
| 269 // Create a new isolate. | 269 // Create a new isolate. |
| 270 Isolate* isolate = Isolate::Init(name_prefix, api_flags); | 270 Isolate* isolate = Isolate::Init(name_prefix, api_flags); |
| 271 ASSERT(isolate != NULL); | |
| 272 return isolate; | 271 return isolate; |
| 273 } | 272 } |
| 274 | 273 |
| 275 | 274 |
| 276 RawError* Dart::InitializeIsolate(const uint8_t* snapshot_buffer, void* data) { | 275 RawError* Dart::InitializeIsolate(const uint8_t* snapshot_buffer, void* data) { |
| 277 // Initialize the new isolate. | 276 // Initialize the new isolate. |
| 278 Thread* T = Thread::Current(); | 277 Thread* T = Thread::Current(); |
| 279 Isolate* I = T->isolate(); | 278 Isolate* I = T->isolate(); |
| 280 TIMERSCOPE(T, time_isolate_initialization); | 279 TIMERSCOPE(T, time_isolate_initialization); |
| 281 TimelineDurationScope tds(I, I->GetIsolateStream(), "InitializeIsolate"); | 280 TimelineDurationScope tds(I, I->GetIsolateStream(), "InitializeIsolate"); |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 return predefined_handles_->handles_.IsValidScopedHandle(address); | 408 return predefined_handles_->handles_.IsValidScopedHandle(address); |
| 410 } | 409 } |
| 411 | 410 |
| 412 | 411 |
| 413 bool Dart::IsReadOnlyApiHandle(Dart_Handle handle) { | 412 bool Dart::IsReadOnlyApiHandle(Dart_Handle handle) { |
| 414 ASSERT(predefined_handles_ != NULL); | 413 ASSERT(predefined_handles_ != NULL); |
| 415 return predefined_handles_->api_handles_.IsValidHandle(handle); | 414 return predefined_handles_->api_handles_.IsValidHandle(handle); |
| 416 } | 415 } |
| 417 | 416 |
| 418 } // namespace dart | 417 } // namespace dart |
| OLD | NEW |