Chromium Code Reviews| Index: tools/testing/dart/command.dart |
| diff --git a/tools/testing/dart/command.dart b/tools/testing/dart/command.dart |
| index e191186234fee1b96aad1d537be351553a014366..a84dd28dc764ddc184b330be0f9e88ec2e77305a 100644 |
| --- a/tools/testing/dart/command.dart |
| +++ b/tools/testing/dart/command.dart |
| @@ -40,19 +40,13 @@ class Command { |
| static Command compilation( |
| String displayName, |
| String outputFile, |
| - bool neverSkipCompilation, |
| List<Uri> bootstrapDependencies, |
| String executable, |
| List<String> arguments, |
| - Map<String, String> environment) { |
| - return new CompilationCommand._( |
| - displayName, |
| - outputFile, |
| - neverSkipCompilation, |
| - bootstrapDependencies, |
| - executable, |
| - arguments, |
| - environment); |
| + Map<String, String> environment, |
| + {bool alwaysCompile: false}) { |
| + return new CompilationCommand._(displayName, outputFile, alwaysCompile, |
| + bootstrapDependencies, executable, arguments, environment); |
| } |
| static Command kernelCompilation( |
| @@ -224,13 +218,16 @@ class ProcessCommand extends Command { |
| class CompilationCommand extends ProcessCommand { |
| final String _outputFile; |
| - final bool _neverSkipCompilation; |
| + |
| + /// If true, then the compilation is run even if the input files are older |
| + /// than the output file. |
| + final bool _alwaysCompile; |
| final List<Uri> _bootstrapDependencies; |
| CompilationCommand._( |
| String displayName, |
| this._outputFile, |
| - this._neverSkipCompilation, |
| + this._alwaysCompile, |
| this._bootstrapDependencies, |
| String executable, |
| List<String> arguments, |
| @@ -238,7 +235,7 @@ class CompilationCommand extends ProcessCommand { |
| : super._(displayName, executable, arguments, environmentOverrides); |
| Future<bool> get outputIsUpToDate { |
|
Bill Hesse
2017/06/21 16:33:20
Surely this is better written using keyword async?
Bob Nystrom
2017/06/21 20:18:28
It is a little out of scope, but what the heck. Ac
|
| - if (_neverSkipCompilation) return new Future.value(false); |
| + if (_alwaysCompile) return new Future.value(false); |
| Future<List<Uri>> readDepsFile(String path) { |
| var file = new io.File(new Path(path).toNativePath()); |
| @@ -281,14 +278,14 @@ class CompilationCommand extends ProcessCommand { |
| void _buildHashCode(HashCodeBuilder builder) { |
| super._buildHashCode(builder); |
| builder.addJson(_outputFile); |
| - builder.addJson(_neverSkipCompilation); |
| + builder.addJson(_alwaysCompile); |
| builder.addJson(_bootstrapDependencies); |
| } |
| bool _equal(CompilationCommand other) => |
| super._equal(other) && |
| _outputFile == other._outputFile && |
| - _neverSkipCompilation == other._neverSkipCompilation && |
| + _alwaysCompile == other._alwaysCompile && |
| deepJsonCompare(_bootstrapDependencies, other._bootstrapDependencies); |
| } |