| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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.impact_test; | 5 library dart2js.kernel.impact_test; |
| 6 | 6 |
| 7 import 'package:async_helper/async_helper.dart'; | 7 import 'package:async_helper/async_helper.dart'; |
| 8 import 'package:compiler/src/commandline_options.dart'; | 8 import 'package:compiler/src/commandline_options.dart'; |
| 9 import 'package:compiler/src/common.dart'; | 9 import 'package:compiler/src/common.dart'; |
| 10 import 'package:compiler/src/common/names.dart'; | 10 import 'package:compiler/src/common/names.dart'; |
| (...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 851 builder.registerFeature(feature); | 851 builder.registerFeature(feature); |
| 852 break; | 852 break; |
| 853 } | 853 } |
| 854 } | 854 } |
| 855 impact.nativeData.forEach(builder.registerNativeData); | 855 impact.nativeData.forEach(builder.registerNativeData); |
| 856 return builder; | 856 return builder; |
| 857 } | 857 } |
| 858 | 858 |
| 859 /// Visitor the performers unaliasing of all typedefs nested within a | 859 /// Visitor the performers unaliasing of all typedefs nested within a |
| 860 /// [ResolutionDartType]. | 860 /// [ResolutionDartType]. |
| 861 class Unaliaser extends BaseDartTypeVisitor<dynamic, ResolutionDartType> { | 861 class Unaliaser |
| 862 extends BaseResolutionDartTypeVisitor<dynamic, ResolutionDartType> { |
| 862 const Unaliaser(); | 863 const Unaliaser(); |
| 863 | 864 |
| 864 @override | 865 @override |
| 865 ResolutionDartType visit(ResolutionDartType type, [_]) => | 866 ResolutionDartType visit(ResolutionDartType type, [_]) => |
| 866 type.accept(this, null); | 867 type.accept(this, null); |
| 867 | 868 |
| 868 @override | 869 @override |
| 869 ResolutionDartType visitType(ResolutionDartType type, _) => type; | 870 ResolutionDartType visitType(ResolutionDartType type, _) => type; |
| 870 | 871 |
| 871 List<ResolutionDartType> visitList(List<ResolutionDartType> types) => | 872 List<ResolutionDartType> visitList(List<ResolutionDartType> types) => |
| (...skipping 17 matching lines...) Expand all Loading... |
| 889 visitList(type.optionalParameterTypes), | 890 visitList(type.optionalParameterTypes), |
| 890 type.namedParameters, | 891 type.namedParameters, |
| 891 visitList(type.namedParameterTypes)); | 892 visitList(type.namedParameterTypes)); |
| 892 } | 893 } |
| 893 } | 894 } |
| 894 | 895 |
| 895 /// Perform unaliasing of all typedefs nested within a [ResolutionDartType]. | 896 /// Perform unaliasing of all typedefs nested within a [ResolutionDartType]. |
| 896 ResolutionDartType unalias(ResolutionDartType type) { | 897 ResolutionDartType unalias(ResolutionDartType type) { |
| 897 return const Unaliaser().visit(type); | 898 return const Unaliaser().visit(type); |
| 898 } | 899 } |
| OLD | NEW |