| 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 675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 686 entryPoint: entryPoint, | 686 entryPoint: entryPoint, |
| 687 memorySourceFiles: SOURCE, | 687 memorySourceFiles: SOURCE, |
| 688 options: [ | 688 options: [ |
| 689 fullTest ? Flags.analyzeAll : Flags.analyzeOnly, | 689 fullTest ? Flags.analyzeAll : Flags.analyzeOnly, |
| 690 Flags.useKernel, | 690 Flags.useKernel, |
| 691 Flags.enableAssertMessage | 691 Flags.enableAssertMessage |
| 692 ]); | 692 ]); |
| 693 compiler.resolution.retainCachesForTesting = true; | 693 compiler.resolution.retainCachesForTesting = true; |
| 694 Expect.isTrue(await compiler.run(entryPoint)); | 694 Expect.isTrue(await compiler.run(entryPoint)); |
| 695 JavaScriptBackend backend = compiler.backend; | 695 JavaScriptBackend backend = compiler.backend; |
| 696 KernelElementAdapter kernelElementAdapter = | 696 KernelWorldBuilder kernelElementAdapter = |
| 697 new KernelWorldBuilder(compiler.reporter, backend.kernelTask.program); | 697 new KernelWorldBuilder(compiler.reporter); |
| 698 kernelElementAdapter.addProgram(backend.kernelTask.program); |
| 698 | 699 |
| 699 checkLibrary(compiler, kernelElementAdapter, compiler.mainApp, | 700 checkLibrary(compiler, kernelElementAdapter, compiler.mainApp, |
| 700 fullTest: fullTest); | 701 fullTest: fullTest); |
| 701 compiler.libraryLoader.libraries.forEach((LibraryElement library) { | 702 compiler.libraryLoader.libraries.forEach((LibraryElement library) { |
| 702 if (library == compiler.mainApp) return; | 703 if (library == compiler.mainApp) return; |
| 703 checkLibrary(compiler, kernelElementAdapter, library, fullTest: fullTest); | 704 checkLibrary(compiler, kernelElementAdapter, library, fullTest: fullTest); |
| 704 }); | 705 }); |
| 705 }); | 706 }); |
| 706 } | 707 } |
| 707 | 708 |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 890 visitList(type.optionalParameterTypes), | 891 visitList(type.optionalParameterTypes), |
| 891 type.namedParameters, | 892 type.namedParameters, |
| 892 visitList(type.namedParameterTypes)); | 893 visitList(type.namedParameterTypes)); |
| 893 } | 894 } |
| 894 } | 895 } |
| 895 | 896 |
| 896 /// Perform unaliasing of all typedefs nested within a [ResolutionDartType]. | 897 /// Perform unaliasing of all typedefs nested within a [ResolutionDartType]. |
| 897 ResolutionDartType unalias(ResolutionDartType type) { | 898 ResolutionDartType unalias(ResolutionDartType type) { |
| 898 return const Unaliaser().visit(type); | 899 return const Unaliaser().visit(type); |
| 899 } | 900 } |
| OLD | NEW |