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

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

Issue 2925203002: Load service isolate from the kernel binary. (Closed)
Patch Set: Remove whitespace Created 3 years, 6 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
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 "bin/dfe.h" 5 #include "bin/dfe.h"
6 #include "bin/dartutils.h" 6 #include "bin/dartutils.h"
7 #include "bin/error_exit.h" 7 #include "bin/error_exit.h"
8 8
9 #include "vm/kernel.h" 9 #include "vm/kernel.h"
10 10
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 86
87 void* DFE::ReadPlatform() { 87 void* DFE::ReadPlatform() {
88 const uint8_t* buffer = NULL; 88 const uint8_t* buffer = NULL;
89 intptr_t buffer_length = -1; 89 intptr_t buffer_length = -1;
90 bool result = 90 bool result =
91 TryReadKernelFile(platform_binary_filename_, &buffer, &buffer_length); 91 TryReadKernelFile(platform_binary_filename_, &buffer, &buffer_length);
92 if (result) { 92 if (result) {
93 kernel_platform_ = Dart_ReadKernelBinary(buffer, buffer_length); 93 kernel_platform_ = Dart_ReadKernelBinary(buffer, buffer_length);
94 return kernel_platform_; 94 return kernel_platform_;
95 } 95 }
96 return NULL; 96 return NULL;
siva 2017/06/13 02:12:02 I think this can also be changed to { kernel_pla
sivachandra 2017/06/14 19:25:57 Doing this in https://codereview.chromium.org/2933
97 } 97 }
98 98
99 99
100 void* DFE::ReadVMServiceIO() {
101 const uint8_t* buffer = NULL;
102 intptr_t buffer_length = -1;
103 bool result =
104 TryReadKernelFile(vmservice_io_binary_filename_, &buffer, &buffer_length);
105 if (result) {
106 kernel_vmservice_io_ = Dart_ReadKernelBinary(buffer, buffer_length);
107 return kernel_vmservice_io_;
108 }
109 return NULL;
siva 2017/06/13 02:12:02 Can this be: { kernel_vmservice_io_ = ReadScrip
sivachandra 2017/06/14 19:25:57 Will update this after https://codereview.chromium
110 }
111
112
100 void* DFE::ReadScript(const char* script_uri) { 113 void* DFE::ReadScript(const char* script_uri) {
101 const uint8_t* buffer = NULL; 114 const uint8_t* buffer = NULL;
102 intptr_t buffer_length = -1; 115 intptr_t buffer_length = -1;
103 bool result = TryReadKernelFile(script_uri, &buffer, &buffer_length); 116 bool result = TryReadKernelFile(script_uri, &buffer, &buffer_length);
104 if (result) { 117 if (result) {
105 return Dart_ReadKernelBinary(buffer, buffer_length); 118 return Dart_ReadKernelBinary(buffer, buffer_length);
106 } 119 }
107 return NULL; 120 return NULL;
108 } 121 }
109 122
(...skipping 27 matching lines...) Expand all
137 return true; 150 return true;
138 } 151 }
139 } 152 }
140 } 153 }
141 return false; 154 return false;
142 } 155 }
143 156
144 157
145 } // namespace bin 158 } // namespace bin
146 } // namespace dart 159 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/bin/dfe.h ('k') | runtime/bin/main.cc » ('j') | runtime/bin/main.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698