Commit Graph

7767 Commits

Author SHA1 Message Date
Max Moiseev
2c9be47551 Merge branch 'master' into new-integer-protocols 2017-03-23 16:46:01 -07:00
Doug Gregor
2e283118e6 [Stdlib] Eliminate a warning about a redundant conformance 2017-03-22 17:35:15 -07:00
Doug Gregor
27be8c7531 [Foundation] Eliminate redundant explicit requirements. 2017-03-22 17:35:15 -07:00
Doug Gregor
cedb22a10b [CoreData] Eliminate redundant explicit requirements 2017-03-22 17:35:14 -07:00
Doug Gregor
ab5d88ec29 [Stdlib unit test] Eliminate redundant explicit constraints. 2017-03-22 17:35:14 -07:00
Doug Gregor
c4cf38f2e7 [Stdlib unit test] Fix random access overload of makeBufferAccessLoggingMutableCollection(wrapping:) 2017-03-22 17:35:12 -07:00
Doug Gregor
388f0c505e [Stdlib] Eliminate explicit constraints made redundant by inferred ones. 2017-03-22 17:35:12 -07:00
Max Moiseev
b9fb3badc8 Merge remote-tracking branch 'origin/master' into new-integer-protocols 2017-03-22 12:30:24 -07:00
Arnold Schwaighofer
709226258c Runtime: Allow taking out of inline opaque existentials
Only values stored in the outline boxed existential representation can be
shared.
2017-03-21 11:37:23 -07:00
ktopley-apple
2e5e1d8ee5 Makes the DispatchIO initializer that accepts a path failable, reflecting the fact that a relative or non-existent path is invalid. (#8173)
(Radar 28564226)
2017-03-20 15:32:22 -07:00
eeckstein
996b618875 Merge pull request #8204 from eeckstein/rename-namespace
rename namespace NewMangling -> Mangle
2017-03-20 11:51:56 -07:00
Doug Coleman
3379be73da cmake: Run ./utils/find-overlay-dependencies-loop.sh on the overlays.
This should be automated, but be careful that platforms that go from
supported -> unsupported throw an error and do not autoupdate.
2017-03-20 10:32:24 -07:00
Erik Eckstein
d70bfc5de2 rename namespace NewMangling -> Mangle 2017-03-20 10:09:30 -07:00
Hugh Bellamy
bcc3f82cb5 Use correct __builtin_sqrtf instead of __builtin_sqrt for float type (#7978) 2017-03-19 10:17:43 -04:00
Dave Abrahams
1e8d069f75 [stdlib] SequenceWrapper: forward all requirements
One wants to take advantage of any optimization the Base Sequence may implement, especially because it will often be a Collection!
2017-03-18 13:20:03 -07:00
Dave Abrahams
365ef19cd4 [stdlib] SequenceWrapper: make it compile
Not sure why my local tests were compiling without this change, but clearly it is needed.
2017-03-18 12:28:55 -07:00
Dave Abrahams
7cfddace23 [stdlib] SequenceWrapper: ++principled simplicity
Not sure why the earlier version even compiled; the `Iterator.Element` types need to match up for most of these operations, and the `Iterator` types themselves need to match for some.
2017-03-18 12:05:54 -07:00
Dave Abrahams
639b04f7db [stdlib] _SequenceWrapper proposed simplification
I think the complexity of these condition extensions is unneeded, and may be vestigial from a time when the compiler was less cooperative.   Test this theory using CI
2017-03-18 11:47:32 -07:00
Hugh Bellamy
1e919d2f4e Fix attribute fallout from new refcount representation 2017-03-18 17:56:34 +07:00
swift-ci
3e085fca4b Merge pull request #7946 from DougGregor/all-conformance-constraint-sources 2017-03-18 01:30:27 -07:00
Doug Gregor
cad49e66c4 [Unit test library] Eliminate redundant conformance requirements. 2017-03-17 21:53:17 -10:00
Doug Gregor
45d6d7cab7 [Foundation] Eliminate redundant conformance requirement. 2017-03-17 21:52:47 -10:00
Doug Gregor
13c4ae0168 [Standard library] Eliminate redundant conformance constraints.
Eliminate all of the redundant conformance constraints in the standard
library that were identified by the newly-introduced warning for
redundant, explicitly-specified conformances.
2017-03-17 20:15:09 -10:00
Erik Eckstein
1625345b90 Remove the old mangler.
NFC
2017-03-17 16:10:36 -07:00
Roman Levenstein
397d801e19 Merge pull request #7350 from swiftix/resilience-benchmarks
Add a lot of resilience-related annotations to stdlib to improve the performance of the resilient stdlib
2017-03-16 21:22:13 -07:00
Roman Levenstein
2c811b82a1 Adjust some tests to pass in non-resilient and resilient modes. 2017-03-16 19:46:11 -07:00
Roman Levenstein
29ad714bb7 Annotate stdlib functions to get a good performance even in resilient mode, when -sil-serialize-all is disabled
This commit mostly improves the performance of arrays and ranges.
It does not cover Strings, Dictionaries and Sets yet.
2017-03-16 19:46:11 -07:00
Hugh Bellamy
1ff5530d33 Merge pull request #8048 from hughbe/shims-fixes
Copy entire swiftShims directory to avoid very long command line paths that break the Windows build
2017-03-17 08:06:14 +07:00
Arnold Schwaighofer
a4c6af1968 Merge pull request #8122 from aschwaighofer/cow_existential_runtime
Runtime changes for the copy-on-write existential implementation
2017-03-16 12:48:35 -07:00
Hugh Bellamy
bd8d214383 Copy entire swiftShims directory to avoid very long command line paths that break the Windows build 2017-03-16 22:09:35 +07:00
Robert Widmann
703f129bdc Merge pull request #8087 from CodaFi/electoral-college
[SR-4240] Remove erroneous drop(while:) optimization
2017-03-15 22:18:58 -04:00
Arnold Schwaighofer
586527759d Change assert(false) to swift::fatalError 2017-03-15 16:01:02 -07:00
Arnold Schwaighofer
d5cbb0bd62 Runtime changes for the copy-on-write existential implementation
Adds the runtime implementation for copy-on-write existentials. This support is
enabled if SWIFT_RUNTIME_ENABLE_COW_EXISTENTIALS is defined. Focus is on
correctness -- not performance yet.

Don't use allocate/deallocate/projectBuffer witnesses for globals in cow
existential mode.

Use SWIFT_RUNTIME_ENABLE_COW_EXISTENTIALS configuration to set the default for
SILOptions.

This includes an IRGen fix to use the right projection in
emitMetatypeOfOpaqueExistential if SWIFT_RUNTIME_ENABLE_COW_EXISTENTIALS is set.

Use unknownRetain instead of native retain in dynamicCastToExistential.
2017-03-15 14:54:55 -07:00
Robert Widmann
81968e21ff Remove erroneous drop(while:) optimization
Calling drop(while: ) after prefix() on a pure Sequence loses the
prefix, because in the internal drop(while: ) override grabs the
underlying base iterator from _PrefixSequence and wraps it in a
_DropWhileSequence.
2017-03-15 17:01:13 -04:00
Doug Coleman
2121daaf50 Merge pull request #8077 from erg/cmake-overlays-standalone
WIP: cmake: Initial standalone overlays builds. This is just the cmake
2017-03-14 15:31:01 -07:00
Doug Coleman
8c2bd5ae23 cmake: Initial standalone overlays builds.
./utils/build-overlay AVFoundation OSX macosx
rdar://problem/28707246
2017-03-14 12:51:42 -07:00
Greg Parker
7e38792bdd [stdlib] Thou shalt not call objc_msgSend() without a function pointer cast.
Fixes test stdlib/ErrorBridged.swift on arm64.

rdar://30900987
2017-03-14 12:33:10 -07:00
swift-ci
f89e3869f5 Merge pull request #8079 from samirGuerdah/fixTypo 2017-03-14 08:52:30 -07:00
samirMSTF
9d9cd82c59 Fix typo 2017-03-14 14:16:59 +01:00
Michael Gottesman
6d7b11c8eb [stdlib] Cleanup usage of Builtin.castToNativeObject(...).
Previously often times when casting a value, we would just pass along the
cleanup of the uncasted value. With semantic SIL this is no longer correct since
the cleanup now needs to be on the cast result.

This caused problems for certain usages of Builtin.castToNativeObject(...) by
the stdlib. Specifically, the stdlib was using this on AnyObject values that
were not necessarily native. Since we were recreating the cleanup on the native
value, a swift native release was being used =><=.

In this commit I solve this problem by:

1. Adding an assert in Builtin.castToNativeObject(...) that ensures that any value
passed to Builtin.castToNativeObject() is known conservatively to use swift
native reference counting.

2. I changed all uses where we do not have a precondition of a native ref
counting type to use Builtin.castToUnknownObject(...).

3. I added a new Builtin called Builtin.unsafeCastToNativeObject(...) that does
not have the compile time check. I used this to rewrite callsites in the stdlib
where we know via preconditions that an AnyObject will dynamically always be
native.

rdar://29791263
2017-03-14 00:10:16 -07:00
David Hart
66131c01d3 [SR-2626] Fix String to Float/Double “snan” conversion (#8036)
Adds an explicit check for `[+-]snan` to create an sNaN from a string.
2017-03-13 21:07:31 -04:00
Max Moiseev
4f0c7a582c Fixing some more validation tests 2017-03-13 16:37:30 -07:00
Jordan Rose
f12afd2ffa Merge pull request #8010 from KingOfBrian/bugfix/SR-1762-Remove-Final-In-Protocol-Extensions
Remove final in protocol extensions
2017-03-13 16:23:24 -07:00
Max Moiseev
daf088ddea Default implementation of instance bitWidth for FixedWidthInteger
Conforming types already provide the static bitWidth property. Instance
one can be implemented in a protocol extension.

Resolves: <rdar://problem/30186638>
2017-03-13 15:24:02 -07:00
Max Moiseev
233fb21dd6 multipliedFullWidth(by:) and dividingFullWidth(_:) 2017-03-13 15:16:58 -07:00
Max Moiseev
48b5899c0d WithOverflow => ReportingOverflow 2017-03-13 12:22:36 -07:00
Max Moiseev
ff81681f4f Properly naming bit count properties 2017-03-13 11:50:02 -07:00
Max Moiseev
7d73b2e1ca Arithmetic => Numeric 2017-03-13 11:50:02 -07:00
Hugh Bellamy
fe48ea7cbc Fix MSVC/GCC compilation failures resulting from new refcount representation 2017-03-14 00:18:17 +07:00
Hugh Bellamy
b3020d89d2 Merge pull request #7868 from hughbe/asm-uneeded
Remove unecessary empty asm statement
2017-03-14 00:13:03 +07:00