Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Side by Side Diff: runtime/vm/dart.cc

Issue 10990028: Add code for CPU feature detection and use it to detect SSE3 and SSE 4.1. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: addressed comments Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/assembler_x64.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 ASSERT(Flags::Initialized()); 69 ASSERT(Flags::Initialized());
70 vm_isolate_ = Isolate::Init("vm-isolate"); 70 vm_isolate_ = Isolate::Init("vm-isolate");
71 Zone zone(vm_isolate_); 71 Zone 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();
80 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64)
81 // Dart VM requires at least SSE3.
82 if (!CPUFeatures::sse3_supported()) return false;
83 #endif
79 PremarkingVisitor premarker(vm_isolate_); 84 PremarkingVisitor premarker(vm_isolate_);
80 vm_isolate_->heap()->IterateOldObjects(&premarker); 85 vm_isolate_->heap()->IterateOldObjects(&premarker);
81 vm_isolate_->heap()->WriteProtect(true); 86 vm_isolate_->heap()->WriteProtect(true);
82 } 87 }
83 Isolate::SetCurrent(NULL); // Unregister the VM isolate from this thread. 88 Isolate::SetCurrent(NULL); // Unregister the VM isolate from this thread.
84 Isolate::SetCreateCallback(create); 89 Isolate::SetCreateCallback(create);
85 Isolate::SetInterruptCallback(interrupt); 90 Isolate::SetInterruptCallback(interrupt);
86 Isolate::SetShutdownCallback(shutdown); 91 Isolate::SetShutdownCallback(shutdown);
87 return true; 92 return true;
88 } 93 }
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 isolate->Shutdown(); 180 isolate->Shutdown();
176 delete isolate; 181 delete isolate;
177 182
178 Dart_IsolateShutdownCallback callback = Isolate::ShutdownCallback(); 183 Dart_IsolateShutdownCallback callback = Isolate::ShutdownCallback();
179 if (callback != NULL) { 184 if (callback != NULL) {
180 (callback)(callback_data); 185 (callback)(callback_data);
181 } 186 }
182 } 187 }
183 188
184 } // namespace dart 189 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/assembler_x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698