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

Unified Diff: pkg/front_end/lib/src/fasta/kernel/body_builder.dart

Issue 2722503003: Compute correct parent and fileUri for top-level fields. (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/kernel/kernel_variable_builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/fasta/kernel/body_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
index eb96caf9fcae531e79e3f7a2b048678f04876beb..d1dbd272df3ff1373865af50343c706448e5f9bf 100644
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
@@ -917,9 +917,7 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
}
push(variable);
scope[variable.name] = new KernelVariableBuilder(variable,
- // TODO(ahe): This should be `member ?? classBuilder ?? part`, but we
- // don't have an object representing the current part.
- member ?? classBuilder);
+ member ?? classBuilder ?? library, uri);
}
@override
@@ -1761,9 +1759,7 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
push(new FunctionDeclaration(variable,
new FunctionNode(new InvalidStatement())));
scope[variable.name] = new KernelVariableBuilder(variable,
- // TODO(ahe): This should be `member ?? classBuilder ?? part`, but we
- // don't have an object representing the current part.
- member ?? classBuilder);
+ member ?? classBuilder ?? library, uri);
enterLocalScope();
}
@@ -2662,11 +2658,13 @@ class FormalParameters {
if (required.length == 0 && optional == null) return parent;
Map<String, Builder> local = <String, Builder>{};
for (VariableDeclaration parameter in required) {
- local[parameter.name] = new KernelVariableBuilder(parameter, builder);
+ local[parameter.name] =
+ new KernelVariableBuilder(parameter, builder, builder.fileUri);
}
if (optional != null) {
for (VariableDeclaration parameter in optional.formals) {
- local[parameter.name] = new KernelVariableBuilder(parameter, builder);
+ local[parameter.name] =
+ new KernelVariableBuilder(parameter, builder, builder.fileUri);
}
}
return new Scope(local, parent, isModifiable: false);
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/kernel/kernel_variable_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698