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 1430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1441 } | 1441 } |
1442 | 1442 |
1443 if (gen_snapshot_kind == kAppAOT) { | 1443 if (gen_snapshot_kind == kAppAOT) { |
1444 GenerateAppAOTSnapshot(); | 1444 GenerateAppAOTSnapshot(); |
1445 } else { | 1445 } else { |
1446 if (Dart_IsNull(root_lib)) { | 1446 if (Dart_IsNull(root_lib)) { |
1447 ErrorExit(kErrorExitCode, "Unable to find root library for '%s'\n", | 1447 ErrorExit(kErrorExitCode, "Unable to find root library for '%s'\n", |
1448 script_name); | 1448 script_name); |
1449 } | 1449 } |
1450 | 1450 |
| 1451 if (gen_snapshot_kind == kAppJIT) Dart_SortClasses(); |
| 1452 |
1451 // The helper function _getMainClosure creates a closure for the main | 1453 // The helper function _getMainClosure creates a closure for the main |
1452 // entry point which is either explicitly or implictly exported from the | 1454 // entry point which is either explicitly or implictly exported from the |
1453 // root library. | 1455 // root library. |
1454 Dart_Handle main_closure = | 1456 Dart_Handle main_closure = |
1455 Dart_Invoke(isolate_data->builtin_lib(), | 1457 Dart_Invoke(isolate_data->builtin_lib(), |
1456 Dart_NewStringFromCString("_getMainClosure"), 0, NULL); | 1458 Dart_NewStringFromCString("_getMainClosure"), 0, NULL); |
1457 CHECK_RESULT(main_closure); | 1459 CHECK_RESULT(main_closure); |
1458 | 1460 |
1459 // Call _startIsolate in the isolate library to enable dispatching the | 1461 // Call _startIsolate in the isolate library to enable dispatching the |
1460 // initial startup message. | 1462 // initial startup message. |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1743 Platform::Exit(Process::GlobalExitCode()); | 1745 Platform::Exit(Process::GlobalExitCode()); |
1744 } | 1746 } |
1745 | 1747 |
1746 } // namespace bin | 1748 } // namespace bin |
1747 } // namespace dart | 1749 } // namespace dart |
1748 | 1750 |
1749 int main(int argc, char** argv) { | 1751 int main(int argc, char** argv) { |
1750 dart::bin::main(argc, argv); | 1752 dart::bin::main(argc, argv); |
1751 UNREACHABLE(); | 1753 UNREACHABLE(); |
1752 } | 1754 } |
OLD | NEW |