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

Unified Diff: sdk/lib/_internal/compiler/implementation/lib/js_array.dart

Issue 12049065: Fix bugs in GrowableList.remove*. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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
Index: sdk/lib/_internal/compiler/implementation/lib/js_array.dart
diff --git a/sdk/lib/_internal/compiler/implementation/lib/js_array.dart b/sdk/lib/_internal/compiler/implementation/lib/js_array.dart
index 7d438f18aee1eb02c888f5aea3293657844f710e..bae5997039dffc40537864774e568aab35a7eac4 100644
--- a/sdk/lib/_internal/compiler/implementation/lib/js_array.dart
+++ b/sdk/lib/_internal/compiler/implementation/lib/js_array.dart
@@ -44,20 +44,21 @@ class JSArray<E> implements List<E> {
}
void removeAll(Iterable elements) {
- Collections.removeAll(this, elements);
+ IterableMixinWorkaround.removeAllList(this, elements);
}
void retainAll(Iterable elements) {
- Collections.retainAll(this, elements);
+ IterableMixinWorkaround.retainAll(this, elements);
}
void removeMatching(bool test(E element)) {
// This could, and should, be optimized.
- Collections.removeMatching(this, test);
+ IterableMixinWorkaround.removeMatchingList(this, test);
}
void reatainMatching(bool test(E element)) {
- Collections.reatainMatching(this, test);
+ IterableMixinWorkaround.removeMatchingList(this,
+ (E element) => !test(element));
}
Iterable<E> where(bool f(E element)) {

Powered by Google App Engine
This is Rietveld 408576698