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

Side by Side Diff: runtime/vm/unit_test.cc

Issue 3001013002: Pass path to platform kernel binary to kernel-service. (Closed)
Patch Set: Fix filenames, add comment regarding null platform_binary Created 3 years, 4 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 | « runtime/vm/kernel_isolate.cc ('k') | utils/kernel-service/kernel-service.dart » ('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 "vm/unit_test.h" 5 #include "vm/unit_test.h"
6 6
7 #include <stdio.h> 7 #include <stdio.h>
8 8
9 #include "bin/builtin.h" 9 #include "bin/builtin.h"
10 #include "bin/dartutils.h" 10 #include "bin/dartutils.h"
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 sourcefiles, kernel_pgm, incrementally); 184 sourcefiles, kernel_pgm, incrementally);
185 } 185 }
186 186
187 char* TestCase::CompileTestScriptWithDFE(const char* url, 187 char* TestCase::CompileTestScriptWithDFE(const char* url,
188 int sourcefiles_count, 188 int sourcefiles_count,
189 Dart_SourceFile sourcefiles[], 189 Dart_SourceFile sourcefiles[],
190 void** kernel_pgm, 190 void** kernel_pgm,
191 bool incrementally) { 191 bool incrementally) {
192 Zone* zone = Thread::Current()->zone(); 192 Zone* zone = Thread::Current()->zone();
193 Dart_KernelCompilationResult compilation_result = Dart_CompileSourcesToKernel( 193 Dart_KernelCompilationResult compilation_result = Dart_CompileSourcesToKernel(
194 url, sourcefiles_count, sourcefiles, incrementally); 194 url, NULL /* platform binary can be found at the default location */,
195 sourcefiles_count, sourcefiles, incrementally);
195 196
196 if (compilation_result.status != Dart_KernelCompilationStatus_Ok) { 197 if (compilation_result.status != Dart_KernelCompilationStatus_Ok) {
197 return OS::SCreate(zone, "Compilation failed %s", compilation_result.error); 198 return OS::SCreate(zone, "Compilation failed %s", compilation_result.error);
198 } 199 }
199 const uint8_t* kernel_file = compilation_result.kernel; 200 const uint8_t* kernel_file = compilation_result.kernel;
200 intptr_t kernel_length = compilation_result.kernel_size; 201 intptr_t kernel_length = compilation_result.kernel_size;
201 if (kernel_file == NULL) { 202 if (kernel_file == NULL) {
202 return OS::SCreate(zone, "front end generated a NULL kernel file"); 203 return OS::SCreate(zone, "front end generated a NULL kernel file");
203 } 204 }
204 *kernel_pgm = Dart_ReadKernelBinary(kernel_file, kernel_length); 205 *kernel_pgm = Dart_ReadKernelBinary(kernel_file, kernel_length);
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 pos = strstr(in, prefix); 623 pos = strstr(in, prefix);
623 } 624 }
624 // Copy the remainder of in to out. 625 // Copy the remainder of in to out.
625 while (*in != '\0') { 626 while (*in != '\0') {
626 *out++ = *in++; 627 *out++ = *in++;
627 } 628 }
628 *out = '\0'; 629 *out = '\0';
629 } 630 }
630 631
631 } // namespace dart 632 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/kernel_isolate.cc ('k') | utils/kernel-service/kernel-service.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698