Chromium Code Reviews| Index: tools/testing/dart/compiler_configuration.dart |
| diff --git a/tools/testing/dart/compiler_configuration.dart b/tools/testing/dart/compiler_configuration.dart |
| index 6cada5b21c9342eb8a4686011569fb12d3951ea8..49368ce1cc60234084f1e0b2310966c7de4bd1df 100644 |
| --- a/tools/testing/dart/compiler_configuration.dart |
| +++ b/tools/testing/dart/compiler_configuration.dart |
| @@ -78,11 +78,9 @@ abstract class CompilerConfiguration { |
| useFastStartup: useFastStartup, |
| extraDart2jsOptions: |
| TestUtils.getExtraOptions(configuration, 'dart2js_options')); |
| + case 'dart2appjit': |
|
rmacnak
2016/10/19 17:41:21
If there's going to be only one --snapshot-kind fo
siva
2016/10/19 22:16:52
It has only one compiler but two options doing the
|
| case 'dart2app': |
| return new Dart2AppSnapshotCompilerConfiguration( |
| - isDebug: isDebug, isChecked: isChecked); |
| - case 'dart2appjit': |
| - return new Dart2AppJitSnapshotCompilerConfiguration( |
| isDebug: isDebug, isChecked: isChecked, useBlobs: useBlobs); |
| case 'precompiler': |
| return new PrecompilerCompilerConfiguration( |
| @@ -502,8 +500,9 @@ class PrecompilerCompilerConfiguration extends CompilerConfiguration { |
| } |
| class Dart2AppSnapshotCompilerConfiguration extends CompilerConfiguration { |
| - Dart2AppSnapshotCompilerConfiguration({bool isDebug, bool isChecked}) |
| - : super._subclass(isDebug: isDebug, isChecked: isChecked); |
| + final bool useBlobs; |
| + Dart2AppSnapshotCompilerConfiguration({bool isDebug, bool isChecked, bool useBlobs}) |
| + : super._subclass(isDebug: isDebug, isChecked: isChecked), this.useBlobs = useBlobs; |
| int computeTimeoutMultiplier() { |
| int multiplier = 2; |
| @@ -530,10 +529,13 @@ class Dart2AppSnapshotCompilerConfiguration extends CompilerConfiguration { |
| CommandBuilder commandBuilder, |
| List arguments, |
| Map<String, String> environmentOverrides) { |
| - var exec = "$buildDir/dart_bootstrap"; |
| + var exec = "$buildDir/dart"; |
| var args = new List(); |
| args.add("--snapshot=$tempDir/out.jitsnapshot"); |
| - args.add("--snapshot-kind=app-after-run"); |
| + args.add("--snapshot-kind=app-jit"); |
| + if (useBlobs) { |
| + args.add("--use-blobs"); |
| + } |
| args.addAll(arguments); |
| return commandBuilder.getCompilationCommand( |
| @@ -579,37 +581,6 @@ class Dart2AppSnapshotCompilerConfiguration extends CompilerConfiguration { |
| } |
| } |
| -class Dart2AppJitSnapshotCompilerConfiguration extends Dart2AppSnapshotCompilerConfiguration { |
| - final bool useBlobs; |
| - Dart2AppJitSnapshotCompilerConfiguration({bool isDebug, bool isChecked, bool useBlobs}) |
| - : super(isDebug: isDebug, isChecked: isChecked), this.useBlobs = useBlobs; |
| - |
| - CompilationCommand computeCompilationCommand( |
| - String tempDir, |
| - String buildDir, |
| - CommandBuilder commandBuilder, |
| - List arguments, |
| - Map<String, String> environmentOverrides) { |
| - var exec = "$buildDir/dart"; |
| - var args = new List(); |
| - args.add("--snapshot=$tempDir/out.jitsnapshot"); |
| - args.add("--snapshot-kind=app-jit-after-run"); |
| - if (useBlobs) { |
| - args.add("--use-blobs"); |
| - } |
| - args.addAll(arguments); |
| - |
| - return commandBuilder.getCompilationCommand( |
| - 'dart2snapshot', |
| - tempDir, |
| - !useSdk, |
| - bootstrapDependencies(buildDir), |
| - exec, |
| - args, |
| - environmentOverrides); |
| - } |
| -} |
| - |
| class AnalyzerCompilerConfiguration extends CompilerConfiguration { |
| AnalyzerCompilerConfiguration( |
| {bool isDebug, bool isChecked, bool isStrong, bool isHostChecked, bool |