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

Side by Side Diff: tools/testing/dart/compiler_configuration.dart

Issue 1330643003: This is a fixed up version of: (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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 unified diff | Download patch
OLDNEW
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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 bool get hasCompiler => false; 148 bool get hasCompiler => false;
149 149
150 List<String> computeRuntimeArguments( 150 List<String> computeRuntimeArguments(
151 RuntimeConfiguration runtimeConfiguration, 151 RuntimeConfiguration runtimeConfiguration,
152 String buildDir, 152 String buildDir,
153 TestInformation info, 153 TestInformation info,
154 List<String> vmOptions, 154 List<String> vmOptions,
155 List<String> sharedOptions, 155 List<String> sharedOptions,
156 List<String> originalArguments, 156 List<String> originalArguments,
157 CommandArtifact artifact) { 157 CommandArtifact artifact) {
158 return <String>[] 158 List<String> args = [];
159 if (isChecked) {
160 args.add('--enable_asserts');
161 args.add('--enable_type_checks');
162 }
163 return args
159 ..addAll(vmOptions) 164 ..addAll(vmOptions)
160 ..addAll(sharedOptions) 165 ..addAll(sharedOptions)
161 ..addAll(originalArguments); 166 ..addAll(originalArguments);
162 } 167 }
163 } 168 }
164 169
165 /// Common configuration for dart2js-based tools, such as, dart2js 170 /// Common configuration for dart2js-based tools, such as, dart2js
166 class Dart2xCompilerConfiguration extends CompilerConfiguration { 171 class Dart2xCompilerConfiguration extends CompilerConfiguration {
167 final String moniker; 172 final String moniker;
168 static Map<String, List<Uri>> _bootstrapDependenciesCache = 173 static Map<String, List<Uri>> _bootstrapDependenciesCache =
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 String suffix = executableScriptSuffix; 313 String suffix = executableScriptSuffix;
309 return 'sdk/bin/dartanalyzer_java$suffix'; 314 return 'sdk/bin/dartanalyzer_java$suffix';
310 } 315 }
311 316
312 CommandArtifact computeCompilationArtifact( 317 CommandArtifact computeCompilationArtifact(
313 String buildDir, 318 String buildDir,
314 String tempDir, 319 String tempDir,
315 CommandBuilder commandBuilder, 320 CommandBuilder commandBuilder,
316 List arguments, 321 List arguments,
317 Map<String, String> environmentOverrides) { 322 Map<String, String> environmentOverrides) {
323 arguments = new List.from(arguments);
324 if (isChecked) {
325 arguments.add('--enable_type_checks');
326 }
318 return new CommandArtifact( 327 return new CommandArtifact(
319 <Command>[ 328 <Command>[
320 commandBuilder.getAnalysisCommand( 329 commandBuilder.getAnalysisCommand(
321 moniker, computeCompilerPath(buildDir), arguments, 330 moniker, computeCompilerPath(buildDir), arguments,
322 environmentOverrides, 331 environmentOverrides,
323 flavor: moniker)], 332 flavor: moniker)],
324 null, null); // Since this is not a real compilation, no artifacts are 333 null, null); // Since this is not a real compilation, no artifacts are
325 // produced. 334 // produced.
326 } 335 }
327 336
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 // shipped SDK, that is the script is not installed in 368 // shipped SDK, that is the script is not installed in
360 // "$buildDir/dart-sdk/bin/" 369 // "$buildDir/dart-sdk/bin/"
361 return '$prefix/dartanalyzer_developer$suffix'; 370 return '$prefix/dartanalyzer_developer$suffix';
362 } 371 }
363 if (useSdk) { 372 if (useSdk) {
364 prefix = '$buildDir/dart-sdk/bin'; 373 prefix = '$buildDir/dart-sdk/bin';
365 } 374 }
366 return '$prefix/dartanalyzer$suffix'; 375 return '$prefix/dartanalyzer$suffix';
367 } 376 }
368 } 377 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698