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

Side by Side Diff: tools/testing/dart/compiler_configuration.dart

Issue 2684943003: [Kernel] Enable Kernel Isolate to use Fasta instead of DartK. (Closed)
Patch Set: In progress Created 3 years, 10 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
« no previous file with comments | « no previous file | tools/testing/dart/runtime_configuration.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 library compiler_configuration; 5 library compiler_configuration;
6 6
7 import 'dart:io' show Platform; 7 import 'dart:io' show Platform;
8 8
9 import 'runtime_configuration.dart' show RuntimeConfiguration; 9 import 'runtime_configuration.dart' show RuntimeConfiguration;
10 import 'runtime_configuration.dart' show DartPrecompiledAdbRuntimeConfiguration; 10 import 'runtime_configuration.dart' show DartPrecompiledAdbRuntimeConfiguration;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 bool isStrong = configuration['strong']; 61 bool isStrong = configuration['strong'];
62 bool isHostChecked = configuration['host_checked']; 62 bool isHostChecked = configuration['host_checked'];
63 bool useSdk = configuration['use_sdk']; 63 bool useSdk = configuration['use_sdk'];
64 bool isCsp = configuration['csp']; 64 bool isCsp = configuration['csp'];
65 bool useCps = configuration['cps_ir']; 65 bool useCps = configuration['cps_ir'];
66 bool useBlobs = configuration['use_blobs']; 66 bool useBlobs = configuration['use_blobs'];
67 bool hotReload = configuration['hot_reload']; 67 bool hotReload = configuration['hot_reload'];
68 bool hotReloadRollback = configuration['hot_reload_rollback']; 68 bool hotReloadRollback = configuration['hot_reload_rollback'];
69 bool useFastStartup = configuration['fast_startup']; 69 bool useFastStartup = configuration['fast_startup'];
70 bool verifyKernel = configuration['verify-ir']; 70 bool verifyKernel = configuration['verify-ir'];
71 bool useStandaloneDartK = configuration['use-standalone-dartk']; 71 bool useDFE = configuration['useDFE'];
72 bool useFasta = configuration['useFasta'];
72 bool treeShake = !configuration['no-tree-shake']; 73 bool treeShake = !configuration['no-tree-shake'];
73 74
74 switch (compiler) { 75 switch (compiler) {
75 case 'dart2analyzer': 76 case 'dart2analyzer':
76 return new AnalyzerCompilerConfiguration( 77 return new AnalyzerCompilerConfiguration(
77 isDebug: isDebug, 78 isDebug: isDebug,
78 isChecked: isChecked, 79 isChecked: isChecked,
79 isStrong: isStrong, 80 isStrong: isStrong,
80 isHostChecked: isHostChecked, 81 isHostChecked: isHostChecked,
81 useSdk: useSdk); 82 useSdk: useSdk);
(...skipping 12 matching lines...) Expand all
94 return new Dart2AppSnapshotCompilerConfiguration( 95 return new Dart2AppSnapshotCompilerConfiguration(
95 isDebug: isDebug, isChecked: isChecked); 96 isDebug: isDebug, isChecked: isChecked);
96 case 'precompiler': 97 case 'precompiler':
97 return new PrecompilerCompilerConfiguration( 98 return new PrecompilerCompilerConfiguration(
98 isDebug: isDebug, 99 isDebug: isDebug,
99 isChecked: isChecked, 100 isChecked: isChecked,
100 arch: configuration['arch'], 101 arch: configuration['arch'],
101 useBlobs: useBlobs, 102 useBlobs: useBlobs,
102 isAndroid: configuration['system'] == 'android'); 103 isAndroid: configuration['system'] == 'android');
103 case 'dartk': 104 case 'dartk':
104 if (useStandaloneDartK) { 105 if (!useDFE) {
105 return ComposedCompilerConfiguration.createDartKConfiguration( 106 return ComposedCompilerConfiguration.createDartKConfiguration(
106 isChecked: isChecked, 107 isChecked: isChecked,
107 isHostChecked: isHostChecked, 108 isHostChecked: isHostChecked,
108 useSdk: useSdk, 109 useSdk: useSdk,
109 verify: verifyKernel, 110 verify: verifyKernel,
110 strong: isStrong, 111 strong: isStrong,
111 treeShake: treeShake); 112 treeShake: treeShake);
112 } 113 }
113 114
114 return new NoneCompilerConfiguration( 115 return new NoneCompilerConfiguration(
115 isDebug: isDebug, 116 isDebug: isDebug,
116 isChecked: isChecked, 117 isChecked: isChecked,
117 isHostChecked: isHostChecked, 118 isHostChecked: isHostChecked,
118 useSdk: useSdk, 119 useSdk: useSdk,
119 hotReload: hotReload, 120 hotReload: hotReload,
120 hotReloadRollback: hotReloadRollback, 121 hotReloadRollback: hotReloadRollback,
121 useDFEIsolate: true); 122 dfeMode: useFasta ? DFEMode.Fasta : DFEMode.DartK);
122 123
123 case 'dartkp': 124 case 'dartkp':
124 return ComposedCompilerConfiguration.createDartKPConfiguration( 125 return ComposedCompilerConfiguration.createDartKPConfiguration(
125 isChecked: isChecked, 126 isChecked: isChecked,
126 isHostChecked: isHostChecked, 127 isHostChecked: isHostChecked,
127 arch: configuration['arch'], 128 arch: configuration['arch'],
128 useBlobs: useBlobs, 129 useBlobs: useBlobs,
129 isAndroid: configuration['system'] == 'android', 130 isAndroid: configuration['system'] == 'android',
130 useSdk: useSdk, 131 useSdk: useSdk,
131 verify: verifyKernel, 132 verify: verifyKernel,
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 String buildDir, 191 String buildDir,
191 TestInformation info, 192 TestInformation info,
192 List<String> vmOptions, 193 List<String> vmOptions,
193 List<String> sharedOptions, 194 List<String> sharedOptions,
194 List<String> originalArguments, 195 List<String> originalArguments,
195 CommandArtifact artifact) { 196 CommandArtifact artifact) {
196 return <String>[artifact.filename]; 197 return <String>[artifact.filename];
197 } 198 }
198 } 199 }
199 200
201 enum DFEMode {
202 None,
203 DartK,
204 Fasta
205 }
206
200 /// The "none" compiler. 207 /// The "none" compiler.
201 class NoneCompilerConfiguration extends CompilerConfiguration { 208 class NoneCompilerConfiguration extends CompilerConfiguration {
202 final bool hotReload; 209 final bool hotReload;
203 final bool hotReloadRollback; 210 final bool hotReloadRollback;
204 final bool useDFEIsolate; 211 final DFEMode dfeMode;
205 212
206 NoneCompilerConfiguration( 213 NoneCompilerConfiguration(
207 {bool isDebug, bool isChecked, bool isHostChecked, bool useSdk, 214 {bool isDebug, bool isChecked, bool isHostChecked, bool useSdk,
208 bool this.hotReload, 215 bool this.hotReload,
209 bool this.hotReloadRollback, 216 bool this.hotReloadRollback,
210 bool this.useDFEIsolate: false}) 217 DFEMode this.dfeMode: DFEMode.None})
211 : super._subclass( 218 : super._subclass(
212 isDebug: isDebug, 219 isDebug: isDebug,
213 isChecked: isChecked, 220 isChecked: isChecked,
214 isHostChecked: isHostChecked, 221 isHostChecked: isHostChecked,
215 useSdk: useSdk); 222 useSdk: useSdk);
216 223
217 bool get hasCompiler => false; 224 bool get hasCompiler => false;
218 225
219 List<String> computeRuntimeArguments( 226 List<String> computeRuntimeArguments(
220 RuntimeConfiguration runtimeConfiguration, 227 RuntimeConfiguration runtimeConfiguration,
221 String buildDir, 228 String buildDir,
222 TestInformation info, 229 TestInformation info,
223 List<String> vmOptions, 230 List<String> vmOptions,
224 List<String> sharedOptions, 231 List<String> sharedOptions,
225 List<String> originalArguments, 232 List<String> originalArguments,
226 CommandArtifact artifact) { 233 CommandArtifact artifact) {
227 List<String> args = []; 234 List<String> args = [];
228 if (useDFEIsolate) { 235 if (dfeMode != DFEMode.None) {
229 args.add('--dfe=utils/kernel-service/kernel-service.dart'); 236 args.add('--dfe=utils/kernel-service/kernel-service.dart');
230 } 237 }
238 if (dfeMode == DFEMode.Fasta) {
239 args.add('-DDFE_USE_FASTA=true');
240 }
231 if (isChecked) { 241 if (isChecked) {
232 args.add('--enable_asserts'); 242 args.add('--enable_asserts');
233 args.add('--enable_type_checks'); 243 args.add('--enable_type_checks');
234 } 244 }
235 if (hotReload) { 245 if (hotReload) {
236 args.add('--hot-reload-test-mode'); 246 args.add('--hot-reload-test-mode');
237 } else if (hotReloadRollback) { 247 } else if (hotReloadRollback) {
238 args.add('--hot-reload-rollback-test-mode'); 248 args.add('--hot-reload-rollback-test-mode');
239 } 249 }
240 return args 250 return args
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after
918 RuntimeConfiguration runtimeConfiguration, 928 RuntimeConfiguration runtimeConfiguration,
919 String buildDir, 929 String buildDir,
920 TestInformation info, 930 TestInformation info,
921 List<String> vmOptions, 931 List<String> vmOptions,
922 List<String> sharedOptions, 932 List<String> sharedOptions,
923 List<String> originalArguments, 933 List<String> originalArguments,
924 CommandArtifact artifact) { 934 CommandArtifact artifact) {
925 return <String>[]; 935 return <String>[];
926 } 936 }
927 } 937 }
OLDNEW
« no previous file with comments | « no previous file | tools/testing/dart/runtime_configuration.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698