Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Side by Side Diff: runtime/bin/main.cc

Issue 2776373002: Initial steps into streaming the kernel flowgraph (Closed)
Patch Set: Rebase + fix lint error Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | runtime/vm/kernel.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 867 matching lines...) Expand 10 before | Expand all | Expand 10 after
878 return NULL; 878 return NULL;
879 } 879 }
880 } else if (!isolate_run_app_snapshot) { 880 } else if (!isolate_run_app_snapshot) {
881 is_kernel = TryReadKernel(script_uri, &kernel_file, &kernel_length); 881 is_kernel = TryReadKernel(script_uri, &kernel_file, &kernel_length);
882 } 882 }
883 } 883 }
884 884
885 void* kernel_program = NULL; 885 void* kernel_program = NULL;
886 if (is_kernel) { 886 if (is_kernel) {
887 kernel_program = Dart_ReadKernelBinary(kernel_file, kernel_length); 887 kernel_program = Dart_ReadKernelBinary(kernel_file, kernel_length);
888 free(const_cast<uint8_t*>(kernel_file));
889 } 888 }
890 889
891 IsolateData* isolate_data = 890 IsolateData* isolate_data =
892 new IsolateData(script_uri, package_root, packages_config, app_snapshot); 891 new IsolateData(script_uri, package_root, packages_config, app_snapshot);
893 if (is_main_isolate && (snapshot_deps_filename != NULL)) { 892 if (is_main_isolate && (snapshot_deps_filename != NULL)) {
894 isolate_data->set_dependencies(new MallocGrowableArray<char*>()); 893 isolate_data->set_dependencies(new MallocGrowableArray<char*>());
895 } 894 }
896 // If the script is a Kernel binary, then we will try to bootstrap from the 895 // If the script is a Kernel binary, then we will try to bootstrap from the
897 // script. 896 // script.
898 Dart_Isolate isolate = 897 Dart_Isolate isolate =
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after
1718 Platform::Exit(Process::GlobalExitCode()); 1717 Platform::Exit(Process::GlobalExitCode());
1719 } 1718 }
1720 1719
1721 } // namespace bin 1720 } // namespace bin
1722 } // namespace dart 1721 } // namespace dart
1723 1722
1724 int main(int argc, char** argv) { 1723 int main(int argc, char** argv) {
1725 dart::bin::main(argc, argv); 1724 dart::bin::main(argc, argv);
1726 UNREACHABLE(); 1725 UNREACHABLE();
1727 } 1726 }
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/kernel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698