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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 if (vm_isolate_ != NULL || !Flags::Initialized()) { | 86 if (vm_isolate_ != NULL || !Flags::Initialized()) { |
87 return "VM already initialized or flags not initialized."; | 87 return "VM already initialized or flags not initialized."; |
88 } | 88 } |
89 Isolate::SetFileCallbacks(file_open, file_read, file_write, file_close); | 89 Isolate::SetFileCallbacks(file_open, file_read, file_write, file_close); |
90 Isolate::SetEntropySourceCallback(entropy_source); | 90 Isolate::SetEntropySourceCallback(entropy_source); |
91 OS::InitOnce(); | 91 OS::InitOnce(); |
92 VirtualMemory::InitOnce(); | 92 VirtualMemory::InitOnce(); |
93 Thread::InitOnceBeforeIsolate(); | 93 Thread::InitOnceBeforeIsolate(); |
94 Thread::EnsureInit(); | 94 Thread::EnsureInit(); |
95 Timeline::InitOnce(); | 95 Timeline::InitOnce(); |
| 96 Thread* thread = Thread::Current(); |
| 97 thread->set_name("Dart_Initialize"); |
96 TimelineDurationScope tds(Timeline::GetVMStream(), | 98 TimelineDurationScope tds(Timeline::GetVMStream(), |
97 "Dart::InitOnce"); | 99 "Dart::InitOnce"); |
98 Isolate::InitOnce(); | 100 Isolate::InitOnce(); |
99 PortMap::InitOnce(); | 101 PortMap::InitOnce(); |
100 FreeListElement::InitOnce(); | 102 FreeListElement::InitOnce(); |
101 Api::InitOnce(); | 103 Api::InitOnce(); |
102 CodeObservers::InitOnce(); | 104 CodeObservers::InitOnce(); |
103 ThreadInterrupter::InitOnce(); | 105 ThreadInterrupter::InitOnce(); |
104 Profiler::InitOnce(); | 106 Profiler::InitOnce(); |
105 SemiSpace::InitOnce(); | 107 SemiSpace::InitOnce(); |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 return predefined_handles_->handles_.IsValidScopedHandle(address); | 436 return predefined_handles_->handles_.IsValidScopedHandle(address); |
435 } | 437 } |
436 | 438 |
437 | 439 |
438 bool Dart::IsReadOnlyApiHandle(Dart_Handle handle) { | 440 bool Dart::IsReadOnlyApiHandle(Dart_Handle handle) { |
439 ASSERT(predefined_handles_ != NULL); | 441 ASSERT(predefined_handles_ != NULL); |
440 return predefined_handles_->api_handles_.IsValidHandle(handle); | 442 return predefined_handles_->api_handles_.IsValidHandle(handle); |
441 } | 443 } |
442 | 444 |
443 } // namespace dart | 445 } // namespace dart |
OLD | NEW |