| 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 <stdio.h> | 8 #include <stdio.h> |
| 9 #include <stdlib.h> | 9 #include <stdlib.h> |
| 10 #include <string.h> | 10 #include <string.h> |
| (...skipping 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1034 // snasphot is generated from a script (app_script_name != NULL) we will | 1034 // snasphot is generated from a script (app_script_name != NULL) we will |
| 1035 // need the service isolate to resolve URI and load code. | 1035 // need the service isolate to resolve URI and load code. |
| 1036 char* error = Dart_Initialize( | 1036 char* error = Dart_Initialize( |
| 1037 NULL, | 1037 NULL, |
| 1038 NULL, | 1038 NULL, |
| 1039 NULL, | 1039 NULL, |
| 1040 (app_script_name != NULL) ? CreateServiceIsolate : NULL, | 1040 (app_script_name != NULL) ? CreateServiceIsolate : NULL, |
| 1041 NULL, | 1041 NULL, |
| 1042 NULL, | 1042 NULL, |
| 1043 NULL, | 1043 NULL, |
| 1044 NULL, |
| 1044 DartUtils::OpenFile, | 1045 DartUtils::OpenFile, |
| 1045 DartUtils::ReadFile, | 1046 DartUtils::ReadFile, |
| 1046 DartUtils::WriteFile, | 1047 DartUtils::WriteFile, |
| 1047 DartUtils::CloseFile, | 1048 DartUtils::CloseFile, |
| 1048 DartUtils::EntropySource, | 1049 DartUtils::EntropySource, |
| 1049 NULL); | 1050 NULL); |
| 1050 if (error != NULL) { | 1051 if (error != NULL) { |
| 1051 Log::PrintErr("VM initialization failed: %s\n", error); | 1052 Log::PrintErr("VM initialization failed: %s\n", error); |
| 1052 free(error); | 1053 free(error); |
| 1053 return 255; | 1054 return 255; |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1151 EventHandler::Stop(); | 1152 EventHandler::Stop(); |
| 1152 return 0; | 1153 return 0; |
| 1153 } | 1154 } |
| 1154 | 1155 |
| 1155 } // namespace bin | 1156 } // namespace bin |
| 1156 } // namespace dart | 1157 } // namespace dart |
| 1157 | 1158 |
| 1158 int main(int argc, char** argv) { | 1159 int main(int argc, char** argv) { |
| 1159 return dart::bin::main(argc, argv); | 1160 return dart::bin::main(argc, argv); |
| 1160 } | 1161 } |
| OLD | NEW |