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

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

Issue 1085803002: Add a --cps-ir flag to the testing script to allow us to run with the new cps based backend in dart… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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 | « no previous file | 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 668804a361ae5f852b267da6d1aa989aa6664a93..0e9059eca9fa2857ab60d3d87eab312b5b29d4a1 100644
--- a/tools/testing/dart/compiler_configuration.dart
+++ b/tools/testing/dart/compiler_configuration.dart
@@ -60,6 +60,7 @@ abstract class CompilerConfiguration {
bool isHostChecked = configuration['host_checked'];
bool useSdk = configuration['use_sdk'];
bool isCsp = configuration['csp'];
+ bool useCps = configuration['cps_ir'];
switch (compiler) {
case 'dartanalyzer':
@@ -73,8 +74,8 @@ abstract class CompilerConfiguration {
case 'dart2js':
return new Dart2jsCompilerConfiguration(
isDebug: isDebug, isChecked: isChecked,
- isHostChecked: isHostChecked, useSdk: useSdk, isCsp: isCsp,
- extraDart2jsOptions:
+ isHostChecked: isHostChecked, useCps: useCps, useSdk: useSdk,
+ isCsp: isCsp, extraDart2jsOptions:
TestUtils.getExtraOptions(configuration, 'dart2js_options'));
case 'dart2dart':
return new Dart2dartCompilerConfiguration(
@@ -225,6 +226,7 @@ class Dart2xCompilerConfiguration extends CompilerConfiguration {
/// Configuration for dart2js compiler.
class Dart2jsCompilerConfiguration extends Dart2xCompilerConfiguration {
final bool isCsp;
+ final bool useCps;
final List<String> extraDart2jsOptions;
Dart2jsCompilerConfiguration({
@@ -232,6 +234,7 @@ class Dart2jsCompilerConfiguration extends Dart2xCompilerConfiguration {
bool isChecked,
bool isHostChecked,
bool useSdk,
+ bool this.useCps,
bool this.isCsp,
this.extraDart2jsOptions})
: super(
@@ -253,6 +256,11 @@ class Dart2jsCompilerConfiguration extends Dart2xCompilerConfiguration {
CommandBuilder commandBuilder,
List arguments,
Map<String, String> environmentOverrides) {
+ var env = environmentOverrides;
+ if (useCps) {
+ var vmoption = { 'DART_VM_OPTIONS' : '-DUSE_CPS_IR=true' };
Bill Hesse 2015/04/14 11:42:33 We do actually have a small problem with the memor
+ env = {}..addAll(environmentOverrides)..addAll(vmoption);
karlklose 2015/04/14 08:56:03 Shouldn't this be 'env.addAll(...)' to preserve ot
ricow1 2015/04/14 08:59:10 I don preserve other overriddes, since I addAll en
+ }
return new CommandArtifact(
<Command>[
this.computeCompilationCommand(
@@ -260,7 +268,7 @@ class Dart2jsCompilerConfiguration extends Dart2xCompilerConfiguration {
buildDir,
CommandBuilder.instance,
[]..addAll(arguments)..addAll(extraDart2jsOptions),
- environmentOverrides)],
+ env)],
'$tempDir/out.js',
'application/javascript');
}
« no previous file with comments | « no previous file | tools/testing/dart/test_options.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698