Index: pkg/front_end/lib/src/fasta/source/source_class_builder.dart |
diff --git a/pkg/front_end/lib/src/fasta/source/source_class_builder.dart b/pkg/front_end/lib/src/fasta/source/source_class_builder.dart |
index 5ab36edd574addc20f780e1b37e0826596f9e001..3c2abf2543f03fae445324fbbbe4d995d7930d4d 100644 |
--- a/pkg/front_end/lib/src/fasta/source/source_class_builder.dart |
+++ b/pkg/front_end/lib/src/fasta/source/source_class_builder.dart |
@@ -4,38 +4,32 @@ |
library fasta.source_class_builder; |
-import 'package:kernel/ast.dart' show |
- Class, |
- Constructor, |
- Supertype, |
- TreeNode, |
- setParents; |
- |
-import '../errors.dart' show |
- internalError; |
- |
-import '../kernel/kernel_builder.dart' show |
- Builder, |
- ConstructorReferenceBuilder, |
- KernelClassBuilder, |
- KernelFieldBuilder, |
- KernelFunctionBuilder, |
- KernelLibraryBuilder, |
- KernelTypeBuilder, |
- KernelTypeVariableBuilder, |
- LibraryBuilder, |
- MetadataBuilder, |
- ProcedureBuilder, |
- TypeVariableBuilder; |
- |
-import '../dill/dill_member_builder.dart' show |
- DillMemberBuilder; |
- |
-import '../util/relativize.dart' show |
- relativizeUri; |
- |
-Class initializeClass(Class cls, String name, LibraryBuilder parent, |
- int charOffset) { |
+import 'package:kernel/ast.dart' |
+ show Class, Constructor, Supertype, TreeNode, setParents; |
+ |
+import '../errors.dart' show internalError; |
+ |
+import '../kernel/kernel_builder.dart' |
+ show |
+ Builder, |
+ ConstructorReferenceBuilder, |
+ KernelClassBuilder, |
+ KernelFieldBuilder, |
+ KernelFunctionBuilder, |
+ KernelLibraryBuilder, |
+ KernelTypeBuilder, |
+ KernelTypeVariableBuilder, |
+ LibraryBuilder, |
+ MetadataBuilder, |
+ ProcedureBuilder, |
+ TypeVariableBuilder; |
+ |
+import '../dill/dill_member_builder.dart' show DillMemberBuilder; |
+ |
+import '../util/relativize.dart' show relativizeUri; |
+ |
+Class initializeClass( |
+ Class cls, String name, LibraryBuilder parent, int charOffset) { |
cls ??= new Class(name: name); |
cls.fileUri ??= relativizeUri(parent.fileUri); |
if (cls.fileOffset != TreeNode.noOffset) { |
@@ -55,11 +49,19 @@ class SourceClassBuilder extends KernelClassBuilder { |
final KernelTypeBuilder mixedInType; |
- SourceClassBuilder(List<MetadataBuilder> metadata, int modifiers, |
- String name, List<TypeVariableBuilder> typeVariables, |
- KernelTypeBuilder supertype, List<KernelTypeBuilder> interfaces, |
- Map<String, Builder> members, LibraryBuilder parent, |
- this.constructorReferences, int charOffset, [Class cls, this.mixedInType]) |
+ SourceClassBuilder( |
+ List<MetadataBuilder> metadata, |
+ int modifiers, |
+ String name, |
+ List<TypeVariableBuilder> typeVariables, |
+ KernelTypeBuilder supertype, |
+ List<KernelTypeBuilder> interfaces, |
+ Map<String, Builder> members, |
+ LibraryBuilder parent, |
+ this.constructorReferences, |
+ int charOffset, |
+ [Class cls, |
+ this.mixedInType]) |
: cls = initializeClass(cls, name, parent, charOffset), |
membersInScope = computeMembersInScope(members), |
constructors = computeConstructors(members), |
@@ -90,6 +92,7 @@ class SourceClassBuilder extends KernelClassBuilder { |
internalError("Unhandled builder: ${builder.runtimeType}"); |
} |
} |
+ |
members.forEach((String name, Builder builder) { |
do { |
buildBuilder(builder); |