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 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'); |
| } |