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

Unified Diff: pkg/front_end/lib/src/fasta/source/source_library_builder.dart

Issue 2995023002: Add debug names to scopes. (Closed)
Patch Set: Created 3 years, 4 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/source/source_library_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
index 162005275381264723e78ae382a7f3f7f62cf6e4..57bb2409a34374f16a6b89c35c5c4db1680f4c80 100644
--- a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
@@ -582,10 +582,13 @@ class DeclarationBuilder<T extends TypeBuilder> {
final Map<ProcedureBuilder, DeclarationBuilder<T>> factoryDeclarations;
DeclarationBuilder(this.members, this.setters, this.constructors,
- this.factoryDeclarations, this.name, this.parent);
+ this.factoryDeclarations, this.name, this.parent) {
+ assert(name != null);
+ }
DeclarationBuilder.library()
- : this(<String, Builder>{}, <String, Builder>{}, null, null, null, null);
+ : this(<String, Builder>{}, <String, Builder>{}, null, null, "library",
+ null);
DeclarationBuilder createNested(String name, bool hasMembers) {
return new DeclarationBuilder<T>(
@@ -661,6 +664,6 @@ class DeclarationBuilder<T extends TypeBuilder> {
}
Scope toScope(Scope parent) {
- return new Scope(members, setters, parent, isModifiable: false);
+ return new Scope(members, setters, parent, name, isModifiable: false);
}
}
« no previous file with comments | « pkg/front_end/lib/src/fasta/source/scope_listener.dart ('k') | pkg/front_end/lib/src/fasta/source/stack_listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698