Fixes <rdar://problem/17028678> comments for sort() don't make sense in
the synthesized header. Putting the right comments in there is
<rdar://problem/17511801> Algorithm.swift needs doc comments
Swift SVN r19370
This API exposes unmediated access to memory, and most users will never
see the UnsafeArray argument that's passed to the closure, so best to be
explicit.
Swift SVN r19243
Keep calm: remember that the standard library has many more public exports
than the average target, and that this contains ALL of them at once.
I also deliberately tried to tag nearly every top-level decl, even if that
was just to explicitly mark things @internal, to make sure I didn't miss
something.
This does export more than we might want to, mostly for protocol conformance
reasons, along with our simple-but-limiting typealias rule. I tried to also
mark things private where possible, but it's really going to be up to the
standard library owners to get this right. This is also only validated
against top-level access control; I haven't fully tested against member-level
access control yet, and none of our semantic restrictions are in place.
Along the way I also noticed bits of stdlib cruft; to keep this patch
understandable, I didn't change any of them.
Swift SVN r19145
This is motivated by <rdar://problem/17051606>.
This ends up renaming variables as well, which seems right for
consistency since we use "predicate" as variable name.
Swift SVN r19135
Sorting was a bit of a mess; we had sort functions doing in-place
mutation /and/ returing the value, and people were confused by the
asymmetry of Array's sort() method with other higher-level methods.
Fixes <rdar://problem/17185815> sort([]T, f) mutates the original array
<rdar://problem/17225190> The Array.sort() method should return a sorted array
Swift SVN r18922
This helps array append's performance by ~ 2x. The generic max with a variadic
argument takes at least 3 arguments, it creates a temporary array then iterates
over the array.
This is an updated version of r18764.
rdar://17140639 rdar://17073827
Swift SVN r18767
This helps array append's performance by ~ 2x. The generic max with a variadic
argument creates a temporary array then iterates over the array.
rdar://17140639 rdar://17073827
Swift SVN r18764