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

Unified Diff: pkg/front_end/lib/src/fasta/builder/builder.dart

Issue 2691523002: Ensure locations are always provided, but don't store them yet. (Closed)
Patch Set: Address comments. Created 3 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
Index: pkg/front_end/lib/src/fasta/builder/builder.dart
diff --git a/pkg/front_end/lib/src/fasta/builder/builder.dart b/pkg/front_end/lib/src/fasta/builder/builder.dart
index 01a120239cc90b3b13db272569221b77850eee36..5e5058775b76b93e8bf8ac95cc087a9c1c904c46 100644
--- a/pkg/front_end/lib/src/fasta/builder/builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/builder.dart
@@ -87,6 +87,15 @@ abstract class Builder {
// this a const class.
Builder next;
+ /// The values of [parent], [charOffset], and [fileUri] aren't stored. We
+ /// need to evaluate the memory impact of doing so, but want to ensure the
+ /// information is always provided.
+ Builder(Builder parent, int charOffset, Uri fileUri);
+
+ int get charOffset => -1;
+
+ Uri get fileUri => null;
+
/// Resolve types (lookup names in scope) recorded in this builder and return
/// the number of types resolved.
int resolveTypes(Builder parent) => 0;
@@ -125,7 +134,7 @@ abstract class Builder {
} else {
print("${library.uri}: Note: '$name' is imported from both "
"'${getUri(this)}' and '${getUri(other)}'.");
- return library.buildAmbiguousBuilder(name, this, other);
+ return library.buildAmbiguousBuilder(name, this, other, charOffset);
}
if (isLocal) {
print("${library.uri}: Note: local definition of '$name' hides imported "
« no previous file with comments | « pkg/front_end/lib/src/fasta/analyzer/mock_element.dart ('k') | pkg/front_end/lib/src/fasta/builder/class_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698