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

Side by Side Diff: pkg/compiler/lib/src/resolution/resolution_strategy.dart

Issue 2871573007: Skip constructors from ElementEnvironment.forEachClassMember (Closed)
Patch Set: Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library dart2js.resolution_strategy; 5 library dart2js.resolution_strategy;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../common_elements.dart'; 8 import '../common_elements.dart';
9 import '../common/backend_api.dart'; 9 import '../common/backend_api.dart';
10 import '../common/names.dart'; 10 import '../common/names.dart';
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 return constructor?.declaration; 303 return constructor?.declaration;
304 } 304 }
305 305
306 @override 306 @override
307 void forEachClassMember( 307 void forEachClassMember(
308 ClassElement cls, void f(ClassElement declarer, MemberElement member)) { 308 ClassElement cls, void f(ClassElement declarer, MemberElement member)) {
309 cls.ensureResolved(_resolution); 309 cls.ensureResolved(_resolution);
310 cls.forEachMember((ClassElement declarer, MemberElement member) { 310 cls.forEachMember((ClassElement declarer, MemberElement member) {
311 if (member.isSynthesized) return; 311 if (member.isSynthesized) return;
312 if (member.isMalformed) return; 312 if (member.isMalformed) return;
313 if (member.isConstructor) return;
313 f(declarer, member); 314 f(declarer, member);
314 }, includeSuperAndInjectedMembers: true); 315 }, includeSuperAndInjectedMembers: true);
315 } 316 }
316 317
317 @override 318 @override
318 ClassEntity getSuperClass(ClassElement cls, 319 ClassEntity getSuperClass(ClassElement cls,
319 {bool skipUnnamedMixinApplications: false}) { 320 {bool skipUnnamedMixinApplications: false}) {
320 cls.ensureResolved(_resolution); 321 cls.ensureResolved(_resolution);
321 ClassElement superclass = cls.superclass; 322 ClassElement superclass = cls.superclass;
322 if (skipUnnamedMixinApplications) { 323 if (skipUnnamedMixinApplications) {
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 @override 663 @override
663 WorkItem createWorkItem(MemberElement element) { 664 WorkItem createWorkItem(MemberElement element) {
664 assert(invariant(element, element.isDeclaration)); 665 assert(invariant(element, element.isDeclaration));
665 if (element.isMalformed) return null; 666 if (element.isMalformed) return null;
666 667
667 assert(invariant(element, element is AnalyzableElement, 668 assert(invariant(element, element is AnalyzableElement,
668 message: 'Element $element is not analyzable.')); 669 message: 'Element $element is not analyzable.'));
669 return _resolution.createWorkItem(element); 670 return _resolution.createWorkItem(element);
670 } 671 }
671 } 672 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698