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

Unified Diff: pkg/compiler/lib/src/helpers/expensive_map.dart

Issue 1859343004: dartfmt pkg/compiler (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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 | « pkg/compiler/lib/src/helpers/debug_collection.dart ('k') | pkg/compiler/lib/src/helpers/expensive_set.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/helpers/expensive_map.dart
diff --git a/pkg/compiler/lib/src/helpers/expensive_map.dart b/pkg/compiler/lib/src/helpers/expensive_map.dart
index 68d106eb631d93fc5f8873a7d1e710a43986225e..8b382d9943a86ded4e2ae98dec6cf9071edb3409 100644
--- a/pkg/compiler/lib/src/helpers/expensive_map.dart
+++ b/pkg/compiler/lib/src/helpers/expensive_map.dart
@@ -2,14 +2,12 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-
/**
* The expensive map is a data structure useful for tracking down
* excessive memory usage due to large maps. It acts as an ordinary
* hash map, but it uses 10 times more memory (by default).
*/
class ExpensiveMap<K, V> implements Map<K, V> {
-
final List _maps;
ExpensiveMap([int copies = 10]) : _maps = new List(copies) {
@@ -29,13 +27,13 @@ class ExpensiveMap<K, V> implements Map<K, V> {
bool containsKey(K key) => _maps[0].containsKey(key);
bool containsValue(V value) => _maps[0].containsValue(value);
- V operator[](K key) => _maps[0][key];
+ V operator [](K key) => _maps[0][key];
void forEach(void action(K key, V value)) {
_maps[0].forEach(action);
}
- void operator[]=(K key, V value) {
+ void operator []=(K key, V value) {
for (int i = 0; i < _maps.length; i++) {
_maps[i][key] = value;
}
« no previous file with comments | « pkg/compiler/lib/src/helpers/debug_collection.dart ('k') | pkg/compiler/lib/src/helpers/expensive_set.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698