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

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

Issue 2776373002: Initial steps into streaming the kernel flowgraph (Closed)
Patch Set: Changed type 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') | runtime/vm/kernel_binary_flowgraph.h » ('J')
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 857 matching lines...) Expand 10 before | Expand all | Expand 10 after
868 return NULL; 868 return NULL;
869 } 869 }
870 } else if (!isolate_run_app_snapshot) { 870 } else if (!isolate_run_app_snapshot) {
871 is_kernel = TryReadKernel(script_uri, &kernel_file, &kernel_length); 871 is_kernel = TryReadKernel(script_uri, &kernel_file, &kernel_length);
872 } 872 }
873 } 873 }
874 874
875 void* kernel_program = NULL; 875 void* kernel_program = NULL;
876 if (is_kernel) { 876 if (is_kernel) {
877 kernel_program = Dart_ReadKernelBinary(kernel_file, kernel_length); 877 kernel_program = Dart_ReadKernelBinary(kernel_file, kernel_length);
878 free(const_cast<uint8_t*>(kernel_file));
879 } 878 }
880 879
881 IsolateData* isolate_data = 880 IsolateData* isolate_data =
882 new IsolateData(script_uri, package_root, packages_config, app_snapshot); 881 new IsolateData(script_uri, package_root, packages_config, app_snapshot);
883 // If the script is a Kernel binary, then we will try to bootstrap from the 882 // If the script is a Kernel binary, then we will try to bootstrap from the
884 // script. 883 // script.
885 Dart_Isolate isolate = 884 Dart_Isolate isolate =
886 is_kernel ? Dart_CreateIsolateFromKernel(script_uri, main, kernel_program, 885 is_kernel ? Dart_CreateIsolateFromKernel(script_uri, main, kernel_program,
887 flags, isolate_data, error) 886 flags, isolate_data, error)
888 : Dart_CreateIsolate(script_uri, main, isolate_snapshot_data, 887 : Dart_CreateIsolate(script_uri, main, isolate_snapshot_data,
(...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after
1668 Platform::Exit(Process::GlobalExitCode()); 1667 Platform::Exit(Process::GlobalExitCode());
1669 } 1668 }
1670 1669
1671 } // namespace bin 1670 } // namespace bin
1672 } // namespace dart 1671 } // namespace dart
1673 1672
1674 int main(int argc, char** argv) { 1673 int main(int argc, char** argv) {
1675 dart::bin::main(argc, argv); 1674 dart::bin::main(argc, argv);
1676 UNREACHABLE(); 1675 UNREACHABLE();
1677 } 1676 }
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/kernel.h » ('j') | runtime/vm/kernel_binary_flowgraph.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698