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

Side by Side Diff: runtime/bin/gen_snapshot.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 | « no previous file | runtime/bin/main.cc » ('j') | 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 // Generate a snapshot file after loading all the scripts specified on the 5 // Generate a snapshot file after loading all the scripts specified on the
6 // command line. 6 // command line.
7 7
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <string.h> 9 #include <string.h>
10 #include <stdio.h> 10 #include <stdio.h>
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 return 255; 292 return 255;
293 } 293 }
294 294
295 DartUtils::SetOriginalWorkingDirectory(); 295 DartUtils::SetOriginalWorkingDirectory();
296 296
297 Dart_SetVMFlags(vm_options.count(), vm_options.arguments()); 297 Dart_SetVMFlags(vm_options.count(), vm_options.arguments());
298 298
299 // Initialize the Dart VM. 299 // Initialize the Dart VM.
300 // Note: We don't expect isolates to be created from dart code during 300 // Note: We don't expect isolates to be created from dart code during
301 // snapshot generation. 301 // snapshot generation.
302 Dart_Initialize(NULL, NULL, NULL); 302 if (!Dart_Initialize(NULL, NULL, NULL)) {
303 fprintf(stderr, "VM initialization failed\n");
304 return 255;
305 }
303 306
304 char* error; 307 char* error;
305 Dart_Isolate isolate = Dart_CreateIsolate(NULL, NULL, NULL, NULL, &error); 308 Dart_Isolate isolate = Dart_CreateIsolate(NULL, NULL, NULL, NULL, &error);
306 if (isolate == NULL) { 309 if (isolate == NULL) {
307 fprintf(stderr, "Error: %s", error); 310 fprintf(stderr, "Error: %s", error);
308 free(error); 311 free(error);
309 exit(255); 312 exit(255);
310 } 313 }
311 314
312 Dart_Handle result; 315 Dart_Handle result;
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 384
382 // Now create and write snapshot of script. 385 // Now create and write snapshot of script.
383 CreateAndWriteSnapshot(true); 386 CreateAndWriteSnapshot(true);
384 } 387 }
385 } else { 388 } else {
386 SetupForGenericSnapshotCreation(); 389 SetupForGenericSnapshotCreation();
387 CreateAndWriteSnapshot(false); 390 CreateAndWriteSnapshot(false);
388 } 391 }
389 return 0; 392 return 0;
390 } 393 }
OLDNEW
« no previous file with comments | « no previous file | runtime/bin/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698