| 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 // Partial test that the closed world computed from [WorldImpact]s derived from | 5 // Partial test that the closed world computed from [WorldImpact]s derived from |
| 6 // kernel is equivalent to the original computed from resolution. | 6 // kernel is equivalent to the original computed from resolution. |
| 7 library dart2js.kernel.closed_world2_test; | 7 library dart2js.kernel.closed_world2_test; |
| 8 | 8 |
| 9 import 'dart:async'; | 9 import 'dart:async'; |
| 10 | 10 |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 | 141 |
| 142 ResolutionEnqueuer enqueuer2 = compiler2.enqueuer.resolution; | 142 ResolutionEnqueuer enqueuer2 = compiler2.enqueuer.resolution; |
| 143 ClosedWorld closedWorld2 = compiler2.resolutionWorldBuilder.closeWorld(); | 143 ClosedWorld closedWorld2 = compiler2.resolutionWorldBuilder.closeWorld(); |
| 144 BackendUsage backendUsage2 = closedWorld2.backendUsage; | 144 BackendUsage backendUsage2 = closedWorld2.backendUsage; |
| 145 | 145 |
| 146 checkNativeClasses(compiler1, compiler2, strategy); | 146 checkNativeClasses(compiler1, compiler2, strategy); |
| 147 | 147 |
| 148 checkBackendUsage(backendUsage1, backendUsage2, strategy); | 148 checkBackendUsage(backendUsage1, backendUsage2, strategy); |
| 149 | 149 |
| 150 checkResolutionEnqueuers(backendUsage1, backendUsage2, enqueuer1, enqueuer2, | 150 checkResolutionEnqueuers(backendUsage1, backendUsage2, enqueuer1, enqueuer2, |
| 151 elementEquivalence: equivalence.entityEquivalence, | 151 elementEquivalence: (a, b) => equivalence.entityEquivalence(a, b), |
| 152 typeEquivalence: (ResolutionDartType a, DartType b) { | 152 typeEquivalence: (ResolutionDartType a, DartType b) { |
| 153 return equivalence.typeEquivalence(unalias(a), b); | 153 return equivalence.typeEquivalence(unalias(a), b); |
| 154 }, elementFilter: elementFilter, verbose: arguments.verbose); | 154 }, |
| 155 elementFilter: elementFilter, |
| 156 verbose: arguments.verbose); |
| 155 | 157 |
| 156 checkClosedWorlds(closedWorld1, closedWorld2, | 158 checkClosedWorlds(closedWorld1, closedWorld2, |
| 157 strategy: equivalence.defaultStrategy, verbose: arguments.verbose); | 159 strategy: equivalence.defaultStrategy, verbose: arguments.verbose); |
| 158 | 160 |
| 159 return ResultKind.success; | 161 return ResultKind.success; |
| 160 } | 162 } |
| OLD | NEW |