Ted Kremenek
0cdcd18d20
Merge pull request #4086 from apple/deprecate-contiguousarray
...
[stdlib] Deprecate ContiguousArray (do not merge yet)
2016-08-08 17:48:12 -07:00
Dave Abrahams
54cae5d453
[stdlib] Streamable => TextOutputStreamable
...
This is logically part of
[SE-0086](https://github.com/apple/swift-evolution/blob/master/proposals/0086-drop-foundation-ns.md )
since it goes with 2a4e916 (Rename OutputStream to TextOutputStream [SE-0086])
2016-08-08 17:03:42 -07:00
Dave Abrahams
98ae7dc012
[stdlib] staging for s/Streamable/TextOutputStreamable/
...
swiftpm uses it, so we need to do this in steps.
2016-08-08 16:44:29 -07:00
Ted Kremenek
92f0d9ea30
Merge pull request #4114 from atrick/rawptr-diag
...
Improve diagnostics on invalid UnsafePointer conversion.
2016-08-08 14:23:49 -07:00
Dave Abrahams
8a73f0b98e
[stdlib] Change Indexable deprecation messages
...
It's important to let people know that, in contrast with existing
practice in other frameworks, we really are going to remove the
deprecated API, and soon.
2016-08-08 13:44:41 -07:00
Andrew Trick
56f68c4cce
Improve diagnostics on invalid UnsafePointer conversion.
...
The only remaning issue is that we should have a warning to rename
Unsafe[Mutable]Pointer<Void> to Unsafe[Mutable]RawPointer.
2016-08-08 12:54:21 -07:00
Xiaodi Wu
f9435b9ce8
[stdlib] Restore MemoryLayout.*(ofValue:)
2016-08-08 10:46:37 -05:00
Dave Abrahams
168047d0f0
Deprecate the Indexable protocols
...
Using them is always a mistake; the user should choose the corresponding
Collection protocol instead.
2016-08-07 22:20:27 -07:00
Dave Abrahams
29c93d3ce3
Merge pull request #4089 from apple/underscore-playgroundquicklook
...
Begin moving PlaygroundQuickLook support to PlaygroundSupport module
2016-08-07 21:32:38 -07:00
Dave Abrahams
43ebd517d3
[stdlib] staging for imminent move to PlaygroundSupport
...
All the quicklook stuff belongs there.
2016-08-07 20:44:02 -07:00
Dave Abrahams
595aad3574
[stdlib] Deprecate ContiguousArray
...
The performance team reports that it's 2x slower than Array, and even if
it weren't, it would be obsoleted by the introduction of eager bridging.
2016-08-07 17:20:35 -07:00
Dmitri Gribenko
19c29f6197
stdlib: mark _ArrayBuffer APIs as internal
2016-08-07 16:02:13 -07:00
Dmitri Gribenko
5178c8ea8a
stdlib: fix the build with resilience enabled
2016-08-07 15:37:39 -07:00
Dmitri Gribenko
11b7e9a742
stdlib: mark APIs on internal types as internal
2016-08-07 15:37:16 -07:00
Dmitri Gribenko
3c741bab7c
stdlib: mark _ArrayBuffer, _ContiguousArrayBuffer, and _SliceBuffer internal
2016-08-07 15:13:59 -07:00
Dmitri Gribenko
2708afecc7
stdlib: internalize the _uninitializedCount initializer of array buffer
2016-08-07 15:11:54 -07:00
Dmitri Gribenko
901a0fb663
stdlib: mark some Array buffers implementation details as internal
2016-08-07 15:11:54 -07:00
Dmitri Gribenko
3bb5c86e03
stdlib: make _ArrayProtocol and _ArrayBufferProtocol internal
2016-08-07 15:11:54 -07:00
Dmitri Gribenko
c3fb541b83
Merge pull request #4083 from apple/stdlib-make-array-implementation-internal-2
...
stdlib: make Array implementation internal
2016-08-07 15:11:35 -07:00
Dmitri Gribenko
9705ccb9f2
stdlib: add underscores to an initializer on ArrayBufferProtocol
2016-08-07 14:20:37 -07:00
Dmitri Gribenko
609ba7321e
stdlib: add SPI for bridging for Foundation
2016-08-07 14:20:36 -07:00
Dmitri Gribenko
d3451e3ae2
stdlib: remove AnyHashable APIs on Dictionary and Set that were made unnecessary by the implicit conversion to AnyHashable
2016-08-07 13:34:07 -07:00
Dave Abrahams
011c280383
Merge pull request #4065 from apple/withVaList
...
Prefer withVaList over getVaList
2016-08-07 11:06:03 -07:00
Andrew Trick
3bdf6c43a6
Fix unnecessary mutability of buffer elements.
2016-08-06 21:16:49 -07:00
swift-ci
e40dcfd5e6
Merge pull request #4067 from practicalswift/gardening-20160806
2016-08-06 14:56:26 -07:00
practicalswift
3ebfbe4ef0
Remove unused imports.
2016-08-06 20:26:47 +02:00
Dave Abrahams
8d3ac46448
Prefer withVaList over getVaList
2016-08-06 06:48:13 -07:00
practicalswift
0661f61578
Use a-vs-an consistently.
2016-08-06 12:41:55 +02:00
practicalswift
59b35841ae
Normalize character usage.
2016-08-06 12:37:40 +02:00
Ted Kremenek
067bd6e3dc
Merge pull request #4055 from natecook1000/nc-fixes-03
...
[stdlib] Revise stdlib documentation comments
2016-08-05 23:24:58 -07:00
swift-ci
b02102cf6e
Merge pull request #4062 from atrick/rawptr-fixit
2016-08-05 20:16:46 -07:00
Andrew Trick
d1807f7951
Add some availability attributes for UnsafePointer conversion.
...
This introduces some important diagnostics to help migration.
Some of the diagnostics that we would like to provide are impossible
on a generic class because they introduce ambiguity.
Renaming UnsafePointer<Void> to UnsafeRawPointer makes extensions and
global operators ambiguous.
We would also like to provide this fix-it on conversion from
UnsafePointer<Void> or UnsafeRawPointer to UnsafePointer<T>
with this message:
Conversion restricted. Use 'assumingMemoryBound(to:)' or 'bindMemory(to:capacity:)'}}
However, that introduces ambiguous overloads that defeat other hueristics.
2016-08-05 18:30:06 -07:00
Nate Cook
559092bbf2
[stdlib] Revise stdlib documentation comments
...
- Expand pre-example explanations
- Update documentation for SE-0118
- Removing remaining 'iff' usage
- Revise Array discussion
- Fix formIndex(_:offsetBy) parameter formatting
- Improve index/formIndex(_:offsetBy:(limitedBy:)?) discussion
- Update Quick Look discussions
- Fixes grammar inconsistencies
- Adds parameter / return documentation
- Adds and expands on examples
- Revises AnyObject discussion for new `id` bridging rules
- Revise readLine, print, and assertion functions
- Add missing docs to String index-moving methods
2016-08-05 16:07:46 -05:00
Michael Ilseman
045bc16b6d
Merge pull request #4031 from milseman/noescape_by_default
...
noescape by default: deprecate @noescape and @autoclosure(escaping)
2016-08-05 13:25:00 -07:00
Joe Groff
8ef5f40eae
Merge pull request #3974 from jckarter/cvararg-post-0072
...
Make bridged String and collection types conform to CVarArg.
2016-08-05 09:44:25 -07:00
John McCall
a6e1e87585
Add implicit conversions and casts from T:Hashable <-> AnyHashable.
...
rdar://27615802
2016-08-04 23:13:27 -07:00
Michael Ilseman
b7c9eddd11
[noescape by default] drop @noescape from stdlib
2016-08-04 16:09:01 -07:00
Dave Abrahams
b841f1eaa5
Revert "[stdlib] Speculative workaround for ASAN failure"
...
This reverts commit dc86186de7 .
It didn't change anything.
2016-08-04 13:59:15 -07:00
Dave Abrahams
dc86186de7
[stdlib] Speculative workaround for ASAN failure
...
I suspect the fancy _unsafeUpcast implementation, that was supposed to
be more optimizable, was confusing the optimizer, and that is the cause
of ASAN failures we're seeing. Let's see if this makes ASAN happy
again.
2016-08-04 11:55:03 -07:00
Dave Abrahams
219daedca4
[stdlib] Add a couple of FIXME(ABI) notes
2016-08-04 11:51:01 -07:00
Joe Groff
7535acc86b
Make bridged String and collection types conform to CVarArg.
...
This allows String, Array, Dictionary, and Set to be passed as variadic arguments to Cocoa APIs like NSLog, NSPredicate, stringWithFormat:, etc. rdar://problem/27651717
2016-08-04 07:14:55 -07:00
Michael Gottesman
a0fca3a8f0
Merge pull request #3965 from gottesmm/support_per_host_cmake_and_tsan_of_runtime_via_buildscript
...
Support per host cmake and tsan of runtime via buildscript
2016-08-03 21:48:24 -07:00
Michael Gottesman
06a70d3942
[cmake] Add cmake support for only applying tsan to the swift stdlib/runtime.
2016-08-03 17:53:57 -07:00
Doug Gregor
4b8b7bb878
[NSError bridging] Rename runtime entry points for _getErrorEmbeddedNSError.
...
This clarifies the 'Indirect' case. Thanks, Dmitri!
2016-08-03 15:59:01 -07:00
Doug Gregor
75e85dc5bd
[NSError bridging] Extract embedded NSError from an Error consistently.
...
When emitting an existential erasure to Error from an archetype, use
the _getEmbeddedNSError() witness. If it produces an NSError, erase
that; otherwise, go through the normal erasure path.
Of course, make NSError and CFError implement _getEmbeddedNSError() so
this kicks in for the obvious cases as well as the more obscure ones.
Fixes the rest of SR-1562 / rdar://problem/26370984.
2016-08-03 14:01:02 -07:00
Dmitri Gribenko
3dd4f58d83
Merge pull request #3938 from harlanhaskins/aristotelianism
...
Added String.init<T>(_: T) and marked it unavailable
2016-08-03 11:42:39 -07:00
Harlan Haskins
01e4b1ef71
Added String.init<T>(_: T) and marked it unavailable
2016-08-03 10:18:38 -07:00
Doug Gregor
d2195318d2
[NSError bridging] Use embedded NSError when erasing types to Error existentials.
...
Imported Cocoa error types are represented by structs wrapping an
NSError. The conversion from these structs to Error would end up
boxing the structs in _SwiftNativeNSError, losing identity and leading
to a wrapping loop.
Instead, extract the embedded NSError if there is one. In the Swift
runtime, do this as part of the dynamic cast to NSError, using a (new,
defaulted) requirement in the Error type so we can avoid an extra
runtime lookup of the protocol. In SILGEn, do this by looking for the
_BridgedStoredNSError protocol conformance when erasing to an Error
type. Fixes SR-1562 / rdar://problem/26370984.
2016-08-03 09:20:04 -07:00
Jordan Rose
f42158b12e
Revert "[Sema] ban multi-arguments to tuple coercion" ( #3922 )
...
It breaks cases where there really is a single unlabeled argument of tuple type, like this:
let pairs = [(1, "A"), (2, "B")]
print(pairs.map { $0.0 })
2016-08-01 19:22:19 -07:00
swift-ci
d709ebeab9
Merge pull request #3924 from swiftix/master
2016-08-01 19:15:54 -07:00