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

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

Issue 925943002: Refactor SourceFile, SourceFileProvider and SourceLocation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 5 years, 10 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/dart2js.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/apiimpl.dart
diff --git a/pkg/compiler/lib/src/apiimpl.dart b/pkg/compiler/lib/src/apiimpl.dart
index be603fa2904b24746741dc370cb3727263ef386d..7449c7a773c579cf3b592dc1f8b97dad95cd63fd 100644
--- a/pkg/compiler/lib/src/apiimpl.dart
+++ b/pkg/compiler/lib/src/apiimpl.dart
@@ -220,7 +220,6 @@ class Compiler extends leg.Compiler {
}
Uri resourceUri = translateUri(node, readableUri);
- String resourceUriString = '$resourceUri';
if (resourceUri.scheme == 'dart-ext') {
if (!allowNativeExtensions) {
withCurrentElement(element, () {
@@ -236,9 +235,9 @@ class Compiler extends leg.Compiler {
return new Future.sync(() => callUserProvider(resourceUri)).then((data) {
SourceFile sourceFile;
if (data is List<int>) {
- sourceFile = new Utf8BytesSourceFile(resourceUriString, data);
+ sourceFile = new Utf8BytesSourceFile(resourceUri, data);
} else if (data is String) {
- sourceFile = new StringSourceFile(resourceUriString, data);
+ sourceFile = new StringSourceFile.fromUri(resourceUri, data);
} else {
String message = "Expected a 'String' or a 'List<int>' from the input "
"provider, but got: ${Error.safeToString(data)}.";
@@ -260,8 +259,8 @@ class Compiler extends leg.Compiler {
return new Future.value(
new leg.Script(
readableUri, resourceUri,
- new StringSourceFile(
- '$resourceUri',
+ new StringSourceFile.fromUri(
+ resourceUri,
"// Synthetic source file generated for '$readableUri'."),
isSynthesized: true));
}
« no previous file with comments | « no previous file | pkg/compiler/lib/src/dart2js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698