| OLD | NEW |
| 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 #include <stdlib.h> | 5 #include <stdlib.h> |
| 6 #include <string.h> | 6 #include <string.h> |
| 7 #include <stdio.h> | 7 #include <stdio.h> |
| 8 | 8 |
| 9 #include "include/dart_api.h" | 9 #include "include/dart_api.h" |
| 10 #include "include/dart_tools_api.h" | 10 #include "include/dart_tools_api.h" |
| (...skipping 1617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1628 ReadSnapshotFile(NULL, vm_snapshot_fname, &vm_isolate_snapshot_buffer); | 1628 ReadSnapshotFile(NULL, vm_snapshot_fname, &vm_isolate_snapshot_buffer); |
| 1629 ReadSnapshotFile(NULL, isolate_snapshot_fname, &isolate_snapshot_buffer); | 1629 ReadSnapshotFile(NULL, isolate_snapshot_fname, &isolate_snapshot_buffer); |
| 1630 delete vm_snapshot_fname; | 1630 delete vm_snapshot_fname; |
| 1631 delete isolate_snapshot_fname; | 1631 delete isolate_snapshot_fname; |
| 1632 } | 1632 } |
| 1633 | 1633 |
| 1634 // Initialize the Dart VM. | 1634 // Initialize the Dart VM. |
| 1635 char* error = Dart_Initialize( | 1635 char* error = Dart_Initialize( |
| 1636 vm_isolate_snapshot_buffer, instructions_snapshot, data_snapshot, | 1636 vm_isolate_snapshot_buffer, instructions_snapshot, data_snapshot, |
| 1637 CreateIsolateAndSetup, NULL, NULL, ShutdownIsolate, | 1637 CreateIsolateAndSetup, NULL, NULL, ShutdownIsolate, |
| 1638 NULL, |
| 1638 DartUtils::OpenFile, | 1639 DartUtils::OpenFile, |
| 1639 DartUtils::ReadFile, | 1640 DartUtils::ReadFile, |
| 1640 DartUtils::WriteFile, | 1641 DartUtils::WriteFile, |
| 1641 DartUtils::CloseFile, | 1642 DartUtils::CloseFile, |
| 1642 DartUtils::EntropySource, | 1643 DartUtils::EntropySource, |
| 1643 GetVMServiceAssetsArchiveCallback); | 1644 GetVMServiceAssetsArchiveCallback); |
| 1644 if (error != NULL) { | 1645 if (error != NULL) { |
| 1645 if (do_vm_shutdown) { | 1646 if (do_vm_shutdown) { |
| 1646 EventHandler::Stop(); | 1647 EventHandler::Stop(); |
| 1647 } | 1648 } |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1694 Platform::Exit(Process::GlobalExitCode()); | 1695 Platform::Exit(Process::GlobalExitCode()); |
| 1695 } | 1696 } |
| 1696 | 1697 |
| 1697 } // namespace bin | 1698 } // namespace bin |
| 1698 } // namespace dart | 1699 } // namespace dart |
| 1699 | 1700 |
| 1700 int main(int argc, char** argv) { | 1701 int main(int argc, char** argv) { |
| 1701 dart::bin::main(argc, argv); | 1702 dart::bin::main(argc, argv); |
| 1702 UNREACHABLE(); | 1703 UNREACHABLE(); |
| 1703 } | 1704 } |
| OLD | NEW |