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

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

Issue 2721443002: Switch -c dartk/dartkp configuration to use fasta. (Closed)
Patch Set: Created 3 years, 9 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 | « tests/language/language_kernel.status ('k') | 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 useKernelInDart2js = configuration['dart2js_with_kernel']; 70 bool useKernelInDart2js = configuration['dart2js_with_kernel'];
71 bool verifyKernel = configuration['verify-ir']; 71 bool verifyKernel = configuration['verify-ir'];
72 bool useDFE = !configuration['noDFE']; 72 bool useDFE = !configuration['noDFE'];
73 bool useFasta = configuration['useFasta']; 73 bool useFasta = !configuration['noUseFasta'];
74 bool treeShake = !configuration['no-tree-shake']; 74 bool treeShake = !configuration['no-tree-shake'];
75 75
76 switch (compiler) { 76 switch (compiler) {
77 case 'dart2analyzer': 77 case 'dart2analyzer':
78 return new AnalyzerCompilerConfiguration( 78 return new AnalyzerCompilerConfiguration(
79 isDebug: isDebug, 79 isDebug: isDebug,
80 isChecked: isChecked, 80 isChecked: isChecked,
81 isStrong: isStrong, 81 isStrong: isStrong,
82 isHostChecked: isHostChecked, 82 isHostChecked: isHostChecked,
83 useSdk: useSdk); 83 useSdk: useSdk);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 return new NoneCompilerConfiguration( 117 return new NoneCompilerConfiguration(
118 isDebug: isDebug, 118 isDebug: isDebug,
119 isChecked: isChecked, 119 isChecked: isChecked,
120 isHostChecked: isHostChecked, 120 isHostChecked: isHostChecked,
121 useSdk: useSdk, 121 useSdk: useSdk,
122 hotReload: hotReload, 122 hotReload: hotReload,
123 hotReloadRollback: hotReloadRollback, 123 hotReloadRollback: hotReloadRollback,
124 dfeMode: useFasta ? DFEMode.Fasta : DFEMode.DartK); 124 dfeMode: useFasta ? DFEMode.Fasta : DFEMode.DartK);
125 125
126 case 'dartkp': 126 case 'dartkp':
127 return ComposedCompilerConfiguration.createDartKPConfiguration( 127 if (!useDFE) {
128 return ComposedCompilerConfiguration.createDartKPConfiguration(
129 isChecked: isChecked,
130 isHostChecked: isHostChecked,
131 arch: configuration['arch'],
132 useBlobs: useBlobs,
133 isAndroid: configuration['system'] == 'android',
134 useSdk: useSdk,
135 verify: verifyKernel,
136 strong: isStrong,
137 treeShake: treeShake);
138 }
139 return new PrecompilerCompilerConfiguration(
140 isDebug: isDebug,
128 isChecked: isChecked, 141 isChecked: isChecked,
129 isHostChecked: isHostChecked,
130 arch: configuration['arch'], 142 arch: configuration['arch'],
131 useBlobs: useBlobs, 143 useBlobs: useBlobs,
132 isAndroid: configuration['system'] == 'android', 144 isAndroid: configuration['system'] == 'android',
133 useSdk: useSdk, 145 dfeMode: useFasta ? DFEMode.Fasta : DFEMode.DartK);
134 verify: verifyKernel, 146
135 strong: isStrong,
136 treeShake: treeShake);
137 case 'none': 147 case 'none':
138 return new NoneCompilerConfiguration( 148 return new NoneCompilerConfiguration(
139 isDebug: isDebug, 149 isDebug: isDebug,
140 isChecked: isChecked, 150 isChecked: isChecked,
141 isHostChecked: isHostChecked, 151 isHostChecked: isHostChecked,
142 useSdk: useSdk, 152 useSdk: useSdk,
143 hotReload: hotReload, 153 hotReload: hotReload,
144 hotReloadRollback: hotReloadRollback); 154 hotReloadRollback: hotReloadRollback);
145 default: 155 default:
146 throw "Unknown compiler '$compiler'"; 156 throw "Unknown compiler '$compiler'";
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 Uri preambleDir = sdk.resolve('lib/_internal/js_runtime/lib/preambles/'); 606 Uri preambleDir = sdk.resolve('lib/_internal/js_runtime/lib/preambles/');
597 return runtimeConfiguration.dart2jsPreambles(preambleDir) 607 return runtimeConfiguration.dart2jsPreambles(preambleDir)
598 ..add(artifact.filename); 608 ..add(artifact.filename);
599 } 609 }
600 } 610 }
601 611
602 class PrecompilerCompilerConfiguration extends CompilerConfiguration { 612 class PrecompilerCompilerConfiguration extends CompilerConfiguration {
603 final String arch; 613 final String arch;
604 final bool useBlobs; 614 final bool useBlobs;
605 final bool isAndroid; 615 final bool isAndroid;
616 final DFEMode dfeMode;
606 617
607 PrecompilerCompilerConfiguration({bool isDebug, bool isChecked, 618 PrecompilerCompilerConfiguration({bool isDebug, bool isChecked,
608 this.arch, this.useBlobs, this.isAndroid}) 619 this.arch, this.useBlobs, this.isAndroid, this.dfeMode: DFEMode.None})
609 : super._subclass(isDebug: isDebug, isChecked: isChecked); 620 : super._subclass(isDebug: isDebug, isChecked: isChecked);
610 621
611 int computeTimeoutMultiplier() { 622 int computeTimeoutMultiplier() {
612 int multiplier = 2; 623 int multiplier = 2;
613 if (isDebug) multiplier *= 4; 624 if (isDebug) multiplier *= 4;
614 if (isChecked) multiplier *= 2; 625 if (isChecked) multiplier *= 2;
615 return multiplier; 626 return multiplier;
616 } 627 }
617 628
618 CommandArtifact computeCompilationArtifact( 629 CommandArtifact computeCompilationArtifact(
(...skipping 20 matching lines...) Expand all
639 CommandBuilder commandBuilder, 650 CommandBuilder commandBuilder,
640 List arguments, 651 List arguments,
641 Map<String, String> environmentOverrides) { 652 Map<String, String> environmentOverrides) {
642 var exec; 653 var exec;
643 if (isAndroid && arch == 'arm') { 654 if (isAndroid && arch == 'arm') {
644 exec = "$buildDir/clang_x86/dart_bootstrap"; 655 exec = "$buildDir/clang_x86/dart_bootstrap";
645 } else { 656 } else {
646 exec = "$buildDir/dart_bootstrap"; 657 exec = "$buildDir/dart_bootstrap";
647 } 658 }
648 var args = new List(); 659 var args = new List();
660 if (dfeMode != DFEMode.None) {
661 args.add('--dfe=utils/kernel-service/kernel-service.dart');
662 }
663 if (dfeMode == DFEMode.Fasta) {
664 args.add('-DDFE_USE_FASTA=true');
665 }
649 args.add("--snapshot-kind=app-aot"); 666 args.add("--snapshot-kind=app-aot");
650 if (useBlobs) { 667 if (useBlobs) {
651 args.add("--snapshot=$tempDir/out.aotsnapshot"); 668 args.add("--snapshot=$tempDir/out.aotsnapshot");
652 args.add("--use-blobs"); 669 args.add("--use-blobs");
653 } else { 670 } else {
654 args.add("--snapshot=$tempDir/out.S"); 671 args.add("--snapshot=$tempDir/out.S");
655 } 672 }
656 if (isAndroid && arch == 'arm') { 673 if (isAndroid && arch == 'arm') {
657 args.add('--no-sim-use-hardfp'); 674 args.add('--no-sim-use-hardfp');
658 } 675 }
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
932 RuntimeConfiguration runtimeConfiguration, 949 RuntimeConfiguration runtimeConfiguration,
933 String buildDir, 950 String buildDir,
934 TestInformation info, 951 TestInformation info,
935 List<String> vmOptions, 952 List<String> vmOptions,
936 List<String> sharedOptions, 953 List<String> sharedOptions,
937 List<String> originalArguments, 954 List<String> originalArguments,
938 CommandArtifact artifact) { 955 CommandArtifact artifact) {
939 return <String>[]; 956 return <String>[];
940 } 957 }
941 } 958 }
OLDNEW
« no previous file with comments | « tests/language/language_kernel.status ('k') | tools/testing/dart/runtime_configuration.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698