| 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 'package:async_helper/async_helper.dart'; | 9 import 'package:async_helper/async_helper.dart'; |
| 10 import 'package:compiler/src/closure.dart'; | 10 import 'package:compiler/src/closure.dart'; |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 worldBuilder.elementEnvironment, | 119 worldBuilder.elementEnvironment, |
| 120 worldBuilder.commonElements, | 120 worldBuilder.commonElements, |
| 121 nativeBasicData, | 121 nativeBasicData, |
| 122 const OpenWorldStrategy()), | 122 const OpenWorldStrategy()), |
| 123 new KernelWorkItemBuilder(worldBuilder, impactTransformer), | 123 new KernelWorkItemBuilder(worldBuilder, impactTransformer), |
| 124 'enqueuer from kelements'); | 124 'enqueuer from kelements'); |
| 125 computeClosedWorld( | 125 computeClosedWorld( |
| 126 compiler.reporter, enqueuer2, worldBuilder.elementEnvironment); | 126 compiler.reporter, enqueuer2, worldBuilder.elementEnvironment); |
| 127 BackendUsage backendUsage2 = backendUsageBuilder2.close(); | 127 BackendUsage backendUsage2 = backendUsageBuilder2.close(); |
| 128 checkBackendUsage(backendUsage1, backendUsage2, equivalence); | 128 checkBackendUsage(backendUsage1, backendUsage2, equivalence); |
| 129 |
| 130 checkResolutionEnqueuers(backendUsage1, backendUsage2, enqueuer1, enqueuer2, |
| 131 elementEquivalence: equivalence.entityEquivalence, |
| 132 typeEquivalence: (ResolutionDartType a, DartType b) { |
| 133 return equivalence.typeEquivalence(unalias(a), b); |
| 134 }, elementFilter: elementFilter, verbose: arguments.verbose); |
| 129 }); | 135 }); |
| 130 } | 136 } |
| 131 | 137 |
| 132 List createKernelResolutionEnqueuerListener( | 138 List createKernelResolutionEnqueuerListener( |
| 133 CompilerOptions options, | 139 CompilerOptions options, |
| 134 DiagnosticReporter reporter, | 140 DiagnosticReporter reporter, |
| 135 DeferredLoadTask deferredLoadTask, | 141 DeferredLoadTask deferredLoadTask, |
| 136 KernelWorldBuilder worldBuilder, | 142 KernelWorldBuilder worldBuilder, |
| 137 NativeBasicData nativeBasicData) { | 143 NativeBasicData nativeBasicData) { |
| 138 ElementEnvironment elementEnvironment = worldBuilder.elementEnvironment; | 144 ElementEnvironment elementEnvironment = worldBuilder.elementEnvironment; |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 usage2.isInvokeOnUsed); | 364 usage2.isInvokeOnUsed); |
| 359 check(usage1, usage2, 'isRuntimeTypeUsed', usage1.isRuntimeTypeUsed, | 365 check(usage1, usage2, 'isRuntimeTypeUsed', usage1.isRuntimeTypeUsed, |
| 360 usage2.isRuntimeTypeUsed); | 366 usage2.isRuntimeTypeUsed); |
| 361 check(usage1, usage2, 'isIsolateInUse', usage1.isIsolateInUse, | 367 check(usage1, usage2, 'isIsolateInUse', usage1.isIsolateInUse, |
| 362 usage2.isIsolateInUse); | 368 usage2.isIsolateInUse); |
| 363 check(usage1, usage2, 'isFunctionApplyUsed', usage1.isFunctionApplyUsed, | 369 check(usage1, usage2, 'isFunctionApplyUsed', usage1.isFunctionApplyUsed, |
| 364 usage2.isFunctionApplyUsed); | 370 usage2.isFunctionApplyUsed); |
| 365 check(usage1, usage2, 'isNoSuchMethodUsed', usage1.isNoSuchMethodUsed, | 371 check(usage1, usage2, 'isNoSuchMethodUsed', usage1.isNoSuchMethodUsed, |
| 366 usage2.isNoSuchMethodUsed); | 372 usage2.isNoSuchMethodUsed); |
| 367 } | 373 } |
| OLD | NEW |