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

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

Issue 584023004: Service isolate rework (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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/io_impl_sources.gypi » ('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 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 Dart_SetVMFlags(vm_options.count(), vm_options.arguments()); 508 Dart_SetVMFlags(vm_options.count(), vm_options.arguments());
509 509
510 // Initialize the Dart VM. 510 // Initialize the Dart VM.
511 // Note: We don't expect isolates to be created from dart code during 511 // Note: We don't expect isolates to be created from dart code during
512 // snapshot generation. 512 // snapshot generation.
513 if (!Dart_Initialize(NULL, NULL, NULL, NULL, 513 if (!Dart_Initialize(NULL, NULL, NULL, NULL,
514 DartUtils::OpenFile, 514 DartUtils::OpenFile,
515 DartUtils::ReadFile, 515 DartUtils::ReadFile,
516 DartUtils::WriteFile, 516 DartUtils::WriteFile,
517 DartUtils::CloseFile, 517 DartUtils::CloseFile,
518 DartUtils::EntropySource, 518 DartUtils::EntropySource)) {
519 NULL)) {
520 Log::PrintErr("VM initialization failed\n"); 519 Log::PrintErr("VM initialization failed\n");
521 return 255; 520 return 255;
522 } 521 }
523 522
524 char* error; 523 char* error;
525 Dart_Isolate isolate = Dart_CreateIsolate(NULL, NULL, NULL, NULL, &error); 524 Dart_Isolate isolate = Dart_CreateIsolate(NULL, NULL, NULL, NULL, &error);
526 if (isolate == NULL) { 525 if (isolate == NULL) {
527 Log::PrintErr("Error: %s", error); 526 Log::PrintErr("Error: %s", error);
528 free(error); 527 free(error);
529 exit(255); 528 exit(255);
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 } 588 }
590 return 0; 589 return 0;
591 } 590 }
592 591
593 } // namespace bin 592 } // namespace bin
594 } // namespace dart 593 } // namespace dart
595 594
596 int main(int argc, char** argv) { 595 int main(int argc, char** argv) {
597 return dart::bin::main(argc, argv); 596 return dart::bin::main(argc, argv);
598 } 597 }
OLDNEW
« no previous file with comments | « runtime/bin/dartutils.cc ('k') | runtime/bin/io_impl_sources.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698