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

Unified Diff: pkg/compiler/lib/src/compiler.dart

Issue 1205373002: Translate package URIs to resource URIs for diagnostics. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Use resourceUri instead of readableUri in source spans. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/compiler/lib/src/elements/modelx.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/compiler.dart
diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart
index 7e4264936ff25fe7b85dd427f3394f5060a51a54..88368dd5bfc42c99f764193586f22810a87e7e9c 100644
--- a/pkg/compiler/lib/src/compiler.dart
+++ b/pkg/compiler/lib/src/compiler.dart
@@ -1196,7 +1196,7 @@ abstract class Compiler implements DiagnosticListener {
} else if (node is Element) {
return spanFromElement(node);
} else if (node is MetadataAnnotation) {
- Uri uri = node.annotatedElement.compilationUnit.script.readableUri;
+ Uri uri = node.annotatedElement.compilationUnit.script.resourceUri;
return spanFromTokens(node.beginToken, node.endToken, uri);
} else if (node is Local) {
Local local = node;
@@ -1922,7 +1922,7 @@ abstract class Compiler implements DiagnosticListener {
throw 'Cannot find tokens to produce error message.';
}
if (uri == null && currentElement != null) {
- uri = currentElement.compilationUnit.script.readableUri;
+ uri = currentElement.compilationUnit.script.resourceUri;
}
return SourceSpan.withCharacterOffsets(begin, end,
(beginOffset, endOffset) => new SourceSpan(uri, beginOffset, endOffset));
@@ -1962,7 +1962,7 @@ abstract class Compiler implements DiagnosticListener {
return element.sourcePosition;
}
Token position = element.position;
- Uri uri = element.compilationUnit.script.readableUri;
+ Uri uri = element.compilationUnit.script.resourceUri;
return (position == null)
? new SourceSpan(uri, 0, 0)
: spanFromTokens(position, position, uri);
« no previous file with comments | « no previous file | pkg/compiler/lib/src/elements/modelx.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698