| 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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 tds.CopyArgument(0, "isolateName", I->name()); | 288 tds.CopyArgument(0, "isolateName", I->name()); |
| 289 | 289 |
| 290 ASSERT(I != NULL); | 290 ASSERT(I != NULL); |
| 291 StackZone zone(T); | 291 StackZone zone(T); |
| 292 HandleScope handle_scope(T); | 292 HandleScope handle_scope(T); |
| 293 { | 293 { |
| 294 TimelineDurationScope tds(T, I->GetIsolateStream(), "ObjectStore::Init"); | 294 TimelineDurationScope tds(T, I->GetIsolateStream(), "ObjectStore::Init"); |
| 295 ObjectStore::Init(I); | 295 ObjectStore::Init(I); |
| 296 } | 296 } |
| 297 | 297 |
| 298 // Setup for profiling. | |
| 299 Profiler::InitProfilingForIsolate(I); | |
| 300 | |
| 301 const Error& error = Error::Handle(Object::Init(I)); | 298 const Error& error = Error::Handle(Object::Init(I)); |
| 302 if (!error.IsNull()) { | 299 if (!error.IsNull()) { |
| 303 return error.raw(); | 300 return error.raw(); |
| 304 } | 301 } |
| 305 if (snapshot_buffer != NULL) { | 302 if (snapshot_buffer != NULL) { |
| 306 // Read the snapshot and setup the initial state. | 303 // Read the snapshot and setup the initial state. |
| 307 TimelineDurationScope tds( | 304 TimelineDurationScope tds( |
| 308 T, I->GetIsolateStream(), "IsolateSnapshotReader"); | 305 T, I->GetIsolateStream(), "IsolateSnapshotReader"); |
| 309 // TODO(turnidge): Remove once length is not part of the snapshot. | 306 // TODO(turnidge): Remove once length is not part of the snapshot. |
| 310 const Snapshot* snapshot = Snapshot::SetupFromBuffer(snapshot_buffer); | 307 const Snapshot* snapshot = Snapshot::SetupFromBuffer(snapshot_buffer); |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 return predefined_handles_->handles_.IsValidScopedHandle(address); | 418 return predefined_handles_->handles_.IsValidScopedHandle(address); |
| 422 } | 419 } |
| 423 | 420 |
| 424 | 421 |
| 425 bool Dart::IsReadOnlyApiHandle(Dart_Handle handle) { | 422 bool Dart::IsReadOnlyApiHandle(Dart_Handle handle) { |
| 426 ASSERT(predefined_handles_ != NULL); | 423 ASSERT(predefined_handles_ != NULL); |
| 427 return predefined_handles_->api_handles_.IsValidHandle(handle); | 424 return predefined_handles_->api_handles_.IsValidHandle(handle); |
| 428 } | 425 } |
| 429 | 426 |
| 430 } // namespace dart | 427 } // namespace dart |
| OLD | NEW |