Commit Graph

6981 Commits

Author SHA1 Message Date
swift-ci
4213f96247 Merge remote-tracking branch 'origin/master' into master-next 2018-04-15 18:29:35 -07:00
Saleem Abdulrasool
d3ab36fd46 Merge pull request #15745 from compnerd/dota
runtime: avoid UB on Windows x86_64 builds
2018-04-15 18:18:47 -07:00
Saleem Abdulrasool
302ce638eb stubs: silence unused function warning
When building on Linux, the definition of `swift_snprintf_l` would cause
an unused function warning.  Expand the scope of the preprocessor guard
to encompass the function for the single use.  This avoids the unused
function warning.
2018-04-13 18:07:07 -07:00
Saleem Abdulrasool
a34ac086d4 stubs: clean up android support routines
Some of the previously used stubs are no longer needed in newer releases
of the Android API.  Android L and Android O provide the functions in
their associated versions of bionic.  This is needed to build against a
newer version of the SDK.
2018-04-13 18:06:50 -07:00
swift-ci
fc92d9c7d0 Merge remote-tracking branch 'origin/master' into master-next 2018-04-13 15:36:54 -07:00
Saleem Abdulrasool
dfa8a3113f Merge pull request #15912 from compnerd/compiler-rt
stubs: split up compiler-rt routines
2018-04-13 15:15:39 -07:00
swift-ci
31bf6c80ea Merge remote-tracking branch 'origin/master' into master-next 2018-04-13 12:58:26 -07:00
swift-ci
92310038d9 Merge pull request #15919 from compnerd/truncation 2018-04-13 12:56:15 -07:00
Saleem Abdulrasool
9f045add2c stdlib: silence truncation warning on Windows
The returned type `std::streamoff` on Windows x64 is a `long long`
rather than `int`.  This results in a 64-to-32 bit shortening of the
value.  Use the appropriate type to avoid the truncation.

