Commit Graph

9 Commits

Author SHA1 Message Date
Dmitri Hrybenko
2fc5297171 stdlib/Slice: relax assertion to allow Slice<T> to be constructed from a native
empty buffer without storage

rdar://16971593 rdar://16388632


Swift SVN r18489
2014-05-21 11:01:55 +00:00
Ted Kremenek
16dea15a24 Hide CocoaArray ('_' to mark as private API).
Swift SVN r18302
2014-05-18 04:03:32 +00:00
Doug Gregor
bed81488c1 Revert r18232, r18220: we're not doing T* now.
Swift SVN r18250
2014-05-17 16:36:02 +00:00
Dave Abrahams
46388dd5e2 [stdlib] Unwrap some lines shrunken by T*
Concision FTW!

Swift SVN r18232
2014-05-17 00:27:43 +00:00
Doug Gregor
73f02d1a69 Switch a bunch of UnsafePointer<T>'s over to T*
Swift SVN r18220
2014-05-16 22:32:01 +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
b666651e3f [stdlib] Rename NativeArray => ContiguousArray
Per API review feedback.

Swift SVN r18140
2014-05-15 23:24:09 +00:00
Ted Kremenek
fad874708e Adjust test cases.
Swift SVN r17964
2014-05-12 22:01:52 +00:00
Dave Abrahams
004998e63e [stdlib] Move SliceBuffer into its own file
Swift SVN r15766
2014-04-02 02:47:34 +00:00