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

Unified Diff: tools/testing/dart/compiler_configuration.dart

Issue 2908833002: Revert "Revert "Refactor test option parsing code."" (Closed)
Patch Set: Ignore "—failure-summary" so it doesn't break the bots. Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: tools/testing/dart/compiler_configuration.dart
diff --git a/tools/testing/dart/compiler_configuration.dart b/tools/testing/dart/compiler_configuration.dart
index fffd68135bc7edc7ebd58795d48e7023a48d7144..aa6486bbb73276d9fe30b55c44081876a0b35ebc 100644
--- a/tools/testing/dart/compiler_configuration.dart
+++ b/tools/testing/dart/compiler_configuration.dart
@@ -47,6 +47,12 @@ abstract class CompilerConfiguration {
final bool isHostChecked;
final bool useSdk;
+ /// Only some subclasses support this check, but we statically allow calling
+ /// it on [CompilerConfiguration].
+ bool get useDfe {
+ throw new UnsupportedError("This compiler does not support DFE.");
+ }
+
// TODO(ahe): Remove this constructor and move the switch to
// test_options.dart. We probably want to store an instance of
// [CompilerConfiguration] in [configuration] there.
@@ -62,7 +68,6 @@ abstract class CompilerConfiguration {
bool isHostChecked = configuration['host_checked'];
bool useSdk = configuration['use_sdk'];
bool isCsp = configuration['csp'];
- bool useCps = configuration['cps_ir'];
bool useBlobs = configuration['use_blobs'];
bool hotReload = configuration['hot_reload'];
bool hotReloadRollback = configuration['hot_reload_rollback'];
@@ -82,7 +87,6 @@ abstract class CompilerConfiguration {
isDebug: isDebug,
isChecked: isChecked,
isHostChecked: isHostChecked,
- useCps: useCps,
useSdk: useSdk,
isCsp: isCsp,
useFastStartup: useFastStartup,
@@ -107,7 +111,7 @@ abstract class CompilerConfiguration {
useSdk: useSdk,
hotReload: hotReload,
hotReloadRollback: hotReloadRollback,
- useDFE: true);
+ useDfe: true);
case 'dartkp':
return new PrecompilerCompilerConfiguration(
isDebug: isDebug,
@@ -115,7 +119,7 @@ abstract class CompilerConfiguration {
arch: configuration['arch'],
useBlobs: useBlobs,
isAndroid: configuration['system'] == 'android',
- useDFE: true);
+ useDfe: true);
case 'none':
return new NoneCompilerConfiguration(
isDebug: isDebug,
@@ -187,7 +191,7 @@ abstract class CompilerConfiguration {
class NoneCompilerConfiguration extends CompilerConfiguration {
final bool hotReload;
final bool hotReloadRollback;
- final bool useDFE;
+ final bool useDfe;
NoneCompilerConfiguration(
{bool isDebug,
@@ -196,7 +200,7 @@ class NoneCompilerConfiguration extends CompilerConfiguration {
bool useSdk,
bool this.hotReload,
bool this.hotReloadRollback,
- this.useDFE: false})
+ this.useDfe: false})
: super._subclass(
isDebug: isDebug,
isChecked: isChecked,
@@ -214,7 +218,7 @@ class NoneCompilerConfiguration extends CompilerConfiguration {
List<String> originalArguments,
CommandArtifact artifact) {
List<String> args = [];
- if (useDFE) {
+ if (useDfe) {
args.add('--dfe=${buildDir}/gen/kernel-service.dart.snapshot');
args.add('--platform=${buildDir}/patched_sdk/platform.dill');
}
@@ -537,20 +541,15 @@ class Dart2xCompilerConfiguration extends CompilerConfiguration {
/// Configuration for dart2js compiler.
class Dart2jsCompilerConfiguration extends Dart2xCompilerConfiguration {
final bool isCsp;
- final bool useCps;
final bool useFastStartup;
final bool useKernel;
final List<String> extraDart2jsOptions;
- // We cache the extended environment to save memory.
- static Map<String, String> cpsFlagCache;
- static Map<String, String> environmentOverridesCacheObject;
Dart2jsCompilerConfiguration(
{bool isDebug,
bool isChecked,
bool isHostChecked,
bool useSdk,
- bool this.useCps,
bool this.isCsp,
bool this.useFastStartup,
this.useKernel,
@@ -604,7 +603,7 @@ class PrecompilerCompilerConfiguration extends CompilerConfiguration {
final String arch;
final bool useBlobs;
final bool isAndroid;
- final bool useDFE;
+ final bool useDfe;
PrecompilerCompilerConfiguration(
{bool isDebug,
@@ -612,7 +611,7 @@ class PrecompilerCompilerConfiguration extends CompilerConfiguration {
this.arch,
this.useBlobs,
this.isAndroid,
- this.useDFE: false})
+ this.useDfe: false})
: super._subclass(isDebug: isDebug, isChecked: isChecked);
int computeTimeoutMultiplier() {
@@ -658,7 +657,7 @@ class PrecompilerCompilerConfiguration extends CompilerConfiguration {
exec = "$buildDir/dart_bootstrap";
}
var args = <String>[];
- if (useDFE) {
+ if (useDfe) {
args.add('--dfe=utils/kernel-service/kernel-service.dart');
args.add('--platform=${buildDir}/patched_sdk/platform.dill');
}

Powered by Google App Engine
This is Rietveld 408576698