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

Side by Side Diff: lib/compiler/implementation/compiler.dart

Issue 10629002: Avoid passing a null uri to translateUri. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merged Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 5
6 /** 6 /**
7 * If true, print a warning for each method that was resolved, but not 7 * If true, print a warning for each method that was resolved, but not
8 * compiled. 8 * compiled.
9 */ 9 */
10 final bool REPORT_EXCESS_RESOLUTION = false; 10 final bool REPORT_EXCESS_RESOLUTION = false;
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 api.Diagnostic.CRASH); 361 api.Diagnostic.CRASH);
362 // TODO(ahe): Obtain the build ID. 362 // TODO(ahe): Obtain the build ID.
363 var buildId = 'build number could not be determined'; 363 var buildId = 'build number could not be determined';
364 print(MessageKind.PLEASE_REPORT_THE_CRASH.message([buildId])); 364 print(MessageKind.PLEASE_REPORT_THE_CRASH.message([buildId]));
365 } 365 }
366 366
367 void cancel([String reason, Node node, Token token, 367 void cancel([String reason, Node node, Token token,
368 HInstruction instruction, Element element]) { 368 HInstruction instruction, Element element]) {
369 assembledCode = null; // Compilation failed. Make sure that we 369 assembledCode = null; // Compilation failed. Make sure that we
370 // don't return a bogus result. 370 // don't return a bogus result.
371 SourceSpan span = const SourceSpan(null, null, null); 371 SourceSpan span = null;
372 if (node !== null) { 372 if (node !== null) {
373 span = spanFromNode(node); 373 span = spanFromNode(node);
374 } else if (token !== null) { 374 } else if (token !== null) {
375 span = spanFromTokens(token, token); 375 span = spanFromTokens(token, token);
376 } else if (instruction !== null) { 376 } else if (instruction !== null) {
377 span = spanFromElement(currentElement); 377 span = spanFromElement(currentElement);
378 } else if (element !== null) { 378 } else if (element !== null) {
379 span = spanFromElement(element); 379 span = spanFromElement(element);
380 } else { 380 } else {
381 throw 'No error location for error: $reason'; 381 throw 'No error location for error: $reason';
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
884 // invariant that endOffset > beginOffset, but for EOF the 884 // invariant that endOffset > beginOffset, but for EOF the
885 // charoffset of the next token may be [beginOffset]. This can 885 // charoffset of the next token may be [beginOffset]. This can
886 // also happen for synthetized tokens that are produced during 886 // also happen for synthetized tokens that are produced during
887 // error handling. 887 // error handling.
888 final endOffset = 888 final endOffset =
889 Math.max((end.next !== null) ? end.next.charOffset : 0, beginOffset + 1); 889 Math.max((end.next !== null) ? end.next.charOffset : 0, beginOffset + 1);
890 assert(endOffset > beginOffset); 890 assert(endOffset > beginOffset);
891 return f(beginOffset, endOffset); 891 return f(beginOffset, endOffset);
892 } 892 }
893 } 893 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698