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

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

Issue 2859133003: Find native classes with mixins in NativeClassFinder (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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 ClassElement cls, void f(ClassElement declarer, MemberElement member)) { 299 ClassElement cls, void f(ClassElement declarer, MemberElement member)) {
300 cls.ensureResolved(_resolution); 300 cls.ensureResolved(_resolution);
301 cls.forEachMember((ClassElement declarer, MemberElement member) { 301 cls.forEachMember((ClassElement declarer, MemberElement member) {
302 if (member.isSynthesized) return; 302 if (member.isSynthesized) return;
303 if (member.isMalformed) return; 303 if (member.isMalformed) return;
304 f(declarer, member); 304 f(declarer, member);
305 }, includeSuperAndInjectedMembers: true); 305 }, includeSuperAndInjectedMembers: true);
306 } 306 }
307 307
308 @override 308 @override
309 ClassEntity getSuperClass(ClassElement cls) { 309 ClassEntity getSuperClass(ClassElement cls,
310 {bool skipUnnamedMixinApplications: false}) {
310 cls.ensureResolved(_resolution); 311 cls.ensureResolved(_resolution);
311 return cls.superclass; 312 ClassElement superclass = cls.superclass;
313 if (skipUnnamedMixinApplications) {
314 while (superclass != null && superclass.isUnnamedMixinApplication) {
315 superclass = superclass.superclass;
316 }
317 }
318 return superclass;
312 } 319 }
313 320
314 @override 321 @override
315 void forEachSupertype( 322 void forEachSupertype(
316 ClassElement cls, void f(ResolutionInterfaceType supertype)) { 323 ClassElement cls, void f(ResolutionInterfaceType supertype)) {
317 cls.allSupertypes 324 cls.allSupertypes
318 .forEach((ResolutionInterfaceType supertype) => f(supertype)); 325 .forEach((ResolutionInterfaceType supertype) => f(supertype));
319 } 326 }
320 327
321 @override 328 @override
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 } 619 }
613 } 620 }
614 }); 621 });
615 }); 622 });
616 } 623 }
617 624
618 _compiler.libraryLoader.libraries 625 _compiler.libraryLoader.libraries
619 .forEach(processJsInteropAnnotationsInLibrary); 626 .forEach(processJsInteropAnnotationsInLibrary);
620 } 627 }
621 } 628 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/native/resolver.dart ('k') | tests/compiler/dart2js/kernel/closed_world2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698