| 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/names.dart'; | 8 import '../common/names.dart'; |
| 9 import '../core_types.dart'; | 9 import '../core_types.dart'; |
| 10 import '../elements/elements.dart'; | 10 import '../elements/elements.dart'; |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 }); | 205 }); |
| 206 return list; | 206 return list; |
| 207 } | 207 } |
| 208 | 208 |
| 209 @override | 209 @override |
| 210 InterfaceType getThisType(ClassEntity cls) { | 210 InterfaceType getThisType(ClassEntity cls) { |
| 211 throw new UnimplementedError('KernelWorldBuilder.getThisType'); | 211 throw new UnimplementedError('KernelWorldBuilder.getThisType'); |
| 212 } | 212 } |
| 213 | 213 |
| 214 @override | 214 @override |
| 215 InterfaceType getRawType(ClassEntity cls) { | 215 InterfaceType getRawType(KClass cls) { |
| 216 throw new UnimplementedError('KernelWorldBuilder.getRawType'); | 216 KClassEnv env = _classEnvs[cls.classIndex]; |
| 217 ir.Class node = env.cls; |
| 218 // TODO(johnniwinther): Add the type argument to the list literal when we |
| 219 // no longer use resolution types. |
| 220 return new InterfaceType( |
| 221 cls, |
| 222 new List/*<DartType>*/ .filled( |
| 223 node.typeParameters.length, const DynamicType())); |
| 217 } | 224 } |
| 218 | 225 |
| 219 @override | 226 @override |
| 220 InterfaceType getInterfaceTypeForJsInterceptorCall(ir.StaticInvocation node) { | |
| 221 throw new UnimplementedError('KernelWorldBuilder.getDartType'); | |
| 222 } | |
| 223 | |
| 224 @override | |
| 225 native.NativeBehavior getNativeBehaviorForJsEmbeddedGlobalCall( | |
| 226 ir.StaticInvocation node) { | |
| 227 throw new UnimplementedError('KernelWorldBuilder.getDartType'); | |
| 228 } | |
| 229 | |
| 230 @override | |
| 231 native.NativeBehavior getNativeBehaviorForJsBuiltinCall( | |
| 232 ir.StaticInvocation node) { | |
| 233 throw new UnimplementedError('KernelWorldBuilder.getDartType'); | |
| 234 } | |
| 235 | |
| 236 @override | |
| 237 native.NativeBehavior getNativeBehaviorForJsCall(ir.StaticInvocation node) { | |
| 238 throw new UnimplementedError('KernelWorldBuilder.getDartType'); | |
| 239 } | |
| 240 | |
| 241 @override | |
| 242 native.NativeBehavior getNativeBehaviorForMethod(ir.Procedure procedure) { | 227 native.NativeBehavior getNativeBehaviorForMethod(ir.Procedure procedure) { |
| 243 throw new UnimplementedError('KernelWorldBuilder.getDartType'); | 228 throw new UnimplementedError('KernelWorldBuilder.getDartType'); |
| 244 } | 229 } |
| 245 | 230 |
| 246 @override | 231 @override |
| 247 native.NativeBehavior getNativeBehaviorForFieldStore(ir.Field field) { | 232 native.NativeBehavior getNativeBehaviorForFieldStore(ir.Field field) { |
| 248 throw new UnimplementedError('KernelWorldBuilder.getDartType'); | 233 throw new UnimplementedError('KernelWorldBuilder.getDartType'); |
| 249 } | 234 } |
| 250 | 235 |
| 251 @override | 236 @override |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 } | 336 } |
| 352 | 337 |
| 353 @override | 338 @override |
| 354 InterfaceType createInterfaceType( | 339 InterfaceType createInterfaceType( |
| 355 ClassEntity cls, List<DartType> typeArguments) { | 340 ClassEntity cls, List<DartType> typeArguments) { |
| 356 return new InterfaceType(cls, typeArguments); | 341 return new InterfaceType(cls, typeArguments); |
| 357 } | 342 } |
| 358 | 343 |
| 359 @override | 344 @override |
| 360 InterfaceType getRawType(ClassEntity cls) { | 345 InterfaceType getRawType(ClassEntity cls) { |
| 361 throw new UnimplementedError('KernelCommonElements.getRawType'); | 346 return worldBuilder.getRawType(cls); |
| 362 } | 347 } |
| 363 | 348 |
| 364 @override | 349 @override |
| 365 FunctionEntity findConstructor(ClassEntity cls, String name, | 350 FunctionEntity findConstructor(ClassEntity cls, String name, |
| 366 {bool required: true}) { | 351 {bool required: true}) { |
| 367 throw new UnimplementedError('KernelCommonElements.findConstructor'); | 352 throw new UnimplementedError('KernelCommonElements.findConstructor'); |
| 368 } | 353 } |
| 369 | 354 |
| 370 @override | 355 @override |
| 371 MemberEntity findClassMember(ClassEntity cls, String name, | 356 MemberEntity findClassMember(ClassEntity cls, String name, |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 } | 496 } |
| 512 return builder._getLibrary(library); | 497 return builder._getLibrary(library); |
| 513 } | 498 } |
| 514 | 499 |
| 515 KLibrary getLibraryForFunction(KFunction function) => | 500 KLibrary getLibraryForFunction(KFunction function) => |
| 516 _getLibrary(function, builder._methodMap); | 501 _getLibrary(function, builder._methodMap); |
| 517 | 502 |
| 518 KLibrary getLibraryForField(KField field) => | 503 KLibrary getLibraryForField(KField field) => |
| 519 _getLibrary(field, builder._fieldMap); | 504 _getLibrary(field, builder._fieldMap); |
| 520 } | 505 } |
| OLD | NEW |