`strlen` returns a unsigned value, but `std::streamoff` is an signed
value.  Explicitly cast the value to avoid the warning about the
implicit signed conversion.
2018-04-13 10:28:17 -07:00
Saleem Abdulrasool
0a1352efff stubs: split up compiler-rt routines
Move the duplicated compiler-rt support routines into its own source
file.  This will need to be expanded for Windows.  As on Linux, there
are certain builtin routines which are not available from the standard
runtime and need to be augmented for now.
2018-04-13 09:44:42 -07:00
swift-ci
8a073592fd Merge remote-tracking branch 'origin/master' into master-next 2018-04-12 18:11:07 -07:00
Jordan Rose
03a30782e0 Foundation overlay: include <pthread.h> (#15911)
Found by -Wsystem-headers. Apparently nothing that was already included
was actually defining 'pthread_main_np'.
2018-04-12 18:09:26 -07:00
swift-ci
1261e6b6dd Merge remote-tracking branch 'origin/master' into master-next 2018-04-12 15:20:06 -07:00
Max Moiseev
02aef12281 Merge pull request #15815 from Moximillian/SR-7266-avoid-nesting-reversed
SR-7266: Avoid nesting of ReversedCollection
2018-04-12 15:05:54 -07:00
swift-ci
08a91a27dd Merge remote-tracking branch 'origin/master' into master-next 2018-04-12 14:37:29 -07:00
Saleem Abdulrasool
3b45ce660c Merge pull request #15905 from compnerd/protocol
stdlib: correct protocol registration on ELF
2018-04-12 14:29:11 -07:00
swift-ci
13bda5edbf Merge remote-tracking branch 'origin/master' into master-next 2018-04-12 14:17:49 -07:00
Tony Parker
daef47ce25 Merge pull request #15901 from parkera/pr/39340548_master
[Foundation] Guard Data access to NSData._isCompact under availabilit…
2018-04-12 14:12:14 -07:00
Saleem Abdulrasool
9969679515 stdlib: correct protocol registration on ELF
We were misinterpreting the protocol conformances as the protocol sections.  It
is interesting that this never was caught in any of the runs on the build bots
nor was it caught during the normal execution of code.
2018-04-12 10:07:41 -07:00
Philippe Hausler
57d0ea8013 [Foundation] Guard Data access to NSData._isCompact under availability guards 2018-04-12 09:53:34 -07:00
swift-ci
9494376793 Merge remote-tracking branch 'origin/master' into master-next 2018-04-12 09:53:01 -07:00
tbkka
1cc1832b96 SR-3131: Adjust choice of decimal vs. exponential format (#15805)
Merge SR-3131 fix:

For each floating-point type, there is a range of integers which
can be exactly represented in that type.  Adjust the formatting
logic so that we use decimal format for integers within this
range, exponential format for numbers outside of this range.

For example, Double has a 53-bit significand so can exactly
represent every integer from `-(2^53)...(2^53)`.  With this
change, we now use decimal format for these integers and
exponential format for values outside of this range.  This is
a relatively small change from the previous logic -- we've
basically just moved the cutoff from 10^15 to 2^53 (about 10^17).

The decision for using exponential format for small numbers is
not changed.
2018-04-12 09:35:49 -07:00
swift-ci
ba62fe78a1 Merge remote-tracking branch 'origin/master' into master-next 2018-04-11 13:32:51 -07:00
Michael Gottesman
f5ed323b7d Merge pull request #15865 from gottesmm/pr-64a51a9306ab1faab72f4e6bb58d6d062f984dcf
Add build-script flag --enable-exclusivity-checking to enable exclusi…
2018-04-11 13:15:09 -07:00
Nate Cook
69ce965881 Merge pull request #15794 from natecook1000/nc-fixes-83-1
[stdlib] Documentation revisions
2018-04-11 15:07:04 -05:00
swift-ci
09541e4da8 Merge remote-tracking branch 'origin/master' into master-next 2018-04-11 13:06:58 -07:00
Nate Cook
61c79f33c0 [stdlib] Address feedback from @airspeedswift and @CodaFi 2018-04-11 13:03:36 -05:00
swift-ci
4b5a4a963d Merge remote-tracking branch 'origin/master' into master-next 2018-04-11 10:08:16 -07:00
swift-ci
537a8461ff Merge pull request #15867 from DougGregor/cleanup-autolink-hack 2018-04-11 09:59:31 -07:00
Nate Cook
a63f5bf788 [stdlib] Revise masking shift and unsafe operation docs 2018-04-11 11:34:59 -05:00
Nate Cook
b6a0d9ed26 [stdlib] Documentation revisions
- Make RawRepresentable Codable abstracts distinguishable
- Make the UnboundedRange example a little more user friendly
- Correct the RangeReplaceableCollection example description
- Revise CaseIterable discussion
2018-04-11 11:34:51 -05:00
Michael Gottesman
e071e46068 Add build-script flag --enable-exclusivity-checking to enable exclusivity checking always when we compile stdlibCore.
It is off by default.

rdar://39335800
2018-04-11 09:23:06 -07:00
swift-ci
533c77156e Merge remote-tracking branch 'origin/master' into master-next 2018-04-11 08:07:02 -07:00
Karoy Lorentey
cff4eb77ef [stdlib] {Set,Dictionary}.init(minimumCapacity:) Update docs
Avoid describing the exact algorithm that these collections use to allocate storage. (It is a private implementation detail that we want to be able to change.)

rdar://problem/36619317
2018-04-11 12:25:51 +01:00
Doug Gregor
5832a6fe12 [CMake] Link demangle tree dumper in +Asserts builds.
When building with assertions enabled, link the demangle tree dumper into
the runtime and remote mirrors libraries. This makes debugging demangling-related issues a whole lot easier.
2018-04-10 21:17:09 -07:00
swift-ci
f10f7caca7 Merge remote-tracking branch 'origin/master' into master-next 2018-04-10 18:29:44 -07:00
Joe Groff
4f26ef749c Merge pull request #15841 from jckarter/box-error-as-nserror
Runtime: Bridge Error-conforming types to id as NSError instances.
2018-04-10 18:19:50 -07:00
swift-ci
e0ef0a8300 Merge remote-tracking branch 'origin/master' into master-next 2018-04-10 13:12:33 -07:00
Joe Groff
78b5ff8b6b Runtime: Bridge Error-conforming types to id as NSError instances.
NSError is a more useful box for a swift Error than the generic box. Fixes rdar://problem/38631791 | SR-7232.
2018-04-10 12:23:49 -07:00
Mox
b859cdc173 SR-7266: Avoid nesting of ReversedCollection
Applying reversed() two times should return identity.
2018-04-10 17:06:14 +03:00
crea
247ee7a82f fix documentation comment of flatMap<SegmentOfResult : Sequence> 2018-04-10 01:20:15 -07:00
swift-ci
6eb8aa31e2 Merge remote-tracking branch 'origin/master' into master-next 2018-04-09 19:25:09 -07:00
Slava Pestov
14654590dc stdlib: remove some @_inlineable that snuck in recently 2018-04-09 18:00:58 -07:00
swift-ci
3c5c31497f Merge remote-tracking branch 'origin/master' into master-next 2018-04-09 17:43:29 -07:00
swift-ci
a38fe375d8 Merge pull request #15823 from devincoughlin/data-exclusivity-warning 2018-04-09 17:30:04 -07:00
Devin Coughlin
302d82731a [Foundation] Address exclusivity violation in Data
Address an exclusivity violation in Data's Iterator.next() by changing two private
'let' stored properties to be 'var'.

Making the properties 'var' changes code generation of next() so that the stored
properties are read independently of the other contents of the struct. This
prevents an exclusivity violation when reading '_endIdx' and '_data' while
simultaneously mutating '_buffer' with the call to withUnsafeMutablePointer().

The 'let' pattern is an idiom we would eventually like to support (see SR-7396),
but for now we need to remove the exclusivity violation.
2018-04-09 16:18:17 -07:00
swift-ci
906bf7c41a Merge remote-tracking branch 'origin/master' into master-next 2018-04-09 12:29:46 -07:00
swift-ci
65b22697ae Merge pull request #15770 from dcci/refcount-obj 2018-04-09 12:12:32 -07:00
swift-ci
d6e4412890 Merge remote-tracking branch 'origin/master' into master-next 2018-04-09 12:09:20 -07:00
Joe Groff
0bfe25072b Merge pull request #15798 from jckarter/objc-value-metatype
IRGen: Make type(of:) behavior consistent in ObjC bridged contexts.
2018-04-09 11:13:27 -07:00