| 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.element_map; | 5 library dart2js.kernel.element_map; |
| 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/names.dart' show Identifiers; | 10 import '../common/names.dart' show Identifiers; |
| (...skipping 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1162 throw new UnimplementedError( | 1162 throw new UnimplementedError( |
| 1163 "KernelNativeBehaviorComputer.trustJSInteropTypeAnnotations"); | 1163 "KernelNativeBehaviorComputer.trustJSInteropTypeAnnotations"); |
| 1164 } | 1164 } |
| 1165 | 1165 |
| 1166 @override | 1166 @override |
| 1167 DiagnosticReporter get reporter { | 1167 DiagnosticReporter get reporter { |
| 1168 throw new UnimplementedError("KernelNativeBehaviorComputer.reporter"); | 1168 throw new UnimplementedError("KernelNativeBehaviorComputer.reporter"); |
| 1169 } | 1169 } |
| 1170 | 1170 |
| 1171 @override | 1171 @override |
| 1172 NativeData get nativeData { | 1172 NativeBasicData get nativeBasicData { |
| 1173 throw new UnimplementedError("KernelNativeBehaviorComputer.nativeData"); | 1173 throw new UnimplementedError( |
| 1174 "KernelNativeBehaviorComputer.nativeBasicData"); |
| 1174 } | 1175 } |
| 1175 } | 1176 } |
| 1176 | 1177 |
| 1177 /// Constant environment mapping [ConstantExpression]s to [ConstantValue]s using | 1178 /// Constant environment mapping [ConstantExpression]s to [ConstantValue]s using |
| 1178 /// [_EvaluationEnvironment] for the evaluation. | 1179 /// [_EvaluationEnvironment] for the evaluation. |
| 1179 class KernelConstantEnvironment implements ConstantEnvironment { | 1180 class KernelConstantEnvironment implements ConstantEnvironment { |
| 1180 KernelToElementMap _worldBuilder; | 1181 KernelToElementMap _worldBuilder; |
| 1181 Map<ConstantExpression, ConstantValue> _valueMap = | 1182 Map<ConstantExpression, ConstantValue> _valueMap = |
| 1182 <ConstantExpression, ConstantValue>{}; | 1183 <ConstantExpression, ConstantValue>{}; |
| 1183 | 1184 |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1302 } | 1303 } |
| 1303 | 1304 |
| 1304 InterfaceType getMixinTypeForClass(KClass cls) { | 1305 InterfaceType getMixinTypeForClass(KClass cls) { |
| 1305 _KClassEnv env = elementMap._classEnvs[cls.classIndex]; | 1306 _KClassEnv env = elementMap._classEnvs[cls.classIndex]; |
| 1306 ir.Supertype mixedInType = env.cls.mixedInType; | 1307 ir.Supertype mixedInType = env.cls.mixedInType; |
| 1307 if (mixedInType == null) return null; | 1308 if (mixedInType == null) return null; |
| 1308 return elementMap.createInterfaceType( | 1309 return elementMap.createInterfaceType( |
| 1309 mixedInType.classNode, mixedInType.typeArguments); | 1310 mixedInType.classNode, mixedInType.typeArguments); |
| 1310 } | 1311 } |
| 1311 } | 1312 } |
| OLD | NEW |