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

Side by Side Diff: pkg/front_end/tool/perf.dart

Issue 2532053005: Store library paths relative to a given application root folder. (Closed)
Patch Set: Revert changes to testcase baseline Created 4 years 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 | pkg/kernel/bin/dartk.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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 /// An entrypoint used to run portions of front_end and measure its performance. 5 /// An entrypoint used to run portions of front_end and measure its performance.
6 library front_end.tool.perf; 6 library front_end.tool.perf;
7 7
8 import 'dart:async'; 8 import 'dart:async';
9 import 'dart:io' show exit, stderr; 9 import 'dart:io' show exit, stderr;
10 10
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 234
235 // TODO(sigmund): replace this once kernel is produced by the frontend directly. 235 // TODO(sigmund): replace this once kernel is produced by the frontend directly.
236 Future<Program> generateKernel(Uri entryUri) async { 236 Future<Program> generateKernel(Uri entryUri) async {
237 var dartkTimer = new Stopwatch()..start(); 237 var dartkTimer = new Stopwatch()..start();
238 var options = new DartOptions(strongMode: false, sdk: 'sdk'); 238 var options = new DartOptions(strongMode: false, sdk: 'sdk');
239 var packages = 239 var packages =
240 await createPackages(options.packagePath, discoveryPath: entryUri.path); 240 await createPackages(options.packagePath, discoveryPath: entryUri.path);
241 var repository = new Repository(); 241 var repository = new Repository();
242 DartLoader loader = new DartLoader(repository, options, packages); 242 DartLoader loader = new DartLoader(repository, options, packages);
243 243
244 Program program = loader.loadProgram(entryUri.path); 244 Program program = loader.loadProgram(entryUri);
245 List errors = loader.errors; 245 List errors = loader.errors;
246 if (errors.isNotEmpty) { 246 if (errors.isNotEmpty) {
247 const int errorLimit = 100; 247 const int errorLimit = 100;
248 stderr.writeln(errors.take(errorLimit).join('\n')); 248 stderr.writeln(errors.take(errorLimit).join('\n'));
249 if (errors.length > errorLimit) { 249 if (errors.length > errorLimit) {
250 stderr.writeln('[error] ${errors.length - errorLimit} errors not shown'); 250 stderr.writeln('[error] ${errors.length - errorLimit} errors not shown');
251 } 251 }
252 } 252 }
253 dartkTimer.stop(); 253 dartkTimer.stop();
254 report("kernel_gen_e2e", dartkTimer.elapsedMicroseconds); 254 report("kernel_gen_e2e", dartkTimer.elapsedMicroseconds);
255 return program; 255 return program;
256 } 256 }
OLDNEW
« no previous file with comments | « no previous file | pkg/kernel/bin/dartk.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698