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

Side by Side Diff: pkg/front_end/lib/kernel_generator.dart

Issue 2677423002: Small fix to perf.dart. (Closed)
Patch Set: Created 3 years, 10 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 | pkg/front_end/tool/perf.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 /// Defines the front-end API for converting source code to Dart Kernel objects. 5 /// Defines the front-end API for converting source code to Dart Kernel objects.
6 library front_end.kernel_generator; 6 library front_end.kernel_generator;
7 7
8 import 'compilation_error.dart'; 8 import 'compilation_error.dart';
9 import 'compiler_options.dart'; 9 import 'compiler_options.dart';
10 import 'dart:async'; 10 import 'dart:async';
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 void _reportErrors(List errors, ErrorHandler onError) { 176 void _reportErrors(List errors, ErrorHandler onError) {
177 if (onError == null) return; 177 if (onError == null) return;
178 for (var error in errors) { 178 for (var error in errors) {
179 onError(new _DartkError(error)); 179 onError(new _DartkError(error));
180 } 180 }
181 } 181 }
182 182
183 String _uriToPath(Uri uri, CompilerOptions options) { 183 String _uriToPath(Uri uri, CompilerOptions options) {
184 if (uri == null) return null; 184 if (uri == null) return null;
185 if (uri.scheme != 'file') { 185 if (uri.scheme != 'file') {
186 throw new StateError('Only file URIs are supported'); 186 throw new StateError('Only file URIs are supported: $uri');
187 } 187 }
188 return options.fileSystem.context.fromUri(uri); 188 return options.fileSystem.context.fromUri(uri);
189 } 189 }
190 190
191 // TODO(sigmund): delete this class. Dartk should not format errors itself, we 191 // TODO(sigmund): delete this class. Dartk should not format errors itself, we
192 // should just pass them along. 192 // should just pass them along.
193 class _DartkError implements CompilationError { 193 class _DartkError implements CompilationError {
194 String get correction => null; 194 String get correction => null;
195 SourceSpan get span => null; 195 SourceSpan get span => null;
196 final String message; 196 final String message;
197 _DartkError(this.message); 197 _DartkError(this.message);
198 } 198 }
OLDNEW
« no previous file with comments | « no previous file | pkg/front_end/tool/perf.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698