| 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 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1162 // Setup the native resolver. | 1162 // Setup the native resolver. |
| 1163 Builtin::LoadAndCheckLibrary(Builtin::kBuiltinLibrary); | 1163 Builtin::LoadAndCheckLibrary(Builtin::kBuiltinLibrary); |
| 1164 Builtin::LoadAndCheckLibrary(Builtin::kIOLibrary); | 1164 Builtin::LoadAndCheckLibrary(Builtin::kIOLibrary); |
| 1165 if (Dart_IsError(result)) { | 1165 if (Dart_IsError(result)) { |
| 1166 Log::PrintErr("Error: Could not set tag handler for service isolate"); | 1166 Log::PrintErr("Error: Could not set tag handler for service isolate"); |
| 1167 return NULL; | 1167 return NULL; |
| 1168 } | 1168 } |
| 1169 CHECK_RESULT(result); | 1169 CHECK_RESULT(result); |
| 1170 ASSERT(Dart_IsServiceIsolate(isolate)); | 1170 ASSERT(Dart_IsServiceIsolate(isolate)); |
| 1171 // Load embedder specific bits and return. Will not start http server. | 1171 // Load embedder specific bits and return. Will not start http server. |
| 1172 if (!VmService::Setup("127.0.0.1", -1, false /* running_precompiled */)) { | 1172 if (!VmService::Setup("127.0.0.1", |
| 1173 -1, |
| 1174 false /* running_precompiled */, |
| 1175 false /* server dev mode */)) { |
| 1173 *error = strdup(VmService::GetErrorMessage()); | 1176 *error = strdup(VmService::GetErrorMessage()); |
| 1174 return NULL; | 1177 return NULL; |
| 1175 } | 1178 } |
| 1176 Dart_ExitScope(); | 1179 Dart_ExitScope(); |
| 1177 Dart_ExitIsolate(); | 1180 Dart_ExitIsolate(); |
| 1178 return isolate; | 1181 return isolate; |
| 1179 } | 1182 } |
| 1180 | 1183 |
| 1181 | 1184 |
| 1182 int main(int argc, char** argv) { | 1185 int main(int argc, char** argv) { |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1350 EventHandler::Stop(); | 1353 EventHandler::Stop(); |
| 1351 return 0; | 1354 return 0; |
| 1352 } | 1355 } |
| 1353 | 1356 |
| 1354 } // namespace bin | 1357 } // namespace bin |
| 1355 } // namespace dart | 1358 } // namespace dart |
| 1356 | 1359 |
| 1357 int main(int argc, char** argv) { | 1360 int main(int argc, char** argv) { |
| 1358 return dart::bin::main(argc, argv); | 1361 return dart::bin::main(argc, argv); |
| 1359 } | 1362 } |
| OLD | NEW |