| 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 testSuperGet(); | 167 testSuperGet(); |
| 168 testSuperFieldSet(); | 168 testSuperFieldSet(); |
| 169 testSuperSetterSet(); | 169 testSuperSetterSet(); |
| 170 testSuperClosurization(); | 170 testSuperClosurization(); |
| 171 testForwardingConstructor(); | 171 testForwardingConstructor(); |
| 172 testForwardingConstructorTyped(); | 172 testForwardingConstructorTyped(); |
| 173 testForwardingConstructorGeneric(); | 173 testForwardingConstructorGeneric(); |
| 174 testEnum(); | 174 testEnum(); |
| 175 testStaticGenericMethod(); | 175 testStaticGenericMethod(); |
| 176 testInstanceGenericMethod(); | 176 testInstanceGenericMethod(); |
| 177 testDynamicPrivateMethodInvoke(); |
| 177 } | 178 } |
| 178 | 179 |
| 179 testEmpty() {} | 180 testEmpty() {} |
| 180 testNull() => null; | 181 testNull() => null; |
| 181 testTrue() => true; | 182 testTrue() => true; |
| 182 testFalse() => false; | 183 testFalse() => false; |
| 183 testInt() => 42; | 184 testInt() => 42; |
| 184 testDouble() => 37.5; | 185 testDouble() => 37.5; |
| 185 testString() => 'foo'; | 186 testString() => 'foo'; |
| 186 testStringInterpolation() => '${0}'; | 187 testStringInterpolation() => '${0}'; |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 591 testEnum() => Enum.A; | 592 testEnum() => Enum.A; |
| 592 | 593 |
| 593 List<T> staticGenericMethod<T>(T arg) => [arg]; | 594 List<T> staticGenericMethod<T>(T arg) => [arg]; |
| 594 testStaticGenericMethod() { | 595 testStaticGenericMethod() { |
| 595 staticGenericMethod<int>(0); | 596 staticGenericMethod<int>(0); |
| 596 } | 597 } |
| 597 | 598 |
| 598 testInstanceGenericMethod() { | 599 testInstanceGenericMethod() { |
| 599 new GenericClass<int, String>.generative().genericMethod<bool>(false); | 600 new GenericClass<int, String>.generative().genericMethod<bool>(false); |
| 600 } | 601 } |
| 602 |
| 603 testDynamicPrivateMethodInvoke([o]) => o._privateMethod(); |
| 601 ''', | 604 ''', |
| 602 'helper.dart': ''' | 605 'helper.dart': ''' |
| 603 class Class { | 606 class Class { |
| 604 const Class.generative(); | 607 const Class.generative(); |
| 605 factory Class.fact() => null; | 608 factory Class.fact() => null; |
| 606 const factory Class.redirect() = Class.generative; | 609 const factory Class.redirect() = Class.generative; |
| 607 } | 610 } |
| 608 class GenericClass<X, Y> { | 611 class GenericClass<X, Y> { |
| 609 const GenericClass.generative(); | 612 const GenericClass.generative(); |
| 610 factory GenericClass.fact() => null; | 613 factory GenericClass.fact() => null; |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 858 visitList(type.optionalParameterTypes), | 861 visitList(type.optionalParameterTypes), |
| 859 type.namedParameters, | 862 type.namedParameters, |
| 860 visitList(type.namedParameterTypes)); | 863 visitList(type.namedParameterTypes)); |
| 861 } | 864 } |
| 862 } | 865 } |
| 863 | 866 |
| 864 /// Perform unaliasing of all typedefs nested within a [ResolutionDartType]. | 867 /// Perform unaliasing of all typedefs nested within a [ResolutionDartType]. |
| 865 ResolutionDartType unalias(ResolutionDartType type) { | 868 ResolutionDartType unalias(ResolutionDartType type) { |
| 866 return const Unaliaser().visit(type); | 869 return const Unaliaser().visit(type); |
| 867 } | 870 } |
| OLD | NEW |