"Reverting 19985"

R=lrn@google.com
BUG=

Review URL: https://codereview.chromium.org//12413023

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19986 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
ager@google.com
2013-03-14 07:47:37 +00:00
parent 067a55370a
commit 255f4e4ce4
8 changed files with 33 additions and 43 deletions
+5 -3
View File
@@ -382,13 +382,15 @@ class IterableMixinWorkaround {
return new ListMapView(l);
}
static bool setContainsAll(Set set, Iterable other) {
for (var element in other) {
if (!set.contains(element)) return false;
static bool isSubsetOfSet(Set set, Set other) {
if (set.length > other.length) return false;
for (var element in set) {
if (!other.contains(element)) return false;
}
return true;
}
static Set setIntersection(Set set, Set other, Set result) {
Set smaller;
Set larger;
+4 -11
View File
@@ -86,19 +86,12 @@ class HashSet<E> extends Collection<E> implements Set<E> {
}
// Set.
bool isSubsetOf(Collection<E> other) {
// Deprecated, and using old signature.
Set otherSet;
if (other is Set) {
otherSet = other;
} else {
otherSet = other.toSet();
}
return IterableMixinWorkaround.setContainsAll(otherSet, this);
bool isSubsetOf(Set<E> other) {
return IterableMixinWorkaround.isSubsetOfSet(this, other);
}
bool containsAll(Iterable<E> other) {
return IterableMixinWorkaround.setContainsAll(this, other);
bool containsAll(Set<E> other) {
return IterableMixinWorkaround.isSubsetOfSet(other, this);
}
Set<E> intersection(Set<E> other) {
+4 -11
View File
@@ -128,19 +128,12 @@ class LinkedHashSet<E> extends Collection<E> implements Set<E> {
}
// Set.
bool isSubsetOf(Collection<E> other) {
// Deprecated, and using old signature.
Set otherSet;
if (other is Set) {
otherSet = other;
} else {
otherSet = other.toSet();
}
return IterableMixinWorkaround.setContainsAll(otherSet, this);
bool isSubsetOf(Set<E> other) {
return IterableMixinWorkaround.isSubsetOfSet(this, other);
}
bool containsAll(Iterable<E> other) {
return IterableMixinWorkaround.setContainsAll(this, other);
bool containsAll(Set<E> other) {
return IterableMixinWorkaround.isSubsetOfSet(other, this);
}
Set<E> intersection(Set<E> other) {
+2 -6
View File
@@ -36,17 +36,13 @@ abstract class Set<E> extends Collection<E> {
/**
* Returns true if [other] contains all the elements of this Set.
*
* *Deprecated*. Use `other.containsAll(thisSet)` instead if [other]
* is a Set, and convert `other` to a Set if it isn't.
*/
@deprecated
bool isSubsetOf(Iterable<E> other);
bool isSubsetOf(Set<E> other);
/**
* Returns true if this Set contains all the elements of [other].
*/
bool containsAll(Iterable<E> other);
bool containsAll(Set<E> other);
/**
* Returns a new set which is the intersection between this set and [other].
-3
View File
@@ -35264,7 +35264,6 @@ class _Utils {
static window() native "Utils_window";
static print(String message) native "Utils_print";
static forwardingPrint(String message) native "Utils_forwardingPrint";
static SendPort spawnDomFunctionImpl(Function topLevelFunction) native "Utils_spawnDomFunction";
static int _getNewIsolateId() native "Utils_getNewIsolateId";
static bool shadowRootSupported(Document document) native "Utils_shadowRootSupported";
@@ -35344,5 +35343,3 @@ get _printClosure => (s) {
_Utils.print(s);
}
};
final _forwardingPrintClosure = _Utils.forwardingPrint;
+2
View File
@@ -114,6 +114,8 @@ LibTest/core/Set/every_A01_t03: Fail # issue 390
LibTest/core/Set/forEach_A01_t05: Fail # issue 390
LibTest/core/Set/intersection_A01_t01: Fail # issue 390
LibTest/core/Set/intersection_A01_t02: Pass # issue 390
LibTest/core/Set/isSubsetOf_A01_t01: Fail # issue 390
LibTest/core/Set/isSubsetOf_A01_t02: Fail # issue 390
LibTest/core/Set/removeAll_A01_t01: Fail # issue 390
LibTest/core/Set/remove_A01_t01: Fail # issue 390
LibTest/core/Set/remove_A01_t03: Fail # issue 390
+7 -4
View File
@@ -651,21 +651,22 @@ LibTest/isolate/SendPort/call_A01_t01: Fail # Future is in async library. co19 i
LibTest/core/Set/add_A01_t06: Fail # issue 390
LibTest/core/Set/containsAll_A01_t01: Fail # issue 390
LibTest/core/Set/containsAll_A01_t02: Pass # issue 390
LibTest/core/Set/every_A01_t01: Fail # issue 390
LibTest/core/Set/every_A01_t03: Fail # issue 390
LibTest/core/Set/forEach_A01_t05: Fail # issue 390
LibTest/core/Set/intersection_A01_t01: Fail # issue 390
LibTest/core/Set/intersection_A01_t02: Fail # issue 390
LibTest/core/Set/intersection_A01_t03: Fail # issue 390
LibTest/core/Set/intersection_A03_t01: Pass # issue 390
LibTest/core/Set/isSubsetOf_A01_t01: Fail # issue 390
LibTest/core/Set/isSubsetOf_A01_t02: Pass # issue 390
LibTest/core/Set/removeAll_A01_t01: Fail # issue 390
LibTest/core/Set/remove_A01_t01: Fail # issue 390
LibTest/core/Set/remove_A01_t03: Fail # issue 390
# Issues with co19 test suite in unchecked mode.
[ $compiler == dart2js && $unchecked ]
LibTest/core/Set/containsAll_A01_t02: Fail # Doesn't expect null to be allowed in Set or Map keys (issue 377). Passes in checked mode due to Issue 390.
LibTest/core/Set/intersection_A03_t01: Fail # Doesn't expect null to be allowed in Set or Map keys (issue 377). Passes in checked mode due to Issue 390.
LibTest/core/Future/chain_A02_t05: Fail # Future is in async library. co19 issue 367
LibTest/core/Future/transform_A02_t04: Fail # Future is in async library. co19 issue 367
@@ -868,9 +869,11 @@ LibTest/core/Map/remove_A01_t02: Fail # Doesn't expect null to be allowed in Set
LibTest/core/Set/add_A01_t02: Fail # Doesn't expect null to be allowed in Set or Map keys (issue 377).
LibTest/core/Set/addAll_A01_t02: Fail # Doesn't expect null to be allowed in Set or Map keys (issue 377).
LibTest/core/Set/contains_A01_t02: Fail # Doesn't expect null to be allowed in Set or Map keys (issue 377).
LibTest/core/Set/containsAll_A01_t02: Fail # Doesn't expect null to be allowed in Set or Map keys (issue 377).
LibTest/core/Set/intersection_A03_t01: Fail # Doesn't expect null to be allowed in Set or Map keys (issue 377).
LibTest/core/Set/isSubsetOf_A01_t02: Fail # Doesn't expect null to be allowed in Set or Map keys (issue 377).
LibTest/core/Set/remove_A01_t02: Fail # Doesn't expect null to be allowed in Set or Map keys (issue 377).
LibTest/core/Set/removeAll_A01_t02: Fail # Doesn't expect null to be allowed in Set or Map keys (issue 377).
LibTest/core/Set/isSubsetOf_A01_t02: Fail # Doesn't expect null to be allowed in Set or Map keys (issue 377).
LibTest/core/Map/forEach_A01_t07: Fail # Doesn't expect concurrent modification error (issue 376).
+9 -5
View File
@@ -525,9 +525,13 @@ LibTest/core/Map/remove_A01_t02: Fail # Doesn't expect null to be allowed in Set
LibTest/core/Set/add_A01_t02: Fail # Doesn't expect null to be allowed in Set or Map keys (issue 377).
LibTest/core/Set/addAll_A01_t02: Fail # Doesn't expect null to be allowed in Set or Map keys (issue 377).
LibTest/core/Set/contains_A01_t02: Fail # Doesn't expect null to be allowed in Set or Map keys (issue 377).
LibTest/core/Set/containsAll_A01_t02: Fail # Doesn't expect null to be allowed in Set or Map keys (issue 377).
LibTest/core/Set/intersection_A03_t01: Fail # Doesn't expect null to be allowed in Set or Map keys (issue 377).
LibTest/core/Set/isSubsetOf_A01_t02: Fail # Doesn't expect null to be allowed in Set or Map keys (issue 377).
LibTest/core/Set/remove_A01_t02: Fail # Doesn't expect null to be allowed in Set or Map keys (issue 377).
LibTest/core/Set/removeAll_A01_t02: Fail # Doesn't expect null to be allowed in Set or Map keys (issue 377).
LibTest/core/Set/isSubsetOf_A01_t02: Fail # Doesn't expect null to be allowed in Set or Map keys (issue 377).
LibTest/core/Map/forEach_A01_t07: Fail # Doesn't expect concurrent modification error (issue 376).
LibTest/core/String/charCodes_A01_t01: Fail # Deprecated string members removed (issue 382).
LibTest/core/String/charCodeAt_A02_t01: Fail # Deprecated string members removed (issue 382).
@@ -606,20 +610,20 @@ Language/14_Types/4_Interface_Types_A08_t06: Fail # Moved collection classes fro
LibTest/core/Set/add_A01_t06: Fail # issue 390
LibTest/core/Set/containsAll_A01_t01: Fail # issue 390
LibTest/core/Set/containsAll_A01_t02: Pass # issue 390
LibTest/core/Set/every_A01_t01: Fail # issue 390
LibTest/core/Set/every_A01_t03: Fail # issue 390
LibTest/core/Set/forEach_A01_t05: Fail # issue 390
LibTest/core/Set/intersection_A01_t01: Fail # issue 390
LibTest/core/Set/intersection_A01_t02: Fail # issue 390
LibTest/core/Set/intersection_A01_t03: Fail # issue 390
LibTest/core/Set/intersection_A03_t01: Pass # issue 390
LibTest/core/Set/isSubsetOf_A01_t01: Fail # issue 390
LibTest/core/Set/isSubsetOf_A01_t02: Pass # issue 390
LibTest/core/Set/removeAll_A01_t01: Fail # issue 390
LibTest/core/Set/remove_A01_t01: Fail # issue 390
LibTest/core/Set/remove_A01_t03: Fail # issue 390
[ $compiler == none && $runtime == vm && $unchecked ]
LibTest/core/Set/containsAll_A01_t02: Fail # Doesn't expect null to be allowed in Set or Map keys (issue 377). Succeedes in checked mode due to Issue 390.
LibTest/core/Set/intersection_A03_t01: Fail # Doesn't expect null to be allowed in Set or Map keys (issue 377). Succeedes in checked mode due to Issue 390.
[ $compiler == none && $arch == simarm ]
*: Skip