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

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

Issue 1915853004: Option to output precompiled instructions as a blob for use with mmap instead of assembly for use i… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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 | « runtime/vm/snapshot_test.cc ('k') | tools/testing/dart/runtime_configuration.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 147cd993445f5759207f32ad6fd3056807b2e243..161252a17841a0569f90098f660039ae6d641b04 100644
--- a/tools/testing/dart/compiler_configuration.dart
+++ b/tools/testing/dart/compiler_configuration.dart
@@ -52,6 +52,7 @@ abstract class CompilerConfiguration {
bool useSdk = configuration['use_sdk'];
bool isCsp = configuration['csp'];
bool useCps = configuration['cps_ir'];
+ bool useBlobs = configuration['use_blobs'];
switch (compiler) {
case 'dart2analyzer':
@@ -77,7 +78,8 @@ abstract class CompilerConfiguration {
return new PrecompilerCompilerConfiguration(
isDebug: isDebug,
isChecked: isChecked,
- arch: configuration['arch']);
+ arch: configuration['arch'],
+ useBlobs: useBlobs);
case 'none':
return new NoneCompilerConfiguration(
isDebug: isDebug,
@@ -299,10 +301,12 @@ class Dart2jsCompilerConfiguration extends Dart2xCompilerConfiguration {
class PrecompilerCompilerConfiguration extends CompilerConfiguration {
final String arch;
+ final bool useBlobs;
- PrecompilerCompilerConfiguration({bool isDebug, bool isChecked, String arch})
+ PrecompilerCompilerConfiguration({bool isDebug, bool isChecked, String arch, bool useBlobs})
: super._subclass(isDebug: isDebug, isChecked: isChecked),
- arch = arch;
+ arch = arch,
+ useBlobs = useBlobs;
int computeTimeoutMultiplier() {
int multiplier = 2;
@@ -317,14 +321,16 @@ class PrecompilerCompilerConfiguration extends CompilerConfiguration {
CommandBuilder commandBuilder,
List arguments,
Map<String, String> environmentOverrides) {
- return new CommandArtifact(<Command>[
- this.computeCompilationCommand(tempDir, buildDir, CommandBuilder.instance,
- arguments, environmentOverrides),
- this.computeAssembleCommand(tempDir, buildDir, CommandBuilder.instance,
- arguments, environmentOverrides),
- this.computeRemoveAssemblyCommand(tempDir, buildDir,
- CommandBuilder.instance, arguments, environmentOverrides)
- ], '$tempDir', 'application/dart-precompiled');
+ var commands = new List<Command>();
+ commands.add(this.computeCompilationCommand(tempDir, buildDir, CommandBuilder.instance,
+ arguments, environmentOverrides));
+ if (!useBlobs) {
+ commands.add(this.computeAssembleCommand(tempDir, buildDir, CommandBuilder.instance,
+ arguments, environmentOverrides));
+ commands.add(this.computeRemoveAssemblyCommand(tempDir, buildDir,
+ CommandBuilder.instance, arguments, environmentOverrides));
+ }
+ return new CommandArtifact(commands, '$tempDir', 'application/dart-precompiled');
}
CompilationCommand computeCompilationCommand(
@@ -336,6 +342,9 @@ class PrecompilerCompilerConfiguration extends CompilerConfiguration {
var exec = "$buildDir/dart_bootstrap";
var args = new List();
args.add("--gen-precompiled-snapshot=$tempDir");
+ if (useBlobs) {
+ args.add("--use_blobs");
+ }
args.addAll(arguments);
return commandBuilder.getCompilationCommand('precompiler', tempDir, !useSdk,
« no previous file with comments | « runtime/vm/snapshot_test.cc ('k') | tools/testing/dart/runtime_configuration.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698