Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(339)

Side by Side Diff: tests/compiler/dart2js/kernel/compiler_helper.dart

Issue 2993153002: Use analyzeOnly in kernel/impact_test. (Closed)
Patch Set: Include constructors Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 print('---- analyze-all -------------------------------------------------'); 102 print('---- analyze-all -------------------------------------------------');
103 } 103 }
104 Compiler compiler = compilerFor( 104 Compiler compiler = compilerFor(
105 entryPoint: entryPoint, 105 entryPoint: entryPoint,
106 memorySourceFiles: memorySourceFiles, 106 memorySourceFiles: memorySourceFiles,
107 options: [ 107 options: [
108 Flags.analyzeAll, 108 Flags.analyzeAll,
109 Flags.useKernelInSsa, 109 Flags.useKernelInSsa,
110 Flags.enableAssertMessage 110 Flags.enableAssertMessage
111 ]); 111 ]);
112 compiler.resolution.retainCachesForTesting = true;
112 await compiler.run(entryPoint); 113 await compiler.run(entryPoint);
113 114
114 if (printSteps) { 115 if (printSteps) {
115 print('---- closed world from kernel ------------------------------------'); 116 print('---- closed world from kernel ------------------------------------');
116 } 117 }
117 Compiler compiler2 = compilerFor( 118 Compiler compiler2 = compilerFor(
118 entryPoint: entryPoint, 119 entryPoint: entryPoint,
119 memorySourceFiles: memorySourceFiles, 120 memorySourceFiles: memorySourceFiles,
120 options: [Flags.analyzeOnly, Flags.enableAssertMessage, Flags.useKernel]); 121 options: [Flags.analyzeOnly, Flags.enableAssertMessage, Flags.useKernel]);
121 ElementResolutionWorldBuilder.useInstantiationMap = true; 122 ElementResolutionWorldBuilder.useInstantiationMap = true;
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 options: [Flags.useKernel]..addAll(options), 196 options: [Flags.useKernel]..addAll(options),
196 outputProvider: compilerOutput); 197 outputProvider: compilerOutput);
197 ElementResolutionWorldBuilder.useInstantiationMap = true; 198 ElementResolutionWorldBuilder.useInstantiationMap = true;
198 compiler.resolution.retainCachesForTesting = true; 199 compiler.resolution.retainCachesForTesting = true;
199 if (beforeRun != null) { 200 if (beforeRun != null) {
200 beforeRun(compiler); 201 beforeRun(compiler);
201 } 202 }
202 await compiler.run(dillFile); 203 await compiler.run(dillFile);
203 return compiler; 204 return compiler;
204 } 205 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/common/resolution.dart ('k') | tests/compiler/dart2js/kernel/impact_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698