Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library compiler_configuration; | 5 library compiler_configuration; |
| 6 | 6 |
| 7 import 'dart:io' show | 7 import 'dart:io' show |
| 8 Platform; | 8 Platform; |
| 9 | 9 |
| 10 import 'runtime_configuration.dart' show | 10 import 'runtime_configuration.dart' show |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 241 if (isHostChecked) multiplier *= 16; | 241 if (isHostChecked) multiplier *= 16; |
| 242 return multiplier; | 242 return multiplier; |
| 243 } | 243 } |
| 244 | 244 |
| 245 CommandArtifact computeCompilationArtifact( | 245 CommandArtifact computeCompilationArtifact( |
| 246 String buildDir, | 246 String buildDir, |
| 247 String tempDir, | 247 String tempDir, |
| 248 CommandBuilder commandBuilder, | 248 CommandBuilder commandBuilder, |
| 249 List arguments, | 249 List arguments, |
| 250 Map<String, String> environmentOverrides) { | 250 Map<String, String> environmentOverrides) { |
| 251 String normalOutput = '$tempDir/out.js'; | 251 String normalOutput = '$tempDir/out.js'; |
|
ricow1
2014/04/01 10:37:58
just inline the string
Johnni Winther
2014/04/01 13:52:35
Done.
| |
| 252 String cspOutput = '$tempDir/out.precompiled.js'; | |
| 253 return new CommandArtifact( | 252 return new CommandArtifact( |
| 254 <Command>[ | 253 <Command>[ |
| 255 this.computeCompilationCommand( | 254 this.computeCompilationCommand( |
| 256 normalOutput, | 255 normalOutput, |
| 257 buildDir, | 256 buildDir, |
| 258 CommandBuilder.instance, | 257 CommandBuilder.instance, |
| 259 arguments, | 258 arguments, |
| 260 environmentOverrides)], | 259 environmentOverrides)], |
| 261 // dart2js always produce both out.js and out.precompiled.js. To avoid | 260 normalOutput, |
| 262 // recompiling the CSP version, we always tell the CompilationCommand | |
| 263 // to track the timestamp of out.js, but select which one to run based | |
| 264 // on CSP mode. | |
| 265 isCsp ? cspOutput : normalOutput, | |
| 266 'application/javascript'); | 261 'application/javascript'); |
| 267 } | 262 } |
| 268 | 263 |
| 269 List<String> computeRuntimeArguments( | 264 List<String> computeRuntimeArguments( |
| 270 RuntimeConfiguration runtimeConfiguration, | 265 RuntimeConfiguration runtimeConfiguration, |
| 271 String buildDir, | 266 String buildDir, |
| 272 TestInformation info, | 267 TestInformation info, |
| 273 List<String> vmOptions, | 268 List<String> vmOptions, |
| 274 List<String> sharedOptions, | 269 List<String> sharedOptions, |
| 275 List<String> originalArguments, | 270 List<String> originalArguments, |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 389 bool isDebug, | 384 bool isDebug, |
| 390 bool isChecked, | 385 bool isChecked, |
| 391 bool isHostChecked, | 386 bool isHostChecked, |
| 392 bool useSdk}) | 387 bool useSdk}) |
| 393 : super( | 388 : super( |
| 394 'dart2analyzer', isDebug: isDebug, isChecked: isChecked, | 389 'dart2analyzer', isDebug: isDebug, isChecked: isChecked, |
| 395 isHostChecked: isHostChecked, useSdk: useSdk); | 390 isHostChecked: isHostChecked, useSdk: useSdk); |
| 396 | 391 |
| 397 String computeCompilerPath(String buildDir) => 'editor/tools/analyzer'; | 392 String computeCompilerPath(String buildDir) => 'editor/tools/analyzer'; |
| 398 } | 393 } |
| OLD | NEW |