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

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

Issue 2729943003: Recover from bad supertypes. (Closed)
Patch Set: Update status files. 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/kernel/kernel_procedure_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_procedure_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_procedure_builder.dart
index 08b6f474be30a04299abd0923350f7ee849913dc..cd8ee4196fb912b6fea5720ad1ff3c414480bf21 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_procedure_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_procedure_builder.dart
@@ -16,7 +16,6 @@ import 'package:kernel/ast.dart'
Expression,
FunctionNode,
Initializer,
- Library,
LocalInitializer,
Member,
Name,
@@ -52,6 +51,7 @@ import 'kernel_builder.dart'
KernelLibraryBuilder,
KernelTypeBuilder,
KernelTypeVariableBuilder,
+ LibraryBuilder,
MetadataBuilder,
ProcedureBuilder,
TypeVariableBuilder,
@@ -93,7 +93,7 @@ abstract class KernelFunctionBuilder
bool get isNative => nativeMethodName != null;
- FunctionNode buildFunction() {
+ FunctionNode buildFunction(LibraryBuilder library) {
assert(function == null);
FunctionNode result = new FunctionNode(body, asyncMarker: asyncModifier);
if (typeVariables != null) {
@@ -104,7 +104,7 @@ abstract class KernelFunctionBuilder
}
if (formals != null) {
for (KernelFormalParameterBuilder formal in formals) {
- VariableDeclaration parameter = formal.build();
+ VariableDeclaration parameter = formal.build(library);
if (formal.isNamed) {
result.namedParameters.add(parameter);
} else {
@@ -117,7 +117,7 @@ abstract class KernelFunctionBuilder
}
}
if (returnType != null) {
- result.returnType = returnType.build();
+ result.returnType = returnType.build(library);
}
if (!isConstructor && !isInstanceMember && parent is ClassBuilder) {
List<TypeParameter> typeParameters = parent.target.typeParameters;
@@ -154,7 +154,7 @@ abstract class KernelFunctionBuilder
return function = result;
}
- Member build(Library library);
+ Member build(LibraryBuilder library);
void becomeNative(Loader loader) {
target.isExternal = true;
@@ -220,16 +220,16 @@ class KernelProcedureBuilder extends KernelFunctionBuilder {
}
}
- Procedure build(Library library) {
+ Procedure build(LibraryBuilder library) {
// TODO(ahe): I think we may call this twice on parts. Investigate.
if (procedure.name == null) {
- procedure.function = buildFunction();
+ procedure.function = buildFunction(library);
procedure.function.parent = procedure;
procedure.isAbstract = isAbstract;
procedure.isStatic = isStatic;
procedure.isExternal = isExternal;
procedure.isConst = isConst;
- procedure.name = new Name(name, library);
+ procedure.name = new Name(name, library.target);
}
return procedure;
}
@@ -268,20 +268,20 @@ class KernelConstructorBuilder extends KernelFunctionBuilder {
ProcedureKind get kind => null;
- Constructor build(Library library) {
+ Constructor build(LibraryBuilder library) {
if (constructor.name == null) {
- constructor.function = buildFunction();
+ constructor.function = buildFunction(library);
constructor.function.parent = constructor;
constructor.isConst = isConst;
constructor.isExternal = isExternal;
- constructor.name = new Name(name, library);
+ constructor.name = new Name(name, library.target);
}
return constructor;
}
- FunctionNode buildFunction() {
+ FunctionNode buildFunction(LibraryBuilder library) {
// TODO(ahe): Should complain if another type is explicitly set.
- return super.buildFunction()..returnType = const VoidType();
+ return super.buildFunction(library)..returnType = const VoidType();
}
Constructor get target => constructor;

Powered by Google App Engine
This is Rietveld 408576698