| 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 Heap::Init(vm_isolate_, | 127 Heap::Init(vm_isolate_, |
| 128 0, // New gen size 0; VM isolate should only allocate in old. | 128 0, // New gen size 0; VM isolate should only allocate in old. |
| 129 FLAG_old_gen_heap_size * MBInWords); | 129 FLAG_old_gen_heap_size * MBInWords); |
| 130 ObjectStore::Init(vm_isolate_); | 130 ObjectStore::Init(vm_isolate_); |
| 131 TargetCPUFeatures::InitOnce(); | 131 TargetCPUFeatures::InitOnce(); |
| 132 Object::InitOnce(); | 132 Object::InitOnce(); |
| 133 ArgumentsDescriptor::InitOnce(); | 133 ArgumentsDescriptor::InitOnce(); |
| 134 StubCode::InitOnce(); | 134 StubCode::InitOnce(); |
| 135 Symbols::InitOnce(vm_isolate_); | 135 Symbols::InitOnce(vm_isolate_); |
| 136 Scanner::InitOnce(); | 136 Scanner::InitOnce(); |
| 137 Object::CreateInternalMetaData(); | |
| 138 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64) | 137 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64) |
| 139 // Dart VM requires at least SSE2. | 138 // Dart VM requires at least SSE2. |
| 140 if (!TargetCPUFeatures::sse2_supported()) { | 139 if (!TargetCPUFeatures::sse2_supported()) { |
| 141 return "SSE2 is required."; | 140 return "SSE2 is required."; |
| 142 } | 141 } |
| 143 #endif | 142 #endif |
| 144 PremarkingVisitor premarker(vm_isolate_); | 143 PremarkingVisitor premarker(vm_isolate_); |
| 145 vm_isolate_->heap()->WriteProtect(false); | 144 vm_isolate_->heap()->WriteProtect(false); |
| 146 ASSERT(vm_isolate_->heap()->UsedInWords(Heap::kNew) == 0); | 145 ASSERT(vm_isolate_->heap()->UsedInWords(Heap::kNew) == 0); |
| 147 vm_isolate_->heap()->IterateOldObjects(&premarker); | 146 vm_isolate_->heap()->IterateOldObjects(&premarker); |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 return predefined_handles_->handles_.AllocateScopedHandle(); | 299 return predefined_handles_->handles_.AllocateScopedHandle(); |
| 301 } | 300 } |
| 302 | 301 |
| 303 | 302 |
| 304 bool Dart::IsReadOnlyHandle(uword address) { | 303 bool Dart::IsReadOnlyHandle(uword address) { |
| 305 ASSERT(predefined_handles_ != NULL); | 304 ASSERT(predefined_handles_ != NULL); |
| 306 return predefined_handles_->handles_.IsValidScopedHandle(address); | 305 return predefined_handles_->handles_.IsValidScopedHandle(address); |
| 307 } | 306 } |
| 308 | 307 |
| 309 } // namespace dart | 308 } // namespace dart |
| OLD | NEW |