| 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 ASSERT(vm_isolate_ == NULL); | 109 ASSERT(vm_isolate_ == NULL); |
| 110 ASSERT(Flags::Initialized()); | 110 ASSERT(Flags::Initialized()); |
| 111 vm_isolate_ = Isolate::Init("vm-isolate"); | 111 vm_isolate_ = Isolate::Init("vm-isolate"); |
| 112 StackZone zone(vm_isolate_); | 112 StackZone zone(vm_isolate_); |
| 113 HandleScope handle_scope(vm_isolate_); | 113 HandleScope handle_scope(vm_isolate_); |
| 114 Heap::Init(vm_isolate_); | 114 Heap::Init(vm_isolate_); |
| 115 ObjectStore::Init(vm_isolate_); | 115 ObjectStore::Init(vm_isolate_); |
| 116 Object::InitOnce(); | 116 Object::InitOnce(); |
| 117 ArgumentsDescriptor::InitOnce(); | 117 ArgumentsDescriptor::InitOnce(); |
| 118 StubCode::InitOnce(); | 118 StubCode::InitOnce(); |
| 119 Symbols::InitOnce(vm_isolate_); |
| 119 Scanner::InitOnce(); | 120 Scanner::InitOnce(); |
| 120 Symbols::InitOnce(vm_isolate_); | |
| 121 Object::CreateInternalMetaData(); | 121 Object::CreateInternalMetaData(); |
| 122 CPUFeatures::InitOnce(); | 122 CPUFeatures::InitOnce(); |
| 123 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64) | 123 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64) |
| 124 // Dart VM requires at least SSE2. | 124 // Dart VM requires at least SSE2. |
| 125 if (!CPUFeatures::sse2_supported()) { | 125 if (!CPUFeatures::sse2_supported()) { |
| 126 return "SSE2 is required."; | 126 return "SSE2 is required."; |
| 127 } | 127 } |
| 128 #endif | 128 #endif |
| 129 PremarkingVisitor premarker(vm_isolate_); | 129 PremarkingVisitor premarker(vm_isolate_); |
| 130 vm_isolate_->heap()->IterateOldObjects(&premarker); | 130 vm_isolate_->heap()->IterateOldObjects(&premarker); |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 return predefined_handles_->handles_.AllocateScopedHandle(); | 267 return predefined_handles_->handles_.AllocateScopedHandle(); |
| 268 } | 268 } |
| 269 | 269 |
| 270 | 270 |
| 271 bool Dart::IsReadOnlyHandle(uword address) { | 271 bool Dart::IsReadOnlyHandle(uword address) { |
| 272 ASSERT(predefined_handles_ != NULL); | 272 ASSERT(predefined_handles_ != NULL); |
| 273 return predefined_handles_->handles_.IsValidScopedHandle(address); | 273 return predefined_handles_->handles_.IsValidScopedHandle(address); |
| 274 } | 274 } |
| 275 | 275 |
| 276 } // namespace dart | 276 } // namespace dart |
| OLD | NEW |