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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/source_file_provider.dart

Issue 185743002: Make analyze-all imply analyze-only. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
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 10
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 } 107 }
108 108
109 void diagnosticHandler(Uri uri, int begin, int end, String message, 109 void diagnosticHandler(Uri uri, int begin, int end, String message,
110 api.Diagnostic kind) { 110 api.Diagnostic kind) {
111 // TODO(ahe): Remove this when source map is handled differently. 111 // TODO(ahe): Remove this when source map is handled differently.
112 if (identical(kind.name, 'source map')) return; 112 if (identical(kind.name, 'source map')) return;
113 113
114 if (isAborting) return; 114 if (isAborting) return;
115 isAborting = (kind == api.Diagnostic.CRASH); 115 isAborting = (kind == api.Diagnostic.CRASH);
116 116
117 message = prefixMessage(message, kind);
118
119 bool fatal = (kind.ordinal & FATAL) != 0; 117 bool fatal = (kind.ordinal & FATAL) != 0;
120 bool isInfo = (kind.ordinal & INFO) != 0; 118 bool isInfo = (kind.ordinal & INFO) != 0;
121 if (isInfo && uri == null && kind != api.Diagnostic.INFO) { 119 if (isInfo && uri == null && kind != api.Diagnostic.INFO) {
122 info(message, kind); 120 info(message, kind);
123 return; 121 return;
124 } 122 }
123
124 message = prefixMessage(message, kind);
125
125 // [previousKind]/[lastKind] records the previous non-INFO kind we saw. 126 // [previousKind]/[lastKind] records the previous non-INFO kind we saw.
126 // This is used to suppress info about a warning when warnings are 127 // This is used to suppress info about a warning when warnings are
127 // suppressed, and similar for hints. 128 // suppressed, and similar for hints.
128 var previousKind = lastKind; 129 var previousKind = lastKind;
129 if (kind != api.Diagnostic.INFO) { 130 if (kind != api.Diagnostic.INFO) {
130 lastKind = kind; 131 lastKind = kind;
131 } 132 }
132 var color; 133 var color;
133 if (kind == api.Diagnostic.ERROR) { 134 if (kind == api.Diagnostic.ERROR) {
134 color = colors.red; 135 color = colors.red;
(...skipping 28 matching lines...) Expand all
163 if (fatal && throwOnError) { 164 if (fatal && throwOnError) {
164 isAborting = true; 165 isAborting = true;
165 throw new AbortLeg(message); 166 throw new AbortLeg(message);
166 } 167 }
167 } 168 }
168 169
169 void call(Uri uri, int begin, int end, String message, api.Diagnostic kind) { 170 void call(Uri uri, int begin, int end, String message, api.Diagnostic kind) {
170 return diagnosticHandler(uri, begin, end, message, kind); 171 return diagnosticHandler(uri, begin, end, message, kind);
171 } 172 }
172 } 173 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698