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

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

Issue 125103004: Move service into VM (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 Dart_SetVMFlags(vm_options.count(), vm_options.arguments()); 493 Dart_SetVMFlags(vm_options.count(), vm_options.arguments());
494 494
495 // Initialize the Dart VM. 495 // Initialize the Dart VM.
496 // Note: We don't expect isolates to be created from dart code during 496 // Note: We don't expect isolates to be created from dart code during
497 // snapshot generation. 497 // snapshot generation.
498 if (!Dart_Initialize(NULL, NULL, NULL, NULL, 498 if (!Dart_Initialize(NULL, NULL, NULL, NULL,
499 DartUtils::OpenFile, 499 DartUtils::OpenFile,
500 DartUtils::ReadFile, 500 DartUtils::ReadFile,
501 DartUtils::WriteFile, 501 DartUtils::WriteFile,
502 DartUtils::CloseFile, 502 DartUtils::CloseFile,
503 DartUtils::EntropySource)) { 503 DartUtils::EntropySource,
504 NULL)) {
504 Log::PrintErr("VM initialization failed\n"); 505 Log::PrintErr("VM initialization failed\n");
505 return 255; 506 return 255;
506 } 507 }
507 508
508 char* error; 509 char* error;
509 Dart_Isolate isolate = Dart_CreateIsolate(NULL, NULL, NULL, NULL, &error); 510 Dart_Isolate isolate = Dart_CreateIsolate(NULL, NULL, NULL, NULL, &error);
510 if (isolate == NULL) { 511 if (isolate == NULL) {
511 Log::PrintErr("Error: %s", error); 512 Log::PrintErr("Error: %s", error);
512 free(error); 513 free(error);
513 exit(255); 514 exit(255);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 } 567 }
567 return 0; 568 return 0;
568 } 569 }
569 570
570 } // namespace bin 571 } // namespace bin
571 } // namespace dart 572 } // namespace dart
572 573
573 int main(int argc, char** argv) { 574 int main(int argc, char** argv) {
574 return dart::bin::main(argc, argv); 575 return dart::bin::main(argc, argv);
575 } 576 }
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