| 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 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 if (isChecked) multiplier *= 2; | 398 if (isChecked) multiplier *= 2; |
| 399 return multiplier; | 399 return multiplier; |
| 400 } | 400 } |
| 401 | 401 |
| 402 CommandArtifact computeCompilationArtifact( | 402 CommandArtifact computeCompilationArtifact( |
| 403 String buildDir, | 403 String buildDir, |
| 404 String tempDir, | 404 String tempDir, |
| 405 CommandBuilder commandBuilder, | 405 CommandBuilder commandBuilder, |
| 406 List arguments, | 406 List arguments, |
| 407 Map<String, String> environmentOverrides) { | 407 Map<String, String> environmentOverrides) { |
| 408 String outputName = computeOutputName(tempDir); |
| 408 return new CommandArtifact( | 409 return new CommandArtifact( |
| 409 <Command>[ | 410 <Command>[ |
| 410 this.computeCompilationCommand( | 411 this.computeCompilationCommand( |
| 411 tempDir, | 412 outputName, |
| 412 buildDir, | 413 buildDir, |
| 413 CommandBuilder.instance, | 414 CommandBuilder.instance, |
| 414 arguments, | 415 arguments, |
| 415 environmentOverrides)], | 416 environmentOverrides)], |
| 416 computeOutputName(tempDir), | 417 outputName, |
| 417 'application/dart-snapshot'); | 418 'application/dart-snapshot'); |
| 418 } | 419 } |
| 419 | 420 |
| 420 String computeOutputName(String tempDir) { | 421 String computeOutputName(String tempDir) { |
| 421 return '$tempDir/test.snapshot'; | 422 var randName = TestUtils.getRandomNumber().toString(); |
| 423 return '$tempDir/test.$randName'; |
| 422 } | 424 } |
| 423 | 425 |
| 424 CompilationCommand computeCompilationCommand( | 426 CompilationCommand computeCompilationCommand( |
| 425 String tempDir, | 427 String outputName, |
| 426 String buildDir, | 428 String buildDir, |
| 427 CommandBuilder commandBuilder, | 429 CommandBuilder commandBuilder, |
| 428 List arguments, | 430 List arguments, |
| 429 Map<String, String> environmentOverrides) { | 431 Map<String, String> environmentOverrides) { |
| 430 var exec = "$buildDir/dart_no_snapshot"; | 432 var exec = "$buildDir/dart_no_snapshot"; |
| 431 var args = new List(); | 433 var args = new List(); |
| 432 args.add("--full-snapshot-after-run=${computeOutputName(tempDir)}"); | 434 args.add("--full-snapshot-after-run=$outputName"); |
| 433 args.addAll(arguments); | 435 args.addAll(arguments); |
| 434 | 436 |
| 435 return commandBuilder.getCompilationCommand( | 437 return commandBuilder.getCompilationCommand( |
| 436 'dart2snapshot', computeOutputName(tempDir), !useSdk, | 438 'dart2snapshot', outputName, !useSdk, |
| 437 bootstrapDependencies(buildDir), | 439 bootstrapDependencies(buildDir), |
| 438 exec, args, environmentOverrides); | 440 exec, args, environmentOverrides); |
| 439 } | 441 } |
| 440 | 442 |
| 441 List<String> computeCompilerArguments(vmOptions, | 443 List<String> computeCompilerArguments(vmOptions, |
| 442 sharedOptions, | 444 sharedOptions, |
| 443 originalArguments) { | 445 originalArguments) { |
| 444 List<String> args = []; | 446 List<String> args = []; |
| 445 if (isChecked) { | 447 if (isChecked) { |
| 446 args.add('--enable_asserts'); | 448 args.add('--enable_asserts'); |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 529 RuntimeConfiguration runtimeConfiguration, | 531 RuntimeConfiguration runtimeConfiguration, |
| 530 String buildDir, | 532 String buildDir, |
| 531 TestInformation info, | 533 TestInformation info, |
| 532 List<String> vmOptions, | 534 List<String> vmOptions, |
| 533 List<String> sharedOptions, | 535 List<String> sharedOptions, |
| 534 List<String> originalArguments, | 536 List<String> originalArguments, |
| 535 CommandArtifact artifact) { | 537 CommandArtifact artifact) { |
| 536 return <String>[]; | 538 return <String>[]; |
| 537 } | 539 } |
| 538 } | 540 } |
| OLD | NEW |