| 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 1458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1469 result = Dart_SaveJITFeedback(&buffer, &size); | 1469 result = Dart_SaveJITFeedback(&buffer, &size); |
| 1470 if (Dart_IsError(result)) { | 1470 if (Dart_IsError(result)) { |
| 1471 ErrorExit(kErrorExitCode, "%s\n", Dart_GetError(result)); | 1471 ErrorExit(kErrorExitCode, "%s\n", Dart_GetError(result)); |
| 1472 } | 1472 } |
| 1473 WriteFile(save_feedback_filename, buffer, size); | 1473 WriteFile(save_feedback_filename, buffer, size); |
| 1474 } | 1474 } |
| 1475 } | 1475 } |
| 1476 } | 1476 } |
| 1477 | 1477 |
| 1478 if (snapshot_deps_filename != NULL) { | 1478 if (snapshot_deps_filename != NULL) { |
| 1479 Loader::ResolveDependenciesAsFilePaths(); |
| 1479 IsolateData* isolate_data = | 1480 IsolateData* isolate_data = |
| 1480 reinterpret_cast<IsolateData*>(Dart_IsolateData(isolate)); | 1481 reinterpret_cast<IsolateData*>(Dart_IsolateData(isolate)); |
| 1481 ASSERT(isolate_data != NULL); | 1482 ASSERT(isolate_data != NULL); |
| 1482 MallocGrowableArray<char*>* dependencies = isolate_data->dependencies(); | 1483 MallocGrowableArray<char*>* dependencies = isolate_data->dependencies(); |
| 1483 ASSERT(dependencies != NULL); | 1484 ASSERT(dependencies != NULL); |
| 1484 File* file = File::Open(snapshot_deps_filename, File::kWriteTruncate); | 1485 File* file = File::Open(snapshot_deps_filename, File::kWriteTruncate); |
| 1485 if (file == NULL) { | 1486 if (file == NULL) { |
| 1486 ErrorExit(kErrorExitCode, | 1487 ErrorExit(kErrorExitCode, |
| 1487 "Error: Unable to open snapshot depfile: %s\n\n", | 1488 "Error: Unable to open snapshot depfile: %s\n\n", |
| 1488 snapshot_deps_filename); | 1489 snapshot_deps_filename); |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1756 Platform::Exit(Process::GlobalExitCode()); | 1757 Platform::Exit(Process::GlobalExitCode()); |
| 1757 } | 1758 } |
| 1758 | 1759 |
| 1759 } // namespace bin | 1760 } // namespace bin |
| 1760 } // namespace dart | 1761 } // namespace dart |
| 1761 | 1762 |
| 1762 int main(int argc, char** argv) { | 1763 int main(int argc, char** argv) { |
| 1763 dart::bin::main(argc, argv); | 1764 dart::bin::main(argc, argv); |
| 1764 UNREACHABLE(); | 1765 UNREACHABLE(); |
| 1765 } | 1766 } |
| OLD | NEW |