@@ -53,7 +53,6 @@ import '../builder/name_iterator.dart';
5353import '../builder/named_type_builder.dart' ;
5454import '../builder/nullability_builder.dart' ;
5555import '../builder/procedure_builder.dart' ;
56- import '../builder/property_builder.dart' ;
5756import '../builder/type_builder.dart' ;
5857import '../dill/dill_target.dart' show DillTarget;
5958import '../source/class_declaration.dart' ;
@@ -66,6 +65,7 @@ import '../source/source_library_builder.dart' show SourceLibraryBuilder;
6665import '../source/source_loader.dart'
6766 show CompilationPhaseForProblemReporting, SourceLoader;
6867import '../source/source_method_builder.dart' ;
68+ import '../source/source_property_builder.dart' ;
6969import '../type_inference/type_schema.dart' ;
7070import 'benchmarker.dart' show BenchmarkPhases, Benchmarker;
7171import 'cfe_verifier.dart' show verifyComponent, verifyGetStaticType;
@@ -1532,14 +1532,14 @@ class KernelTarget {
15321532
15331533 /// Quotes below are from [Dart Programming Language Specification, 4th
15341534 /// Edition](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-408.pdf):
1535- List <PropertyBuilder > uninitializedFields = [];
1536- List <PropertyBuilder > nonFinalFields = [];
1537- List <PropertyBuilder > lateFinalFields = [];
1535+ List <SourcePropertyBuilder > uninitializedFields = [];
1536+ List <SourcePropertyBuilder > nonFinalFields = [];
1537+ List <SourcePropertyBuilder > lateFinalFields = [];
15381538
1539- Iterator <PropertyBuilder > fieldIterator =
1540- classDeclaration.fullMemberIterator <PropertyBuilder >();
1539+ Iterator <SourcePropertyBuilder > fieldIterator =
1540+ classDeclaration.fullMemberIterator <SourcePropertyBuilder >();
15411541 while (fieldIterator.moveNext ()) {
1542- PropertyBuilder fieldBuilder = fieldIterator.current;
1542+ SourcePropertyBuilder fieldBuilder = fieldIterator.current;
15431543 if (! fieldBuilder.isField) {
15441544 continue ;
15451545 }
@@ -1561,10 +1561,10 @@ class KernelTarget {
15611561 }
15621562 }
15631563
1564- Map <ConstructorDeclaration , Set <PropertyBuilder >>
1564+ Map <ConstructorDeclaration , Set <SourcePropertyBuilder >>
15651565 constructorInitializedFields = new Map .identity ();
1566- Set <PropertyBuilder >? initializedFieldBuilders = null ;
1567- Set <PropertyBuilder >? uninitializedInstanceFields;
1566+ Set <SourcePropertyBuilder >? initializedFieldBuilders = null ;
1567+ Set <SourcePropertyBuilder >? uninitializedInstanceFields;
15681568
15691569 Iterator <ConstructorDeclaration > constructorIterator =
15701570 classDeclaration.fullConstructorIterator <ConstructorDeclaration >();
@@ -1581,7 +1581,7 @@ class KernelTarget {
15811581 nonFinalFields.clear ();
15821582 }
15831583 if (constructor.isConst && lateFinalFields.isNotEmpty) {
1584- for (PropertyBuilder field in lateFinalFields) {
1584+ for (SourcePropertyBuilder field in lateFinalFields) {
15851585 classDeclaration.addProblem (
15861586 messageConstConstructorLateFinalFieldError,
15871587 field.fileOffset,
@@ -1597,23 +1597,24 @@ class KernelTarget {
15971597 // Assume that an external constructor initializes all uninitialized
15981598 // instance fields.
15991599 uninitializedInstanceFields ?? = uninitializedFields
1600- .where ((PropertyBuilder fieldBuilder) => ! fieldBuilder.isStatic)
1600+ .where (
1601+ (SourcePropertyBuilder fieldBuilder) => ! fieldBuilder.isStatic)
16011602 .toSet ();
16021603 constructorInitializedFields[constructor] = uninitializedInstanceFields;
1603- (initializedFieldBuilders ?? = new Set <PropertyBuilder >.identity ())
1604+ (initializedFieldBuilders ?? = new Set <SourcePropertyBuilder >.identity ())
16041605 .addAll (uninitializedInstanceFields);
16051606 } else {
1606- Set <PropertyBuilder > fields =
1607+ Set <SourcePropertyBuilder > fields =
16071608 constructor.takeInitializedFields () ?? const {};
16081609 constructorInitializedFields[constructor] = fields;
1609- (initializedFieldBuilders ?? = new Set <PropertyBuilder >.identity ())
1610+ (initializedFieldBuilders ?? = new Set <SourcePropertyBuilder >.identity ())
16101611 .addAll (fields);
16111612 }
16121613 }
16131614
16141615 // Run through all fields that aren't initialized by any constructor, and
16151616 // set their initializer to `null`.
1616- for (PropertyBuilder fieldBuilder in uninitializedFields) {
1617+ for (SourcePropertyBuilder fieldBuilder in uninitializedFields) {
16171618 if (fieldBuilder.isExtensionTypeDeclaredInstanceField) continue ;
16181619 if (initializedFieldBuilders == null ||
16191620 ! initializedFieldBuilders.contains (fieldBuilder)) {
@@ -1653,11 +1654,11 @@ class KernelTarget {
16531654
16541655 // Run through all fields that are initialized by some constructor, and
16551656 // make sure that all other constructors also initialize them.
1656- for (MapEntry <ConstructorDeclaration , Set <PropertyBuilder >> entry
1657+ for (MapEntry <ConstructorDeclaration , Set <SourcePropertyBuilder >> entry
16571658 in constructorInitializedFields.entries) {
16581659 ConstructorDeclaration constructorBuilder = entry.key;
1659- Set <PropertyBuilder > fieldBuilders = entry.value;
1660- for (PropertyBuilder fieldBuilder
1660+ Set <SourcePropertyBuilder > fieldBuilders = entry.value;
1661+ for (SourcePropertyBuilder fieldBuilder
16611662 in initializedFieldBuilders! .difference (fieldBuilders)) {
16621663 if (fieldBuilder.isExtensionTypeDeclaredInstanceField) continue ;
16631664 if (! fieldBuilder.hasInitializer && ! fieldBuilder.isLate) {
0 commit comments