| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 related_types; | 5 library related_types; |
| 6 | 6 |
| 7 import 'package:compiler/src/commandline_options.dart'; | 7 import 'package:compiler/src/commandline_options.dart'; |
| 8 import 'package:compiler/src/compiler.dart'; | 8 import 'package:compiler/src/compiler.dart'; |
| 9 import 'package:compiler/src/common_elements.dart'; | 9 import 'package:compiler/src/common_elements.dart'; |
| 10 import 'package:compiler/src/elements/resolution_types.dart'; | 10 import 'package:compiler/src/elements/resolution_types.dart'; |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 NodeList arguments, | 416 NodeList arguments, |
| 417 CallStructure callStructure, | 417 CallStructure callStructure, |
| 418 _) { | 418 _) { |
| 419 apply(arguments); | 419 apply(arguments); |
| 420 return findReturnType(function.type); | 420 return findReturnType(function.type); |
| 421 } | 421 } |
| 422 } | 422 } |
| 423 | 423 |
| 424 /// Computes the [ClassElement] implied by a type. | 424 /// Computes the [ClassElement] implied by a type. |
| 425 // TODO(johnniwinther): Handle type variables, function types and typedefs. | 425 // TODO(johnniwinther): Handle type variables, function types and typedefs. |
| 426 class ClassFinder extends BaseDartTypeVisitor<ClassElement, dynamic> { | 426 class ClassFinder extends BaseResolutionDartTypeVisitor<ClassElement, dynamic> { |
| 427 const ClassFinder(); | 427 const ClassFinder(); |
| 428 | 428 |
| 429 ClassElement findClass(ResolutionDartType type) => type.accept(this, null); | 429 ClassElement findClass(ResolutionDartType type) => type.accept(this, null); |
| 430 | 430 |
| 431 @override | 431 @override |
| 432 ClassElement visitType(ResolutionDartType type, _) => null; | 432 ClassElement visitType(ResolutionDartType type, _) => null; |
| 433 | 433 |
| 434 @override | 434 @override |
| 435 ClassElement visitInterfaceType(ResolutionInterfaceType type, _) { | 435 ClassElement visitInterfaceType(ResolutionInterfaceType type, _) { |
| 436 return type.element; | 436 return type.element; |
| 437 } | 437 } |
| 438 } | 438 } |
| OLD | NEW |