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