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

Unified Diff: sdk/lib/internal/iterable.dart

Issue 297053002: Reinstall previous behavior for Set and Queue toString. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 6 years, 7 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 | « sdk/lib/collection/splay_tree.dart ('k') | tests/compiler/dart2js/mirrors_used_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/internal/iterable.dart
diff --git a/sdk/lib/internal/iterable.dart b/sdk/lib/internal/iterable.dart
index 6149cb9f265fe1546fde7a8dadac023a00608526..4cf841801a840490b88d5501340bac09ba45282f 100644
--- a/sdk/lib/internal/iterable.dart
+++ b/sdk/lib/internal/iterable.dart
@@ -741,9 +741,6 @@ abstract class BidirectionalIterator<T> implements Iterator<T> {
* The uses of this class will be replaced by mixins.
*/
class IterableMixinWorkaround {
- // A list to identify cyclic collections during toString() calls.
- static List _toStringList = new List();
-
static bool contains(Iterable iterable, var element) {
for (final e in iterable) {
if (e == element) return true;
@@ -937,27 +934,6 @@ class IterableMixinWorkaround {
return buffer.toString();
}
- static String toStringIterable(Iterable iterable, String leftDelimiter,
- String rightDelimiter) {
- for (int i = 0; i < _toStringList.length; i++) {
- if (identical(_toStringList[i], iterable)) {
- return '$leftDelimiter...$rightDelimiter';
- }
- }
-
- StringBuffer result = new StringBuffer();
- try {
- _toStringList.add(iterable);
- result.write(leftDelimiter);
- result.writeAll(iterable, ', ');
- result.write(rightDelimiter);
- } finally {
- assert(identical(_toStringList.last, iterable));
- _toStringList.removeLast();
- }
- return result.toString();
- }
-
static Iterable where(Iterable iterable, bool f(var element)) {
return new WhereIterable(iterable, f);
}
« no previous file with comments | « sdk/lib/collection/splay_tree.dart ('k') | tests/compiler/dart2js/mirrors_used_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698