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

Side by Side Diff: pkg/compiler/lib/src/helpers/trace.dart

Issue 1173403002: dart2js: Fix hints in code base. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Updated to latest revision Created 5 years, 6 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
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 part of dart2js.helpers; 5 part of dart2js.helpers;
6 6
7 /// Function signature for [trace]. 7 /// Function signature for [trace].
8 typedef void Trace(String message, 8 typedef void Trace(String message,
9 {bool condition(String stackTrace), 9 {bool condition(String stackTrace),
10 int limit, 10 int limit,
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 int lastColon = line.lastIndexOf(':', rightParenPos); 148 int lastColon = line.lastIndexOf(':', rightParenPos);
149 int nextToLastColon = line.lastIndexOf(':', lastColon-1); 149 int nextToLastColon = line.lastIndexOf(':', lastColon-1);
150 150
151 String lineNo; 151 String lineNo;
152 String columnNo; 152 String columnNo;
153 if (nextToLastColon != -1) { 153 if (nextToLastColon != -1) {
154 lineNo = line.substring(nextToLastColon+1, lastColon); 154 lineNo = line.substring(nextToLastColon+1, lastColon);
155 columnNo = line.substring(lastColon+1, rightParenPos); 155 columnNo = line.substring(lastColon+1, rightParenPos);
156 try { 156 try {
157 int.parse(lineNo); 157 int.parse(lineNo);
158 } on FormatException catch (e) { 158 } on FormatException {
159 lineNo = columnNo; 159 lineNo = columnNo;
160 columnNo = ''; 160 columnNo = '';
161 nextToLastColon = lastColon; 161 nextToLastColon = lastColon;
162 } 162 }
163 } else { 163 } else {
164 lineNo = line.substring(lastColon+1, rightParenPos); 164 lineNo = line.substring(lastColon+1, rightParenPos);
165 columnNo = ''; 165 columnNo = '';
166 nextToLastColon = lastColon; 166 nextToLastColon = lastColon;
167 } 167 }
168 168
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 } 330 }
331 for (int index = text.length ; index < intendedLength ; index ++) { 331 for (int index = text.length ; index < intendedLength ; index ++) {
332 int dotsIndex = index % dotsLength; 332 int dotsIndex = index % dotsLength;
333 sb.write(dots.substring(dotsIndex, dotsIndex + 1)); 333 sb.write(dots.substring(dotsIndex, dotsIndex + 1));
334 } 334 }
335 if (padLeft) { 335 if (padLeft) {
336 sb.write(text); 336 sb.write(text);
337 } 337 }
338 return sb.toString(); 338 return sb.toString();
339 } 339 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698