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

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

Issue 2531873002: Add --verify-ir flag to dartk and test.py. (Closed)
Patch Set: Minor fixes Created 4 years, 1 month 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
« no previous file with comments | « pkg/kernel/test/verify_test.dart ('k') | tools/testing/dart/test_options.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/compiler_configuration.dart
diff --git a/tools/testing/dart/compiler_configuration.dart b/tools/testing/dart/compiler_configuration.dart
index 1568457662d1a24683225e374ab676641faa1532..0a15772ece9feb1b497662e8793acc082ccaf0ab 100644
--- a/tools/testing/dart/compiler_configuration.dart
+++ b/tools/testing/dart/compiler_configuration.dart
@@ -58,6 +58,7 @@ abstract class CompilerConfiguration {
bool hotReload = configuration['hot_reload'];
bool hotReloadRollback = configuration['hot_reload_rollback'];
bool useFastStartup = configuration['fast_startup'];
+ bool verifyKernel = configuration['verify-ir'];
switch (compiler) {
case 'dart2analyzer':
@@ -92,14 +93,16 @@ abstract class CompilerConfiguration {
case 'dartk':
return ComposedCompilerConfiguration.createDartKConfiguration(
isHostChecked: isHostChecked,
- useSdk: useSdk);
+ useSdk: useSdk,
+ verify: verifyKernel);
case 'dartkp':
return ComposedCompilerConfiguration.createDartKPConfiguration(
isHostChecked: isHostChecked,
arch: configuration['arch'],
useBlobs: useBlobs,
isAndroid: configuration['system'] == 'android',
- useSdk: useSdk);
+ useSdk: useSdk,
+ verify: verifyKernel);
case 'none':
return new NoneCompilerConfiguration(
isDebug: isDebug,
@@ -212,7 +215,9 @@ class NoneCompilerConfiguration extends CompilerConfiguration {
/// The "dartk" compiler.
class DartKCompilerConfiguration extends CompilerConfiguration {
- DartKCompilerConfiguration({bool isHostChecked, bool useSdk})
+ final bool verify;
+
+ DartKCompilerConfiguration({bool isHostChecked, bool useSdk, this.verify})
: super._subclass(isHostChecked: isHostChecked, useSdk: useSdk);
@override
@@ -226,14 +231,15 @@ class DartKCompilerConfiguration extends CompilerConfiguration {
CommandBuilder commandBuilder,
List arguments,
Map<String, String> environmentOverrides) {
- var extraArguments = [
+ Iterable<String> extraArguments = [
'--sdk',
'$buildDir/patched_sdk',
'--link',
'--target=vm',
+ verify ? '--verify-ir' : null,
'--out',
outputFileName
- ];
+ ].where((x) => x != null);
return commandBuilder.getKernelCompilationCommand(
'dartk',
outputFileName,
@@ -361,13 +367,13 @@ class ComposedCompilerConfiguration extends CompilerConfiguration {
static ComposedCompilerConfiguration createDartKPConfiguration(
{bool isHostChecked, String arch, bool useBlobs, bool isAndroid,
- bool useSdk}) {
+ bool useSdk, bool verify}) {
var nested = [];
// Compile with dartk.
nested.add(new PipelineCommand.runWithGlobalArguments(
new DartKCompilerConfiguration(isHostChecked: isHostChecked,
- useSdk: useSdk)));
+ useSdk: useSdk, verify: verify)));
// Run the normal precompiler.
nested.add(new PipelineCommand.runWithPreviousKernelOutput(
@@ -378,13 +384,13 @@ class ComposedCompilerConfiguration extends CompilerConfiguration {
}
static ComposedCompilerConfiguration createDartKConfiguration(
- {bool isHostChecked, bool useSdk}) {
+ {bool isHostChecked, bool useSdk, bool verify}) {
var nested = [];
// Compile with dartk.
nested.add(new PipelineCommand.runWithGlobalArguments(
new DartKCompilerConfiguration(isHostChecked: isHostChecked,
- useSdk: useSdk)));
+ useSdk: useSdk, verify: verify)));
return new ComposedCompilerConfiguration(nested, isPrecompiler: false);
}
« no previous file with comments | « pkg/kernel/test/verify_test.dart ('k') | tools/testing/dart/test_options.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698