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 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 tds.CopyArgument(0, "isolateName", I->name()); | 291 tds.CopyArgument(0, "isolateName", I->name()); |
292 | 292 |
293 ASSERT(I != NULL); | 293 ASSERT(I != NULL); |
294 StackZone zone(T); | 294 StackZone zone(T); |
295 HandleScope handle_scope(T); | 295 HandleScope handle_scope(T); |
296 { | 296 { |
297 TimelineDurationScope tds(T, I->GetIsolateStream(), "ObjectStore::Init"); | 297 TimelineDurationScope tds(T, I->GetIsolateStream(), "ObjectStore::Init"); |
298 ObjectStore::Init(I); | 298 ObjectStore::Init(I); |
299 } | 299 } |
300 | 300 |
| 301 // Setup for profiling. |
| 302 Profiler::InitProfilingForIsolate(I); |
| 303 |
301 const Error& error = Error::Handle(Object::Init(I)); | 304 const Error& error = Error::Handle(Object::Init(I)); |
302 if (!error.IsNull()) { | 305 if (!error.IsNull()) { |
303 return error.raw(); | 306 return error.raw(); |
304 } | 307 } |
305 if (snapshot_buffer != NULL) { | 308 if (snapshot_buffer != NULL) { |
306 // Read the snapshot and setup the initial state. | 309 // Read the snapshot and setup the initial state. |
307 TimelineDurationScope tds( | 310 TimelineDurationScope tds( |
308 T, I->GetIsolateStream(), "IsolateSnapshotReader"); | 311 T, I->GetIsolateStream(), "IsolateSnapshotReader"); |
309 // TODO(turnidge): Remove once length is not part of the snapshot. | 312 // TODO(turnidge): Remove once length is not part of the snapshot. |
310 const Snapshot* snapshot = Snapshot::SetupFromBuffer(snapshot_buffer); | 313 const Snapshot* snapshot = Snapshot::SetupFromBuffer(snapshot_buffer); |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 return predefined_handles_->handles_.IsValidScopedHandle(address); | 435 return predefined_handles_->handles_.IsValidScopedHandle(address); |
433 } | 436 } |
434 | 437 |
435 | 438 |
436 bool Dart::IsReadOnlyApiHandle(Dart_Handle handle) { | 439 bool Dart::IsReadOnlyApiHandle(Dart_Handle handle) { |
437 ASSERT(predefined_handles_ != NULL); | 440 ASSERT(predefined_handles_ != NULL); |
438 return predefined_handles_->api_handles_.IsValidHandle(handle); | 441 return predefined_handles_->api_handles_.IsValidHandle(handle); |
439 } | 442 } |
440 | 443 |
441 } // namespace dart | 444 } // namespace dart |
OLD | NEW |