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 1410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1421 Log::PrintErr("Error: Could not set tag handler for service isolate\n"); | 1421 Log::PrintErr("Error: Could not set tag handler for service isolate\n"); |
1422 return NULL; | 1422 return NULL; |
1423 } | 1423 } |
1424 // Setup the native resolver. | 1424 // Setup the native resolver. |
1425 Builtin::LoadAndCheckLibrary(Builtin::kBuiltinLibrary); | 1425 Builtin::LoadAndCheckLibrary(Builtin::kBuiltinLibrary); |
1426 Builtin::LoadAndCheckLibrary(Builtin::kIOLibrary); | 1426 Builtin::LoadAndCheckLibrary(Builtin::kIOLibrary); |
1427 | 1427 |
1428 ASSERT(Dart_IsServiceIsolate(isolate)); | 1428 ASSERT(Dart_IsServiceIsolate(isolate)); |
1429 // Load embedder specific bits and return. Will not start http server. | 1429 // Load embedder specific bits and return. Will not start http server. |
1430 if (!VmService::Setup("127.0.0.1", -1, false /* running_precompiled */, | 1430 if (!VmService::Setup("127.0.0.1", -1, false /* running_precompiled */, |
1431 false /* server dev mode */)) { | 1431 false /* server dev mode */, |
| 1432 false /* trace_loading */)) { |
1432 *error = strdup(VmService::GetErrorMessage()); | 1433 *error = strdup(VmService::GetErrorMessage()); |
1433 return NULL; | 1434 return NULL; |
1434 } | 1435 } |
1435 Dart_ExitScope(); | 1436 Dart_ExitScope(); |
1436 Dart_ExitIsolate(); | 1437 Dart_ExitIsolate(); |
1437 return isolate; | 1438 return isolate; |
1438 } | 1439 } |
1439 | 1440 |
1440 | 1441 |
1441 int main(int argc, char** argv) { | 1442 int main(int argc, char** argv) { |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1698 delete mapped_isolate_snapshot_data; | 1699 delete mapped_isolate_snapshot_data; |
1699 return 0; | 1700 return 0; |
1700 } | 1701 } |
1701 | 1702 |
1702 } // namespace bin | 1703 } // namespace bin |
1703 } // namespace dart | 1704 } // namespace dart |
1704 | 1705 |
1705 int main(int argc, char** argv) { | 1706 int main(int argc, char** argv) { |
1706 return dart::bin::main(argc, argv); | 1707 return dart::bin::main(argc, argv); |
1707 } | 1708 } |
OLD | NEW |