OLD | NEW |
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 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
537 | 537 |
538 vm_options.AddArgument("--load_deferred_eagerly"); | 538 vm_options.AddArgument("--load_deferred_eagerly"); |
539 // Workaround until issue 21620 is fixed. | 539 // Workaround until issue 21620 is fixed. |
540 // (https://github.com/dart-lang/sdk/issues/21620) | 540 // (https://github.com/dart-lang/sdk/issues/21620) |
541 vm_options.AddArgument("--no-concurrent_sweep"); | 541 vm_options.AddArgument("--no-concurrent_sweep"); |
542 Dart_SetVMFlags(vm_options.count(), vm_options.arguments()); | 542 Dart_SetVMFlags(vm_options.count(), vm_options.arguments()); |
543 | 543 |
544 // Initialize the Dart VM. | 544 // Initialize the Dart VM. |
545 // Note: We don't expect isolates to be created from dart code during | 545 // Note: We don't expect isolates to be created from dart code during |
546 // snapshot generation. | 546 // snapshot generation. |
547 if (!Dart_Initialize(NULL, | 547 if (!Dart_Initialize(NULL, NULL, |
548 NULL, NULL, NULL, NULL, | 548 NULL, NULL, NULL, NULL, |
549 DartUtils::OpenFile, | 549 DartUtils::OpenFile, |
550 DartUtils::ReadFile, | 550 DartUtils::ReadFile, |
551 DartUtils::WriteFile, | 551 DartUtils::WriteFile, |
552 DartUtils::CloseFile, | 552 DartUtils::CloseFile, |
553 DartUtils::EntropySource)) { | 553 DartUtils::EntropySource)) { |
554 Log::PrintErr("VM initialization failed\n"); | 554 Log::PrintErr("VM initialization failed\n"); |
555 return 255; | 555 return 255; |
556 } | 556 } |
557 | 557 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
631 } | 631 } |
632 return 0; | 632 return 0; |
633 } | 633 } |
634 | 634 |
635 } // namespace bin | 635 } // namespace bin |
636 } // namespace dart | 636 } // namespace dart |
637 | 637 |
638 int main(int argc, char** argv) { | 638 int main(int argc, char** argv) { |
639 return dart::bin::main(argc, argv); | 639 return dart::bin::main(argc, argv); |
640 } | 640 } |
OLD | NEW |