Adding this complexity does not offer any significant improvements.
This reverts commit r24467.
Git commit: c17e2294e4e100bfc44efe792523c314a38cec47.
Swift SVN r24481
This fast path is only taken when the code is specialized.
Fixes <rdar://problem/19331717> Optimizer breaks Set<T> and Dictionary<K, V>
Swift SVN r24479
automaticallyNotifiesObserversForKey is now false for Array, Dictionary
and Set (since they can not be mutated).
Fixes rdar://problem/19404025
Swift SVN r24467
Set.description now prints its array literal form, and
Set.debugDescription prints its initializer form. Both print
the debugDescription of the members.
Set([1,2,3]).description = "[2, 3, 1]"
Set([1,2,3]).debugDescription = "Set([2, 3, 1])"
rdar://problem/19312961
Swift SVN r24306
The mandatory inlining of generic functions simplifies code and the
compiler omits these symbols now, so they could not be used in tests.
Swift SVN r24296
rdar://problem/17198298
- Allow 'static' in protocol property and func requirements, but not 'class'.
- Allow 'static' methods in classes - they are 'class final'.
- Only allow 'class' methods in classes (or extensions of classes)
- Remove now unneeded diagnostics related to finding 'static' in previously banned places.
- Update relevant diagnostics to make the new rules clear.
Swift SVN r24260
Dictionary could be double freed after bridging to ObjC due to a call to
takeRetainedValue(), causing a segfault. This was fixed by removing the
free call, as it was unnecessary.
Fixes rdar://problem/18544533
Swift SVN r24208
variable
We were avoiding recomputing it because it used to be a slow operation.
Performance improvements, as reported by the perf testing buildbot:
Histogram -14.07%
StringUtilsUnderscoreCase -10.22%
Dictionary -10.75%
LevenshteinDistance -18.08%
Regressions:
* ArraySubscript 8.56%
This is just bogus. That test does not do any hashing.
* NSDictionaryCastToSwift 6.86%
This test does not do any hashing. It operates only on empty
dictionaries. I believe this is noise.
Swift SVN r23991
Sticking with the original design.
Also added a trap test for removeFirst() since its precondition
is that the set be non-empty, similar to Array.
Swift SVN r23712
rdar://problem/19132138
Make Set<T> visible by removing the underscore. Also, remove the pesky
${_Self} gyb variable that was for a temporary convenience in hiding Set.
Swift SVN r23699
Although Set.any will always return the same element when not modifying
the set, that is an implementation detail. It should be a method.
Swift SVN r23697
Rename in Set<T>:
func removeFirst() -> T
to
func removeAny() -> T?
var first: T?
to
var any: T?
- FWIW, `any` more closesly matches NSSet's `anyObject()` and constructs
in other languages, so `first` seems to be a bit of a surprise.
- `first` implies an ordering of some kind, iterating over `Set` as a
`SequenceType` does have a somewhat reliably "first" element, but it
also has a linguistic tension with the fact that Set<T> is
semantically unordered.
- `first` may be further confused if there ever is an OrderedSet<T>,
which ought to be the first element in its semantic ordering.
Swift SVN r23696
Intersect needs an intermediate set because we need to both traverse
and modify the left-hand side for the in-place operation, which can
invalidate the index.
Swift SVN r23666
The public API is mostly solid at this point, with only a few minor
changes to naming and a couple of extra methods to bring it to parity
with Array.
Also removed the quick-and-dirty operators <, >, <=, and >= which were
used as a convenient shorthand for strict subset, strict superset,
subset, and superset respectively (< is retained for Comparable
conformance).
Swift SVN r23657