Commit Graph

16 Commits

Author SHA1 Message Date
Dave Abrahams
05abe4d996 [stdlib] public init for EmptyGenerator
Fixes <rdar://problem/17758868>

Swift SVN r23005
2014-10-29 17:43:49 +00:00
Dave Abrahams
156020de19 [stdlib] Rename 'countElements' => 'count'
The name was not only long and unwieldy, but inconsistent with our
conscious decision to avoid the use of "elements" in APIs as mostly
redundant.

Swift SVN r22408
2014-09-30 22:00:26 +00:00
Dave Abrahams
42cef97f6b [stdlib] Misc protocol comment propagation
171 undocumented non-operator public APIs remain in core

Swift SVN r22246
2014-09-24 00:27:58 +00:00
Dave Abrahams
f4a7812065 [stdlib] Propagate SequenceType docs to models
235 undocumented public APIs remain in core

Swift SVN r22210
2014-09-23 10:40:37 +00:00
Dave Abrahams
76f9313088 [stdlib] Propagate GeneratorType docs to models
Swift SVN r22208
2014-09-23 09:47:26 +00:00
Dave Abrahams
1dd7272fe9 [stdlib] Propagate CollectionType docs to models
266 undocumented public APIs remain in core

Swift SVN r22206
2014-09-23 08:19:23 +00:00
Dave Abrahams
6d1095f44e Protocol names end in "Type," "ible," or "able"
Mechanically add "Type" to the end of any protocol names that don't end
in "Type," "ible," or "able."  Also, drop "Type" from the end of any
associated type names, except for those of the *LiteralConvertible
protocols.

There are obvious improvements to make in some of these names, which can
be handled with separate commits.

Fixes <rdar://problem/17165920> Protocols `Integer` etc should get
uglier names.

Swift SVN r19883
2014-07-12 17:29:57 +00:00
Jordan Rose
da29f099f0 Update stdlib for accessibility modifiers becoming context-sensitive keywords.
Swift SVN r19672
2014-07-08 02:17:46 +00:00
Enrico Granata
e73b3120c0 EmptyCollection and CollectionOfOne are similar enough that they can be reflected together. I am a little unhappy with having the summary be a string argument instead of inlined, but I couldn't come up with a quick solution to do otherwise, and it didn't seem worth spending a lot of time dwelling upon that
Swift SVN r19668
2014-07-08 01:30:31 +00:00
Enrico Granata
342202d2d5 Generators don't need Mirrors
Swift SVN r19665
2014-07-08 01:01:27 +00:00
Jordan Rose
bdd1ec3116 Update stdlib and tests for accessibility, again.
I'll be turning on access control early next week.

Swift SVN r19551
2014-07-04 01:53:53 +00:00
Enrico Granata
cfe3087278 Per DaveA's script, Remove spurious TABs I introduced
Swift SVN r19473
2014-07-02 18:36:01 +00:00
Enrico Granata
0f706ba86c Add a Mirror for EmptyCollection. Oh, and test cases too.
Swift SVN r19380
2014-06-30 23:21:08 +00:00
Jordan Rose
cca27d02a0 Tag everything in the standard library with accessibility attributes.
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
2014-06-24 21:32:18 +00:00
Arnold Schwaighofer
da6d9152b6 Differentiate between user assertion and preconditions and the like
assert() and fatalError()
These functions are meant to be used in user code. They are enabled in debug
mode and disabled in release or fast mode.

_precondition() and _preconditionFailure()
These functions are meant to be used in library code to check preconditions at
the api boundry. They are enabled in debug mode (with a verbose message) and
release mode (trap). In fast mode they are disabled.

_debugPrecondition() and _debugPreconditionFailure()
These functions are meant to be used in library code to check preconditions that
are not neccesarily comprehensive for safety (UnsafePointer can be null or an
invalid pointer but we can't check both). They are enabled only in debug mode.

_sanityCheck() and _fatalError()
These are meant to be used for internal consistency checks. They are only
enabled when the library is build with -DSWIFT_STDLIB_INTERNAL_CHECKS=ON.

I modified the code in the standard library to the best of my judgement.

rdar://16477198

Swift SVN r18212
2014-05-16 20:49:54 +00:00
Dave Abrahams
548f3c0e81 [stdlib] Add and test single-element modifiers
Swift SVN r15978
2014-04-05 05:39:17 +00:00