| 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 788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 799 throw new ArgumentError("No library found for $member"); | 799 throw new ArgumentError("No library found for $member"); |
| 800 } | 800 } |
| 801 return builder._getLibrary(library); | 801 return builder._getLibrary(library); |
| 802 } | 802 } |
| 803 | 803 |
| 804 KLibrary getLibraryForFunction(KFunction function) => | 804 KLibrary getLibraryForFunction(KFunction function) => |
| 805 _getLibrary(function, builder._methodMap); | 805 _getLibrary(function, builder._methodMap); |
| 806 | 806 |
| 807 KLibrary getLibraryForField(KField field) => | 807 KLibrary getLibraryForField(KField field) => |
| 808 _getLibrary(field, builder._fieldMap); | 808 _getLibrary(field, builder._fieldMap); |
| 809 |
| 810 KClass getSuperclassForClass(KClass cls) { |
| 811 KClassEnv env = builder._classEnvs[cls.classIndex]; |
| 812 ir.Supertype supertype = env.cls.supertype; |
| 813 if (supertype == null) return null; |
| 814 return builder.getClass(supertype.classNode); |
| 815 } |
| 816 |
| 817 InterfaceType getMixinTypeForClass(KClass cls) { |
| 818 KClassEnv env = builder._classEnvs[cls.classIndex]; |
| 819 ir.Supertype mixedInType = env.cls.mixedInType; |
| 820 if (mixedInType == null) return null; |
| 821 return builder.createInterfaceType( |
| 822 mixedInType.classNode, mixedInType.typeArguments); |
| 823 } |
| 809 } | 824 } |
| OLD | NEW |