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

Unified Diff: tools/testing/dart/compiler_configuration.dart

Issue 645533002: Clean up test_runner Command subclass hash/equality. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove stray changes Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/standalone/io/test_runner_test.dart ('k') | tools/testing/dart/test_runner.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/compiler_configuration.dart
diff --git a/tools/testing/dart/compiler_configuration.dart b/tools/testing/dart/compiler_configuration.dart
index 20ab1c77163774da2d5fa9021a06c82e0e88c58b..97822270347298282589cd67037d80b95a2c60e2 100644
--- a/tools/testing/dart/compiler_configuration.dart
+++ b/tools/testing/dart/compiler_configuration.dart
@@ -169,6 +169,8 @@ class NoneCompilerConfiguration extends CompilerConfiguration {
/// dart2dart.
class Dart2xCompilerConfiguration extends CompilerConfiguration {
final String moniker;
+ static Map<String, List<Uri>> _bootstrapDependenciesCache =
+ new Map<String, List<Uri>>();
Dart2xCompilerConfiguration(
this.moniker,
@@ -214,10 +216,9 @@ class Dart2xCompilerConfiguration extends CompilerConfiguration {
List<Uri> bootstrapDependencies(String buildDir) {
if (!useSdk) return const <Uri>[];
-
- Uri absoluteBuildDir = Uri.base.resolveUri(nativeDirectoryToUri(buildDir));
- return [absoluteBuildDir.resolve(
- 'dart-sdk/bin/snapshots/dart2js.dart.snapshot')];
+ return _bootstrapDependenciesCache.putIfAbsent(buildDir, () =>
+ [Uri.base.resolveUri(nativeDirectoryToUri(buildDir))
+ .resolve('dart-sdk/bin/snapshots/dart2js.dart.snapshot')]);
}
}
« no previous file with comments | « tests/standalone/io/test_runner_test.dart ('k') | tools/testing/dart/test_runner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698