| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 vm_isolate_ = Isolate::Init("vm-isolate"); | 106 vm_isolate_ = Isolate::Init("vm-isolate"); |
| 107 StackZone zone(vm_isolate_); | 107 StackZone zone(vm_isolate_); |
| 108 HandleScope handle_scope(vm_isolate_); | 108 HandleScope handle_scope(vm_isolate_); |
| 109 Heap::Init(vm_isolate_); | 109 Heap::Init(vm_isolate_); |
| 110 ObjectStore::Init(vm_isolate_); | 110 ObjectStore::Init(vm_isolate_); |
| 111 Object::InitOnce(); | 111 Object::InitOnce(); |
| 112 ArgumentsDescriptor::InitOnce(); | 112 ArgumentsDescriptor::InitOnce(); |
| 113 StubCode::InitOnce(); | 113 StubCode::InitOnce(); |
| 114 Scanner::InitOnce(); | 114 Scanner::InitOnce(); |
| 115 Symbols::InitOnce(vm_isolate_); | 115 Symbols::InitOnce(vm_isolate_); |
| 116 Object::CreateInternalMetaData(); |
| 116 CPUFeatures::InitOnce(); | 117 CPUFeatures::InitOnce(); |
| 117 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64) | 118 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64) |
| 118 // Dart VM requires at least SSE2. | 119 // Dart VM requires at least SSE2. |
| 119 if (!CPUFeatures::sse2_supported()) { | 120 if (!CPUFeatures::sse2_supported()) { |
| 120 return "SSE2 is required."; | 121 return "SSE2 is required."; |
| 121 } | 122 } |
| 122 #endif | 123 #endif |
| 123 PremarkingVisitor premarker(vm_isolate_); | 124 PremarkingVisitor premarker(vm_isolate_); |
| 124 vm_isolate_->heap()->IterateOldObjects(&premarker); | 125 vm_isolate_->heap()->IterateOldObjects(&premarker); |
| 125 vm_isolate_->heap()->WriteProtect(true); | 126 vm_isolate_->heap()->WriteProtect(true); |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 return predefined_handles_->handles_.AllocateScopedHandle(); | 245 return predefined_handles_->handles_.AllocateScopedHandle(); |
| 245 } | 246 } |
| 246 | 247 |
| 247 | 248 |
| 248 bool Dart::IsReadOnlyHandle(uword address) { | 249 bool Dart::IsReadOnlyHandle(uword address) { |
| 249 ASSERT(predefined_handles_ != NULL); | 250 ASSERT(predefined_handles_ != NULL); |
| 250 return predefined_handles_->handles_.IsValidScopedHandle(address); | 251 return predefined_handles_->handles_.IsValidScopedHandle(address); |
| 251 } | 252 } |
| 252 | 253 |
| 253 } // namespace dart | 254 } // namespace dart |
| OLD | NEW |