| OLD | NEW |
| 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 import 'package:kernel/ast.dart' as ir; | 5 import 'package:kernel/ast.dart' as ir; |
| 6 | 6 |
| 7 import '../common.dart'; | 7 import '../common.dart'; |
| 8 import '../common/backend_api.dart'; | 8 import '../common/backend_api.dart'; |
| 9 import '../common/names.dart'; | 9 import '../common/names.dart'; |
| 10 import '../compile_time_constants.dart'; | 10 import '../compile_time_constants.dart'; |
| (...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 558 MemberEntity member = | 558 MemberEntity member = |
| 559 worldBuilder.lookupClassMember(cls, name, setter: setter); | 559 worldBuilder.lookupClassMember(cls, name, setter: setter); |
| 560 if (member == null && required) { | 560 if (member == null && required) { |
| 561 throw new SpannableAssertionFailure(CURRENT_ELEMENT_SPANNABLE, | 561 throw new SpannableAssertionFailure(CURRENT_ELEMENT_SPANNABLE, |
| 562 "The member '$name' was not found in ${cls.name}."); | 562 "The member '$name' was not found in ${cls.name}."); |
| 563 } | 563 } |
| 564 return member; | 564 return member; |
| 565 } | 565 } |
| 566 | 566 |
| 567 @override | 567 @override |
| 568 void forEachMixin(ClassEntity cls, void f(ClassEntity mixin)) { |
| 569 throw new UnimplementedError('KernelElementEnvironment.forEachMixin'); |
| 570 } |
| 571 |
| 572 @override |
| 573 void forEachClassMember( |
| 574 ClassEntity cls, void f(ClassEntity declarer, MemberEntity member)) { |
| 575 throw new UnimplementedError( |
| 576 'KernelElementEnvironment.forEachInstanceMember'); |
| 577 } |
| 578 |
| 579 @override |
| 568 MemberEntity lookupLibraryMember(LibraryEntity library, String name, | 580 MemberEntity lookupLibraryMember(LibraryEntity library, String name, |
| 569 {bool setter: false, bool required: false}) { | 581 {bool setter: false, bool required: false}) { |
| 570 MemberEntity member = | 582 MemberEntity member = |
| 571 worldBuilder.lookupLibraryMember(library, name, setter: setter); | 583 worldBuilder.lookupLibraryMember(library, name, setter: setter); |
| 572 if (member == null && required) { | 584 if (member == null && required) { |
| 573 throw new SpannableAssertionFailure(CURRENT_ELEMENT_SPANNABLE, | 585 throw new SpannableAssertionFailure(CURRENT_ELEMENT_SPANNABLE, |
| 574 "The member '${name}' was not found in library '${library.name}'."); | 586 "The member '${name}' was not found in library '${library.name}'."); |
| 575 } | 587 } |
| 576 return member; | 588 return member; |
| 577 } | 589 } |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 853 } | 865 } |
| 854 | 866 |
| 855 InterfaceType getMixinTypeForClass(KClass cls) { | 867 InterfaceType getMixinTypeForClass(KClass cls) { |
| 856 KClassEnv env = builder._classEnvs[cls.classIndex]; | 868 KClassEnv env = builder._classEnvs[cls.classIndex]; |
| 857 ir.Supertype mixedInType = env.cls.mixedInType; | 869 ir.Supertype mixedInType = env.cls.mixedInType; |
| 858 if (mixedInType == null) return null; | 870 if (mixedInType == null) return null; |
| 859 return builder.createInterfaceType( | 871 return builder.createInterfaceType( |
| 860 mixedInType.classNode, mixedInType.typeArguments); | 872 mixedInType.classNode, mixedInType.typeArguments); |
| 861 } | 873 } |
| 862 } | 874 } |
| OLD | NEW |