| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 memorySourceFiles: memorySourceFiles, | 89 memorySourceFiles: memorySourceFiles, |
| 90 options: [ | 90 options: [ |
| 91 Flags.analyzeAll, | 91 Flags.analyzeAll, |
| 92 Flags.useKernel, | 92 Flags.useKernel, |
| 93 Flags.enableAssertMessage | 93 Flags.enableAssertMessage |
| 94 ]); | 94 ]); |
| 95 await compiler.run(entryPoint); | 95 await compiler.run(entryPoint); |
| 96 compiler.resolutionWorldBuilder.closeWorld(); | 96 compiler.resolutionWorldBuilder.closeWorld(); |
| 97 | 97 |
| 98 print('---- closed world from kernel ------------------------------------'); | 98 print('---- closed world from kernel ------------------------------------'); |
| 99 KernelWorldBuilder worldBuilder = new KernelWorldBuilder( | 99 KernelWorldBuilder worldBuilder = new KernelWorldBuilder(compiler.reporter); |
| 100 compiler.reporter, compiler.backend.kernelTask.program); | 100 worldBuilder.addProgram(compiler.backend.kernelTask.program); |
| 101 KernelEquivalence equivalence = new KernelEquivalence(worldBuilder); | 101 KernelEquivalence equivalence = new KernelEquivalence(worldBuilder); |
| 102 NativeBasicData nativeBasicData = computeNativeBasicData(worldBuilder); | 102 NativeBasicData nativeBasicData = computeNativeBasicData(worldBuilder); |
| 103 checkNativeBasicData( | 103 checkNativeBasicData( |
| 104 compiler.backend.nativeBasicData, nativeBasicData, equivalence); | 104 compiler.backend.nativeBasicData, nativeBasicData, equivalence); |
| 105 List list = createKernelResolutionEnqueuerListener( | 105 List list = createKernelResolutionEnqueuerListener( |
| 106 compiler.options, | 106 compiler.options, |
| 107 compiler.reporter, | 107 compiler.reporter, |
| 108 compiler.deferredLoadTask, | 108 compiler.deferredLoadTask, |
| 109 worldBuilder, | 109 worldBuilder, |
| 110 nativeBasicData); | 110 nativeBasicData); |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 usage2.isInvokeOnUsed); | 380 usage2.isInvokeOnUsed); |
| 381 check(usage1, usage2, 'isRuntimeTypeUsed', usage1.isRuntimeTypeUsed, | 381 check(usage1, usage2, 'isRuntimeTypeUsed', usage1.isRuntimeTypeUsed, |
| 382 usage2.isRuntimeTypeUsed); | 382 usage2.isRuntimeTypeUsed); |
| 383 check(usage1, usage2, 'isIsolateInUse', usage1.isIsolateInUse, | 383 check(usage1, usage2, 'isIsolateInUse', usage1.isIsolateInUse, |
| 384 usage2.isIsolateInUse); | 384 usage2.isIsolateInUse); |
| 385 check(usage1, usage2, 'isFunctionApplyUsed', usage1.isFunctionApplyUsed, | 385 check(usage1, usage2, 'isFunctionApplyUsed', usage1.isFunctionApplyUsed, |
| 386 usage2.isFunctionApplyUsed); | 386 usage2.isFunctionApplyUsed); |
| 387 check(usage1, usage2, 'isNoSuchMethodUsed', usage1.isNoSuchMethodUsed, | 387 check(usage1, usage2, 'isNoSuchMethodUsed', usage1.isNoSuchMethodUsed, |
| 388 usage2.isNoSuchMethodUsed); | 388 usage2.isNoSuchMethodUsed); |
| 389 } | 389 } |
| OLD | NEW |