@@ -56,7 +56,7 @@ import '../dill/dill_member_builder.dart' show DillMemberBuilder;
5656import 'builder.dart'
5757 show
5858 ConstructorReferenceBuilder,
59- Declaration ,
59+ Builder ,
6060 LibraryBuilder,
6161 MemberBuilder,
6262 MetadataBuilder,
@@ -107,7 +107,7 @@ import '../fasta_codes.dart'
107107import '../kernel/kernel_builder.dart'
108108 show
109109 ConstructorReferenceBuilder,
110- Declaration ,
110+ Builder ,
111111 FunctionBuilder,
112112 NamedTypeBuilder,
113113 LibraryBuilder,
@@ -204,7 +204,7 @@ abstract class ClassBuilder extends TypeDeclarationBuilder {
204204 }
205205
206206 void buildOutlineExpressions (LibraryBuilder library) {
207- void build (String ignore, Declaration declaration) {
207+ void build (String ignore, Builder declaration) {
208208 MemberBuilder member = declaration;
209209 member.buildOutlineExpressions (library);
210210 }
@@ -244,7 +244,7 @@ abstract class ClassBuilder extends TypeDeclarationBuilder {
244244 // Copy keys to avoid concurrent modification error.
245245 List <String > names = constructors.keys.toList ();
246246 for (String name in names) {
247- Declaration declaration = constructors[name];
247+ Builder declaration = constructors[name];
248248 do {
249249 if (declaration.parent != this ) {
250250 unexpected ("$fileUri " , "${declaration .parent .fileUri }" , charOffset,
@@ -255,7 +255,7 @@ abstract class ClassBuilder extends TypeDeclarationBuilder {
255255 ConstructorReferenceBuilder redirectionTarget =
256256 declaration.redirectionTarget;
257257 if (redirectionTarget != null ) {
258- Declaration targetBuilder = redirectionTarget.target;
258+ Builder targetBuilder = redirectionTarget.target;
259259 if (declaration.next == null ) {
260260 // Only the first one (that is, the last on in the linked list)
261261 // is actually in the kernel tree. This call creates a StaticGet
@@ -324,13 +324,13 @@ abstract class ClassBuilder extends TypeDeclarationBuilder {
324324 }
325325
326326 /// Used to lookup a static member of this class.
327- Declaration findStaticBuilder (
327+ Builder findStaticBuilder (
328328 String name, int charOffset, Uri fileUri, LibraryBuilder accessingLibrary,
329329 {bool isSetter: false }) {
330330 if (accessingLibrary.origin != library.origin && name.startsWith ("_" )) {
331331 return null ;
332332 }
333- Declaration declaration = isSetter
333+ Builder declaration = isSetter
334334 ? scope.lookupSetter (name, charOffset, fileUri, isInstanceScope: false )
335335 : scope.lookup (name, charOffset, fileUri, isInstanceScope: false );
336336 if (declaration == null && isPatch) {
@@ -341,20 +341,20 @@ abstract class ClassBuilder extends TypeDeclarationBuilder {
341341 return declaration;
342342 }
343343
344- Declaration findConstructorOrFactory (
344+ Builder findConstructorOrFactory (
345345 String name, int charOffset, Uri uri, LibraryBuilder accessingLibrary) {
346346 if (accessingLibrary.origin != library.origin && name.startsWith ("_" )) {
347347 return null ;
348348 }
349- Declaration declaration = constructors.lookup (name, charOffset, uri);
349+ Builder declaration = constructors.lookup (name, charOffset, uri);
350350 if (declaration == null && isPatch) {
351351 return origin.findConstructorOrFactory (
352352 name, charOffset, uri, accessingLibrary);
353353 }
354354 return declaration;
355355 }
356356
357- void forEach (void f (String name, Declaration builder)) {
357+ void forEach (void f (String name, Builder builder)) {
358358 scope.forEach (f);
359359 }
360360
@@ -384,7 +384,7 @@ abstract class ClassBuilder extends TypeDeclarationBuilder {
384384 /// For example, this method is convenient for use when building synthetic
385385 /// members, such as those of an enum.
386386 MemberBuilder firstMemberNamed (String name) {
387- Declaration declaration = getLocalMember (name);
387+ Builder declaration = getLocalMember (name);
388388 while (declaration.next != null ) {
389389 declaration = declaration.next;
390390 }
@@ -484,7 +484,7 @@ abstract class ClassBuilder extends TypeDeclarationBuilder {
484484 ClassBuilder superClass;
485485 TypeBuilder superClassType = supertype;
486486 if (superClassType is NamedTypeBuilder ) {
487- Declaration decl = superClassType.declaration;
487+ Builder decl = superClassType.declaration;
488488 if (decl is ClassBuilder ) {
489489 superClass = decl;
490490 }
@@ -497,7 +497,7 @@ abstract class ClassBuilder extends TypeDeclarationBuilder {
497497 for (TypeBuilder type in interfaces) {
498498 if (type is NamedTypeBuilder ) {
499499 int charOffset = - 1 ; // TODO(ahe): Get offset from type.
500- Declaration decl = type.declaration;
500+ Builder decl = type.declaration;
501501 if (decl is ClassBuilder ) {
502502 ClassBuilder interface = decl;
503503 if (superClass == interface ) {
@@ -1424,7 +1424,7 @@ abstract class ClassBuilder extends TypeDeclarationBuilder {
14241424
14251425 void checkMixinDeclaration () {
14261426 assert (cls.isMixinDeclaration);
1427- for (Declaration constructory in constructors.local.values) {
1427+ for (Builder constructory in constructors.local.values) {
14281428 if (! constructory.isSynthetic &&
14291429 (constructory.isFactory || constructory.isConstructor)) {
14301430 addProblem (
@@ -1463,24 +1463,24 @@ abstract class ClassBuilder extends TypeDeclarationBuilder {
14631463 }
14641464
14651465 @override
1466- void applyPatch (Declaration patch) {
1466+ void applyPatch (Builder patch) {
14671467 if (patch is ClassBuilder ) {
14681468 patch.actualOrigin = this ;
14691469 // TODO(ahe): Complain if `patch.supertype` isn't null.
1470- scope.local.forEach ((String name, Declaration member) {
1471- Declaration memberPatch = patch.scope.local[name];
1470+ scope.local.forEach ((String name, Builder member) {
1471+ Builder memberPatch = patch.scope.local[name];
14721472 if (memberPatch != null ) {
14731473 member.applyPatch (memberPatch);
14741474 }
14751475 });
1476- scope.setters.forEach ((String name, Declaration member) {
1477- Declaration memberPatch = patch.scope.setters[name];
1476+ scope.setters.forEach ((String name, Builder member) {
1477+ Builder memberPatch = patch.scope.setters[name];
14781478 if (memberPatch != null ) {
14791479 member.applyPatch (memberPatch);
14801480 }
14811481 });
1482- constructors.local.forEach ((String name, Declaration member) {
1483- Declaration memberPatch = patch.constructors.local[name];
1482+ constructors.local.forEach ((String name, Builder member) {
1483+ Builder memberPatch = patch.constructors.local[name];
14841484 if (memberPatch != null ) {
14851485 member.applyPatch (memberPatch);
14861486 }
@@ -1640,7 +1640,7 @@ abstract class ClassBuilder extends TypeDeclarationBuilder {
16401640 Map <String , MemberBuilder > constructors = this .constructors.local;
16411641 Iterable <String > names = constructors.keys;
16421642 for (String name in names) {
1643- Declaration constructor = constructors[name];
1643+ Builder constructor = constructors[name];
16441644 do {
16451645 if (constructor is RedirectingFactoryBuilder ) {
16461646 checkRedirectingFactory (constructor, typeEnvironment);
0 commit comments