Chris Lattner
a30ae2bf55
Merge pull request #836 from zachpanz88/new-year
...
Update copyright date
2015-12-31 19:36:14 -08:00
Dave Abrahams
e210532690
Merge pull request #825 from kballard/collectiontype-lazy-first
...
[Stdlib] Optimize CollectionType.first
2015-12-31 16:41:05 -08:00
Zach Panzarino
e3a4147ac9
Update copyright date
2015-12-31 23:28:40 +00:00
Kevin Ballard
dee1c7a05c
[Stdlib] Add notes to lazy collection doc comments about complexity
...
Many lazy collections don't offer O(1) performance for `startIndex`,
`first`, or any method that depends on `startIndex`.
`LazyFilterCollection` already had a note to this effect (which I
tweaked a bit), but `FlattenCollection` didn't.
Related to SR-425.
2015-12-31 13:35:52 -08:00
Kevin Ballard
6ae85cea26
[Stdlib] Optimize CollectionType.first
...
For lazy collections, `isEmpty` and `startIndex` may be O(N) operations.
The old implementation ended up being potentially O(2N) instead of O(1).
In particular, accessing `col.lazy.filter(pred).first` would evaluate
the predicate on elements twice, once to determine the result of
`isEmpty` and once to determine `startIndex`.
2015-12-31 13:30:11 -08:00
Joe Groff
8f55d99173
stdlib: Reduce code size of tuple comparators.
...
We can define the operations for N+1-tuples in terms of the ones for N-tuples, which reduces an x86-64 stdlib by about 4KB:
-rwxr-xr-x 1 jgroff staff 5172856 Dec 30 10:54 lib/swift/macosx/libswiftCore.before.dylib
-rwxr-xr-x 1 jgroff staff 5168752 Dec 30 11:59 lib/swift/macosx/libswiftCore.after.dylib
The optimizer should still be able to inline all the calls together in release builds.
2015-12-30 13:42:33 -08:00
Ray Lillywhite
4f90ba129e
[stdlib] Add documentation for ===
2015-12-29 10:45:46 -08:00
practicalswift
d89b4d45e1
Fix typos in code (non-comment typos).
2015-12-27 13:05:01 +01:00
practicalswift
ce760cff66
Fix typos.
2015-12-26 12:43:52 +01:00
Patrick Pijnappel
f181a6eca3
[stdlib] Remove return comments
2015-12-26 11:18:22 +11:00
Patrick Pijnappel
4c894b97a0
[stdlib] Fix comment
...
Amendment to my own commit.
2015-12-26 11:13:54 +11:00
Chris Lattner
12e670a5b7
Merge pull request #464 from nielsandriesse/patch-6
...
Make local variable name more expressive
2015-12-25 16:07:10 -08:00
Dmitri Gribenko
480c5c307d
Merge pull request #769 from PatrickPijnappel/patch-4
...
[stdlib] Fix punctuation in doc comment
2015-12-24 15:30:12 -08:00
Dmitri Gribenko
7fa7d186a9
Merge pull request #767 from frootloops/rename-params
...
Availability: refactoring and tests
2015-12-24 14:47:56 -08:00
Patrick Pijnappel
1a88207fe4
[stdlib] Fix punctuation in doc comment
2015-12-25 09:36:09 +11:00
Dmitri Gribenko
0b0043ddea
Merge pull request #765 from SemperIdem/master
...
[stdlib]Remove the get keyword of read-only computed property
2015-12-24 13:42:55 -08:00
Arsen Gasparyan
d202c2c92b
Availability: refactoring and tests
2015-12-25 00:22:18 +03:00
semper_idem
c5c63519e5
[stdlib]Remove the get keyword of read-only computed property
...
Simplify the read-only computed property by removing the
non-@_transparent “get” keyword
2015-12-24 20:59:34 +08:00
Arsen Gasparyan
862a117864
Rename params
2015-12-24 12:58:45 +03:00
Slava Pestov
27e38fa4ee
stdlib: Remove non-ASCII characters from Tuple.swift.gyb
...
SourceKit tests were checking that the generated interface
only contains ASCII characters.
2015-12-23 20:17:04 -08:00
Kevin Ballard
b61c7a5004
[Stdlib] Implement comparison operators for tuples
...
Implement == and != for tuples up to arity 6 where each component type
is Equatable.
Implement <, <=, >, and >= for tuples up to arity 6 where each component
type is Comparable.
2015-12-23 18:25:31 -08:00
Joe Groff
d366089df7
Runtime: Change getInstancePositiveExtents methods to return both extents.
...
A bit of future-proofing, since we plan to be able to grow class instances in both directions relative to their object header.
2015-12-23 15:39:53 -08:00
Joe Groff
583f5bdb6f
Runtime: Rename class property lookup functions with consistent naming scheme.
...
Getting a superclass, instance extents, and whether a class is native-refcounted are all useful type API. De-underscore these functions and give them a consistent `swift[_objc]_class*` naming scheme.
2015-12-23 15:04:27 -08:00
Dmitri Gribenko
b1fdf56f5c
stdlib: mark _preprocessingPass with @noescape
2015-12-23 14:56:15 -08:00
Joe Groff
fe4782ef05
Runtime: Rename swift_isClassOrObjCExistential to -Type.
...
To conform with the other 'is*Type' queries.
2015-12-23 13:34:47 -08:00
Dmitri Gribenko
3877d04a73
Merge pull request #731 from ken0nek/add-spaces-before-and-after-arrow
...
Add spaces before and after closure arrow
2015-12-23 10:53:22 -08:00
Max Moiseev
200be71583
Merge remote-tracking branch 'origin' into swift-3-api-guidelines
2015-12-23 10:28:04 -08:00
Joe Groff
4b461684e3
Remove unused _swift_isClass function.
2015-12-23 09:17:08 -08:00
practicalswift
81e7439a9a
Fix typos.
2015-12-23 11:16:34 +01:00
Dmitri Gribenko
b703259ca6
Merge pull request #736 from nielsandriesse/patch-1
...
[stdlib] Fix reserveCapacity() call in RangeReplaceableCollectionType +(_:_:)
2015-12-22 16:22:17 -08:00
Slava Pestov
36ddea64ae
Merge pull request #729 from ken0nek/fix-can-not
...
Convert [Cc]an not -> [Cc]annot
2015-12-22 16:06:20 -08:00
Joe Groff
d3cba67344
Runtime: Move assert implementation details to stdlib.
...
Many of the report* entry points are specific to the stdlib assert implementation, so belong in the stdlib. Keep a single `reportError` entry point in the runtime to handle the CrashReporter/ASL interface, and call down to it from the assert implementation functions.
2015-12-22 15:54:42 -08:00
Niels Andriesse
6381ec6114
[stdlib] Remove redundant +(_:_:) overload in RangeReplaceableCollectionType
2015-12-23 10:53:01 +11:00
Niels Andriesse
56a995f0df
[stdlib] Add performance optimization in RangeReplaceableCollectionType +(_:_:)
2015-12-23 10:51:37 +11:00
practicalswift
6e3b700b44
Fix typos.
2015-12-23 00:31:13 +01:00
Niels Andriesse
c333aed696
[stdlib] Fix reserveCapacity() call in RangeReplaceableCollectionType +(_:_:)
2015-12-23 10:01:36 +11:00
ken0nek
e7e70cea92
Add spaces before and after closure arrow in stdlib
2015-12-23 04:52:15 +09:00
Max Moiseev
a7339e67ac
Merge remote-tracking branch 'origin' into swift-3-api-guidelines
2015-12-22 11:36:07 -08:00
Max Moiseev
51865a17b2
_debugRequire => _stdlibAssert etc.
2015-12-22 10:18:36 -08:00
ken0nek
fcd8fcee91
Convert [Cc]an not -> [Cc]annot
2015-12-23 00:55:48 +09:00
Dmitri Gribenko
7be67b5476
Merge pull request #721 from jasonnoahchoi/prespecialized
...
Change c-style for loop to for-in loop based on proposal SE-0007
2015-12-22 03:17:39 -08:00
Suguru Kishimoto
b87782d95e
[Fix] Use count += 1 instead of count++ .
2015-12-22 18:14:20 +09:00
Jason Choi
ad1a15d0b0
Change c-style for loop to for-in loop based on proposal SE-0007
2015-12-22 01:01:11 -08:00
Chris Lattner
be53728691
Mark the ++ and -- operators in the standard library as deprecated for Swift 2.2,
...
to be removed in Swift 3.0. I plan to improve the QoI of this deprecation in a
subsequent commit.
2015-12-21 22:10:25 -08:00
Chris Lattner
66f7ef1295
Move stdlib off ++ and --
2015-12-21 18:07:36 -08:00
practicalswift
36d7072013
Remove immediately adjacent repeated words ("the the", "for for", "an an", etc.).
2015-12-21 22:16:04 +01:00
Max Moiseev
2f7b64e475
Merge remote-tracking branch 'origin' into swift-3-api-guidelines
2015-12-21 12:02:13 -08:00
Dmitri Gribenko
69b4a81896
stdlib: re-add 'anyGenerator()' as a deprecated function
...
This is done to restore source compatibility with Swift 2.0.
2015-12-21 11:43:21 -08:00
Dmitri Gribenko
2ed81bd19a
Revert "[stdlib][performance] skip copying old values during removeAll(keepCapacity: true)"
2015-12-20 22:46:56 -08:00
Dmitri Gribenko
2e0efaee69
Revert "[Performance] iterate the smaller set during Set.intersect()"
2015-12-20 22:45:30 -08:00