| 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 ClassEntity getSuperClass(ClassEntity cls) { |
| 569 throw new UnimplementedError('KernelElementEnvironment.getSuperClass'); |
| 570 } |
| 571 |
| 572 @override |
| 568 void forEachMixin(ClassEntity cls, void f(ClassEntity mixin)) { | 573 void forEachMixin(ClassEntity cls, void f(ClassEntity mixin)) { |
| 569 throw new UnimplementedError('KernelElementEnvironment.forEachMixin'); | 574 throw new UnimplementedError('KernelElementEnvironment.forEachMixin'); |
| 570 } | 575 } |
| 571 | 576 |
| 572 @override | 577 @override |
| 573 void forEachClassMember( | 578 void forEachClassMember( |
| 574 ClassEntity cls, void f(ClassEntity declarer, MemberEntity member)) { | 579 ClassEntity cls, void f(ClassEntity declarer, MemberEntity member)) { |
| 575 throw new UnimplementedError( | 580 throw new UnimplementedError( |
| 576 'KernelElementEnvironment.forEachInstanceMember'); | 581 'KernelElementEnvironment.forEachInstanceMember'); |
| 577 } | 582 } |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 865 } | 870 } |
| 866 | 871 |
| 867 InterfaceType getMixinTypeForClass(KClass cls) { | 872 InterfaceType getMixinTypeForClass(KClass cls) { |
| 868 KClassEnv env = builder._classEnvs[cls.classIndex]; | 873 KClassEnv env = builder._classEnvs[cls.classIndex]; |
| 869 ir.Supertype mixedInType = env.cls.mixedInType; | 874 ir.Supertype mixedInType = env.cls.mixedInType; |
| 870 if (mixedInType == null) return null; | 875 if (mixedInType == null) return null; |
| 871 return builder.createInterfaceType( | 876 return builder.createInterfaceType( |
| 872 mixedInType.classNode, mixedInType.typeArguments); | 877 mixedInType.classNode, mixedInType.typeArguments); |
| 873 } | 878 } |
| 874 } | 879 } |
| OLD | NEW |