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

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

Issue 2429023002: Cleanup options for use of application snapshots (Closed)
Patch Set: Address code review comments. Created 4 years, 2 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
« no previous file with comments | « tests/standalone/standalone.status ('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 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':
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
« no previous file with comments | « tests/standalone/standalone.status ('k') | tools/testing/dart/test_options.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698