| 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.resolution_strategy; | 5 library dart2js.resolution_strategy; |
| 6 | 6 |
| 7 import 'package:front_end/src/fasta/scanner.dart' show Token; | 7 import 'package:front_end/src/fasta/scanner.dart' show Token; |
| 8 | 8 |
| 9 import '../../compiler_new.dart' as api; | 9 import '../../compiler_new.dart' as api; |
| 10 import '../common.dart'; | 10 import '../common.dart'; |
| (...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 661 ClassElement definingClass = | 661 ClassElement definingClass = |
| 662 constructor.definingConstructor.enclosingClass; | 662 constructor.definingConstructor.enclosingClass; |
| 663 type = type.substByContext( | 663 type = type.substByContext( |
| 664 method.enclosingClass.thisType.asInstanceOf(definingClass)); | 664 method.enclosingClass.thisType.asInstanceOf(definingClass)); |
| 665 } | 665 } |
| 666 } | 666 } |
| 667 return type; | 667 return type; |
| 668 } | 668 } |
| 669 | 669 |
| 670 @override | 670 @override |
| 671 DartType getFieldType(covariant FieldElement field) { |
| 672 field.computeType(_resolution); |
| 673 return field.type; |
| 674 } |
| 675 |
| 676 @override |
| 671 ResolutionFunctionType getLocalFunctionType( | 677 ResolutionFunctionType getLocalFunctionType( |
| 672 covariant LocalFunctionElement function) { | 678 covariant LocalFunctionElement function) { |
| 673 return function.type; | 679 return function.type; |
| 674 } | 680 } |
| 675 | 681 |
| 676 @override | 682 @override |
| 677 ResolutionDartType getUnaliasedType(covariant ResolutionDartType type) { | 683 ResolutionDartType getUnaliasedType(covariant ResolutionDartType type) { |
| 678 type.computeUnaliased(_resolution); | 684 type.computeUnaliased(_resolution); |
| 679 return type.unaliased; | 685 return type.unaliased; |
| 680 } | 686 } |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 952 | 958 |
| 953 @override | 959 @override |
| 954 void forEachConstructor( | 960 void forEachConstructor( |
| 955 covariant ClassElement cls, void f(ConstructorEntity constructor)) { | 961 covariant ClassElement cls, void f(ConstructorEntity constructor)) { |
| 956 cls.constructors.forEach((Element _constructor) { | 962 cls.constructors.forEach((Element _constructor) { |
| 957 ConstructorElement constructor = _constructor; | 963 ConstructorElement constructor = _constructor; |
| 958 f(constructor); | 964 f(constructor); |
| 959 }); | 965 }); |
| 960 } | 966 } |
| 961 } | 967 } |
| OLD | NEW |