| 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 1419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1430 result = Dart_SaveJITFeedback(&buffer, &size); | 1430 result = Dart_SaveJITFeedback(&buffer, &size); |
| 1431 if (Dart_IsError(result)) { | 1431 if (Dart_IsError(result)) { |
| 1432 ErrorExit(kErrorExitCode, "%s\n", Dart_GetError(result)); | 1432 ErrorExit(kErrorExitCode, "%s\n", Dart_GetError(result)); |
| 1433 } | 1433 } |
| 1434 WriteFile(save_feedback_filename, buffer, size); | 1434 WriteFile(save_feedback_filename, buffer, size); |
| 1435 } | 1435 } |
| 1436 } | 1436 } |
| 1437 } | 1437 } |
| 1438 | 1438 |
| 1439 if (snapshot_deps_filename != NULL) { | 1439 if (snapshot_deps_filename != NULL) { |
| 1440 Loader::ResolveDependenciesAsFilePaths(); |
| 1440 IsolateData* isolate_data = | 1441 IsolateData* isolate_data = |
| 1441 reinterpret_cast<IsolateData*>(Dart_IsolateData(isolate)); | 1442 reinterpret_cast<IsolateData*>(Dart_IsolateData(isolate)); |
| 1442 ASSERT(isolate_data != NULL); | 1443 ASSERT(isolate_data != NULL); |
| 1443 MallocGrowableArray<char*>* dependencies = isolate_data->dependencies(); | 1444 MallocGrowableArray<char*>* dependencies = isolate_data->dependencies(); |
| 1444 ASSERT(dependencies != NULL); | 1445 ASSERT(dependencies != NULL); |
| 1445 File* file = File::Open(snapshot_deps_filename, File::kWriteTruncate); | 1446 File* file = File::Open(snapshot_deps_filename, File::kWriteTruncate); |
| 1446 if (file == NULL) { | 1447 if (file == NULL) { |
| 1447 ErrorExit(kErrorExitCode, | 1448 ErrorExit(kErrorExitCode, |
| 1448 "Error: Unable to open snapshot depfile: %s\n\n", | 1449 "Error: Unable to open snapshot depfile: %s\n\n", |
| 1449 snapshot_deps_filename); | 1450 snapshot_deps_filename); |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1717 Platform::Exit(Process::GlobalExitCode()); | 1718 Platform::Exit(Process::GlobalExitCode()); |
| 1718 } | 1719 } |
| 1719 | 1720 |
| 1720 } // namespace bin | 1721 } // namespace bin |
| 1721 } // namespace dart | 1722 } // namespace dart |
| 1722 | 1723 |
| 1723 int main(int argc, char** argv) { | 1724 int main(int argc, char** argv) { |
| 1724 dart::bin::main(argc, argv); | 1725 dart::bin::main(argc, argv); |
| 1725 UNREACHABLE(); | 1726 UNREACHABLE(); |
| 1726 } | 1727 } |
| OLD | NEW |