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/dart_api_state.h" | 8 #include "vm/dart_api_state.h" |
9 #include "vm/dart_entry.h" | 9 #include "vm/dart_entry.h" |
10 #include "vm/flags.h" | 10 #include "vm/flags.h" |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 #endif | 99 #endif |
100 // Create the read-only handles area. | 100 // Create the read-only handles area. |
101 ASSERT(predefined_handles_ == NULL); | 101 ASSERT(predefined_handles_ == NULL); |
102 predefined_handles_ = new ReadOnlyHandles(); | 102 predefined_handles_ = new ReadOnlyHandles(); |
103 // Create the VM isolate and finish the VM initialization. | 103 // Create the VM isolate and finish the VM initialization. |
104 ASSERT(thread_pool_ == NULL); | 104 ASSERT(thread_pool_ == NULL); |
105 thread_pool_ = new ThreadPool(); | 105 thread_pool_ = new ThreadPool(); |
106 { | 106 { |
107 ASSERT(vm_isolate_ == NULL); | 107 ASSERT(vm_isolate_ == NULL); |
108 ASSERT(Flags::Initialized()); | 108 ASSERT(Flags::Initialized()); |
109 vm_isolate_ = Isolate::Init("vm-isolate"); | 109 vm_isolate_ = Isolate::Init("vm-isolate", true); |
110 StackZone zone(vm_isolate_); | 110 StackZone zone(vm_isolate_); |
111 HandleScope handle_scope(vm_isolate_); | 111 HandleScope handle_scope(vm_isolate_); |
112 Heap::Init(vm_isolate_); | 112 Heap::Init(vm_isolate_); |
113 ObjectStore::Init(vm_isolate_); | 113 ObjectStore::Init(vm_isolate_); |
114 Object::InitOnce(); | 114 Object::InitOnce(); |
115 ArgumentsDescriptor::InitOnce(); | 115 ArgumentsDescriptor::InitOnce(); |
116 StubCode::InitOnce(); | 116 StubCode::InitOnce(); |
117 Scanner::InitOnce(); | 117 Scanner::InitOnce(); |
118 Symbols::InitOnce(vm_isolate_); | 118 Symbols::InitOnce(vm_isolate_); |
119 Object::CreateInternalMetaData(); | 119 Object::CreateInternalMetaData(); |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 return predefined_handles_->handles_.AllocateScopedHandle(); | 224 return predefined_handles_->handles_.AllocateScopedHandle(); |
225 } | 225 } |
226 | 226 |
227 | 227 |
228 bool Dart::IsReadOnlyHandle(uword address) { | 228 bool Dart::IsReadOnlyHandle(uword address) { |
229 ASSERT(predefined_handles_ != NULL); | 229 ASSERT(predefined_handles_ != NULL); |
230 return predefined_handles_->handles_.IsValidScopedHandle(address); | 230 return predefined_handles_->handles_.IsValidScopedHandle(address); |
231 } | 231 } |
232 | 232 |
233 } // namespace dart | 233 } // namespace dart |
OLD | NEW |