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

Side by Side Diff: runtime/bin/gen_snapshot.cc

Issue 14927003: Revert 22380 to investigate windows build break. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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/bin/dartutils.cc ('k') | 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) 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 // 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 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 } 459 }
460 460
461 DartUtils::SetOriginalWorkingDirectory(); 461 DartUtils::SetOriginalWorkingDirectory();
462 462
463 Dart_SetVMFlags(vm_options.count(), vm_options.arguments()); 463 Dart_SetVMFlags(vm_options.count(), vm_options.arguments());
464 464
465 // Initialize the Dart VM. 465 // Initialize the Dart VM.
466 // Note: We don't expect isolates to be created from dart code during 466 // Note: We don't expect isolates to be created from dart code during
467 // snapshot generation. 467 // snapshot generation.
468 if (!Dart_Initialize(NULL, NULL, NULL, NULL, 468 if (!Dart_Initialize(NULL, NULL, NULL, NULL,
469 DartUtils::OpenFile, 469 NULL, NULL, NULL)) {
470 DartUtils::ReadFile,
471 DartUtils::WriteFile,
472 DartUtils::CloseFile)) {
473 Log::PrintErr("VM initialization failed\n"); 470 Log::PrintErr("VM initialization failed\n");
474 return 255; 471 return 255;
475 } 472 }
476 473
477 char* error; 474 char* error;
478 Dart_Isolate isolate = Dart_CreateIsolate(NULL, NULL, NULL, NULL, &error); 475 Dart_Isolate isolate = Dart_CreateIsolate(NULL, NULL, NULL, NULL, &error);
479 if (isolate == NULL) { 476 if (isolate == NULL) {
480 Log::PrintErr("Error: %s", error); 477 Log::PrintErr("Error: %s", error);
481 free(error); 478 free(error);
482 exit(255); 479 exit(255);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 } 532 }
536 return 0; 533 return 0;
537 } 534 }
538 535
539 } // namespace bin 536 } // namespace bin
540 } // namespace dart 537 } // namespace dart
541 538
542 int main(int argc, char** argv) { 539 int main(int argc, char** argv) {
543 return dart::bin::main(argc, argv); 540 return dart::bin::main(argc, argv);
544 } 541 }
OLDNEW
« no previous file with comments | « runtime/bin/dartutils.cc ('k') | runtime/bin/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698