| 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 library dart2js.kernel.world_builder; | 5 library dart2js.kernel.world_builder; |
| 6 | 6 |
| 7 import 'package:kernel/ast.dart' as ir; | 7 import 'package:kernel/ast.dart' as ir; |
| 8 | 8 |
| 9 import '../common.dart'; | 9 import '../common.dart'; |
| 10 import '../common/backend_api.dart'; | 10 import '../common/backend_api.dart'; |
| (...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 552 InterfaceType getThisType(ClassEntity cls) { | 552 InterfaceType getThisType(ClassEntity cls) { |
| 553 return worldBuilder._getThisType(cls); | 553 return worldBuilder._getThisType(cls); |
| 554 } | 554 } |
| 555 | 555 |
| 556 @override | 556 @override |
| 557 InterfaceType getRawType(ClassEntity cls) { | 557 InterfaceType getRawType(ClassEntity cls) { |
| 558 return worldBuilder._getRawType(cls); | 558 return worldBuilder._getRawType(cls); |
| 559 } | 559 } |
| 560 | 560 |
| 561 @override | 561 @override |
| 562 DartType getTypeVariableBound(TypeVariableEntity typeVariable) { |
| 563 throw new UnimplementedError( |
| 564 'KernelElementEnvironment.getTypeVariableBound'); |
| 565 } |
| 566 |
| 567 @override |
| 562 InterfaceType createInterfaceType( | 568 InterfaceType createInterfaceType( |
| 563 ClassEntity cls, List<DartType> typeArguments) { | 569 ClassEntity cls, List<DartType> typeArguments) { |
| 564 return new InterfaceType(cls, typeArguments); | 570 return new InterfaceType(cls, typeArguments); |
| 565 } | 571 } |
| 566 | 572 |
| 567 @override | 573 @override |
| 568 bool isSubtype(DartType a, DartType b) { | 574 bool isSubtype(DartType a, DartType b) { |
| 569 throw new UnimplementedError('KernelElementEnvironment.isSubtype'); | 575 throw new UnimplementedError('KernelElementEnvironment.isSubtype'); |
| 570 } | 576 } |
| 571 | 577 |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 892 } | 898 } |
| 893 | 899 |
| 894 InterfaceType getMixinTypeForClass(KClass cls) { | 900 InterfaceType getMixinTypeForClass(KClass cls) { |
| 895 KClassEnv env = builder._classEnvs[cls.classIndex]; | 901 KClassEnv env = builder._classEnvs[cls.classIndex]; |
| 896 ir.Supertype mixedInType = env.cls.mixedInType; | 902 ir.Supertype mixedInType = env.cls.mixedInType; |
| 897 if (mixedInType == null) return null; | 903 if (mixedInType == null) return null; |
| 898 return builder.createInterfaceType( | 904 return builder.createInterfaceType( |
| 899 mixedInType.classNode, mixedInType.typeArguments); | 905 mixedInType.classNode, mixedInType.typeArguments); |
| 900 } | 906 } |
| 901 } | 907 } |
| OLD | NEW |