| 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.compiler_helper; | 7 library dart2js.kernel.compiler_helper; |
| 8 | 8 |
| 9 import 'dart:async'; | 9 import 'dart:async'; |
| 10 import 'dart:io'; | 10 import 'dart:io'; |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 print('---- generate dill -----------------------------------------------'); | 156 print('---- generate dill -----------------------------------------------'); |
| 157 } | 157 } |
| 158 | 158 |
| 159 Uri dillFile = Uri.parse('$entryPoint.dill'); | 159 Uri dillFile = Uri.parse('$entryPoint.dill'); |
| 160 await generate.main([ | 160 await generate.main([ |
| 161 '--platform=out/ReleaseX64/patched_dart2js_sdk/platform.dill', | 161 '--platform=out/ReleaseX64/patched_dart2js_sdk/platform.dill', |
| 162 '$entryPoint' | 162 '$entryPoint' |
| 163 ]); | 163 ]); |
| 164 | 164 |
| 165 if (printSteps) { | 165 if (printSteps) { |
| 166 print('---- closed world from dill $dillFile ----------------------------'); | 166 print('---- compile from dill $dillFile ---------------------------------'); |
| 167 } | 167 } |
| 168 Compiler compiler = compilerFor( | 168 Compiler compiler = compilerFor( |
| 169 entryPoint: dillFile, | 169 entryPoint: dillFile, |
| 170 options: [Flags.loadFromDill]..addAll(options), | 170 options: [Flags.loadFromDill]..addAll(options), |
| 171 outputProvider: compilerOutput); | 171 outputProvider: compilerOutput); |
| 172 ElementResolutionWorldBuilder.useInstantiationMap = true; | 172 ElementResolutionWorldBuilder.useInstantiationMap = true; |
| 173 compiler.resolution.retainCachesForTesting = true; | 173 compiler.resolution.retainCachesForTesting = true; |
| 174 await compiler.run(dillFile); | 174 await compiler.run(dillFile); |
| 175 return compiler; | 175 return compiler; |
| 176 } | 176 } |
| OLD | NEW |