| 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/dart_api_state.h" | 7 #include "vm/dart_api_state.h" |
| 8 #include "vm/flags.h" | 8 #include "vm/flags.h" |
| 9 #include "vm/freelist.h" | 9 #include "vm/freelist.h" |
| 10 #include "vm/handles.h" | 10 #include "vm/handles.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 StackZone zone(vm_isolate_); | 71 StackZone zone(vm_isolate_); |
| 72 HandleScope handle_scope(vm_isolate_); | 72 HandleScope handle_scope(vm_isolate_); |
| 73 Heap::Init(vm_isolate_); | 73 Heap::Init(vm_isolate_); |
| 74 ObjectStore::Init(vm_isolate_); | 74 ObjectStore::Init(vm_isolate_); |
| 75 Object::InitOnce(); | 75 Object::InitOnce(); |
| 76 StubCode::InitOnce(); | 76 StubCode::InitOnce(); |
| 77 Scanner::InitOnce(); | 77 Scanner::InitOnce(); |
| 78 Symbols::InitOnce(vm_isolate_); | 78 Symbols::InitOnce(vm_isolate_); |
| 79 CPUFeatures::InitOnce(); | 79 CPUFeatures::InitOnce(); |
| 80 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64) | 80 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64) |
| 81 // Dart VM requires at least SSE3. | 81 // Dart VM requires at least SSE2. |
| 82 if (!CPUFeatures::sse3_supported()) { | 82 if (!CPUFeatures::sse2_supported()) { |
| 83 return "SSE3 is required."; | 83 return "SSE2 is required."; |
| 84 } | 84 } |
| 85 #endif | 85 #endif |
| 86 PremarkingVisitor premarker(vm_isolate_); | 86 PremarkingVisitor premarker(vm_isolate_); |
| 87 vm_isolate_->heap()->IterateOldObjects(&premarker); | 87 vm_isolate_->heap()->IterateOldObjects(&premarker); |
| 88 vm_isolate_->heap()->WriteProtect(true); | 88 vm_isolate_->heap()->WriteProtect(true); |
| 89 } | 89 } |
| 90 Isolate::SetCurrent(NULL); // Unregister the VM isolate from this thread. | 90 Isolate::SetCurrent(NULL); // Unregister the VM isolate from this thread. |
| 91 Isolate::SetCreateCallback(create); | 91 Isolate::SetCreateCallback(create); |
| 92 Isolate::SetInterruptCallback(interrupt); | 92 Isolate::SetInterruptCallback(interrupt); |
| 93 Isolate::SetShutdownCallback(shutdown); | 93 Isolate::SetShutdownCallback(shutdown); |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 isolate->Shutdown(); | 185 isolate->Shutdown(); |
| 186 delete isolate; | 186 delete isolate; |
| 187 | 187 |
| 188 Dart_IsolateShutdownCallback callback = Isolate::ShutdownCallback(); | 188 Dart_IsolateShutdownCallback callback = Isolate::ShutdownCallback(); |
| 189 if (callback != NULL) { | 189 if (callback != NULL) { |
| 190 (callback)(callback_data); | 190 (callback)(callback_data); |
| 191 } | 191 } |
| 192 } | 192 } |
| 193 | 193 |
| 194 } // namespace dart | 194 } // namespace dart |
| OLD | NEW |