| OLD | NEW |
| 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 part of dart2js; | 5 part of dart2js; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * If true, print a warning for each method that was resolved, but not | 8 * If true, print a warning for each method that was resolved, but not |
| 9 * compiled. | 9 * compiled. |
| 10 */ | 10 */ |
| (...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 708 if (node is Node) { | 708 if (node is Node) { |
| 709 return spanFromNode(node, uri); | 709 return spanFromNode(node, uri); |
| 710 } else if (node is Token) { | 710 } else if (node is Token) { |
| 711 return spanFromTokens(node, node, uri); | 711 return spanFromTokens(node, node, uri); |
| 712 } else if (node is HInstruction) { | 712 } else if (node is HInstruction) { |
| 713 return spanFromHInstruction(node); | 713 return spanFromHInstruction(node); |
| 714 } else if (node is Element) { | 714 } else if (node is Element) { |
| 715 return spanFromElement(node); | 715 return spanFromElement(node); |
| 716 } else if (node is MetadataAnnotation) { | 716 } else if (node is MetadataAnnotation) { |
| 717 MetadataAnnotation annotation = node; | 717 MetadataAnnotation annotation = node; |
| 718 return spanFromTokens(annotation.beginToken, annotation.endToken); | 718 uri = annotation.annotatedElement.getCompilationUnit().script.uri; |
| 719 return spanFromTokens(annotation.beginToken, annotation.endToken, uri); |
| 719 } else { | 720 } else { |
| 720 throw 'No error location.'; | 721 throw 'No error location.'; |
| 721 } | 722 } |
| 722 } | 723 } |
| 723 | 724 |
| 724 void log(message) { | 725 void log(message) { |
| 725 reportDiagnostic(null, message, api.Diagnostic.VERBOSE_INFO); | 726 reportDiagnostic(null, message, api.Diagnostic.VERBOSE_INFO); |
| 726 } | 727 } |
| 727 | 728 |
| 728 bool run(Uri uri) { | 729 bool run(Uri uri) { |
| (...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1536 | 1537 |
| 1537 void close() {} | 1538 void close() {} |
| 1538 | 1539 |
| 1539 toString() => name; | 1540 toString() => name; |
| 1540 | 1541 |
| 1541 /// Convenience method for getting an [api.CompilerOutputProvider]. | 1542 /// Convenience method for getting an [api.CompilerOutputProvider]. |
| 1542 static NullSink outputProvider(String name, String extension) { | 1543 static NullSink outputProvider(String name, String extension) { |
| 1543 return new NullSink('$name.$extension'); | 1544 return new NullSink('$name.$extension'); |
| 1544 } | 1545 } |
| 1545 } | 1546 } |
| OLD | NEW |