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