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

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

Issue 1992703005: Add test harness option for app snapshots with unoptimized code. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 5781e837cd6ca5cd898af482519cf481fb39cd85..398986a50f1c4e566d60c9ba3997acdd08c00eac 100644
--- a/tools/testing/dart/compiler_configuration.dart
+++ b/tools/testing/dart/compiler_configuration.dart
@@ -74,6 +74,9 @@ abstract class CompilerConfiguration {
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(
isDebug: isDebug,
@@ -552,6 +555,37 @@ 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");
+ 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 isHostChecked, bool useSdk})

Powered by Google App Engine
This is Rietveld 408576698