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

Side by Side Diff: pkg/compiler/lib/src/source_file_provider.dart

Issue 2123073003: remove dependency on compiler from resolution (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: respond to comments Created 4 years, 5 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 | « pkg/compiler/lib/src/resolution/variables.dart ('k') | pkg/compiler/lib/src/typechecker.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 library source_file_provider; 5 library source_file_provider;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:convert'; 8 import 'dart:convert';
9 import 'dart:io'; 9 import 'dart:io';
10 import 'dart:math' as math; 10 import 'dart:math' as math;
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 case api.Diagnostic.INFO: 161 case api.Diagnostic.INFO:
162 case api.Diagnostic.VERBOSE_INFO: 162 case api.Diagnostic.VERBOSE_INFO:
163 return 'Info: $message'; 163 return 'Info: $message';
164 } 164 }
165 throw 'Unexpected diagnostic kind: $kind (${kind.ordinal})'; 165 throw 'Unexpected diagnostic kind: $kind (${kind.ordinal})';
166 } 166 }
167 167
168 @override 168 @override
169 void report(var code, Uri uri, int begin, int end, String message, 169 void report(var code, Uri uri, int begin, int end, String message,
170 api.Diagnostic kind) { 170 api.Diagnostic kind) {
171 // TODO(ahe): Remove this when source map is handled differently.
172 if (identical(kind.name, 'source map')) return;
173
174 if (isAborting) return; 171 if (isAborting) return;
175 isAborting = (kind == api.Diagnostic.CRASH); 172 isAborting = (kind == api.Diagnostic.CRASH);
176 173
177 bool fatal = (kind.ordinal & FATAL) != 0; 174 bool fatal = (kind.ordinal & FATAL) != 0;
178 bool isInfo = (kind.ordinal & INFO) != 0; 175 bool isInfo = (kind.ordinal & INFO) != 0;
179 if (isInfo && uri == null && kind != api.Diagnostic.INFO) { 176 if (isInfo && uri == null && kind != api.Diagnostic.INFO) {
180 info(message, kind); 177 info(message, kind);
181 return; 178 return;
182 } 179 }
183 180
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 var onAdd, onClose; 338 var onAdd, onClose;
342 339
343 EventSinkWrapper(this.onAdd, this.onClose); 340 EventSinkWrapper(this.onAdd, this.onClose);
344 341
345 void add(String data) => onAdd(data); 342 void add(String data) => onAdd(data);
346 343
347 void addError(error, [StackTrace stackTrace]) => throw error; 344 void addError(error, [StackTrace stackTrace]) => throw error;
348 345
349 void close() => onClose(); 346 void close() => onClose();
350 } 347 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/resolution/variables.dart ('k') | pkg/compiler/lib/src/typechecker.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698