Commit Graph

10155 Commits

Author SHA1 Message Date
Steven Brunwasser
4d481a3dc2 Describe the behavior of value without mentioning its default value 2019-06-21 19:45:08 -07:00
Steven Brunwasser
3d9e292d31 Add reason why key can't be empty 2019-06-21 19:37:15 -07:00
Steven Brunwasser
b2737af5df key must not be the empty string 2019-06-21 19:29:57 -07:00
Steven Brunwasser
abc89e1cb1 Remove the default value from the parameter description
Default values are now automatically included documentation.
2019-06-21 19:18:31 -07:00
Steven Brunwasser
9552b3f64d Remove extra information from parameter description
This information belongs in the description. Having it both here and there is redundant.
2019-06-21 19:15:08 -07:00
Steven Brunwasser
da580345f2 Use more formal wording 2019-06-21 19:13:33 -07:00
Steven Brunwasser
2d9b52eec4 Use - note: syntax 2019-06-21 19:12:07 -07:00
Steven Brunwasser
7135b8969e Use headers that describe the section's purpose 2019-06-21 19:10:11 -07:00
Saleem Abdulrasool
38995f5d80 Merge pull request #25070 from moatom/fix-include-guard
Fix include guards
2019-06-20 17:26:08 -07:00
Brent Royal-Gordon
4149c8f97d [Runtime] Fix private generic type witness demangling failure (#25611)
This one’s screwily specific--if you have:

* a private generic type,
* with a nested generic type in it,
* and the nested type conforms to a protocol with an associated type,
* and that associated type’s witness is a generic type,
* and some of the witness type’s generic parameters are generic parameters of the nested type,

demangling would fail. The problem is that the substitution machinery in the runtime would consider there to be three, not two, generic context depths involved. Depth 1, which should correspond to the nested type, would instead have no generic parameters. The fix is to skip over depths with zero generic parameters.

Fixes <rdar://problem/47773183>.
2019-06-20 12:02:01 -07:00
Arnold Schwaighofer
dcd1732761 Merge pull request #25616 from aschwaighofer/fix_multi_object_file_replacements_runtime
Fix dynamic replacement runtime when generating replacements from multiple object files
2019-06-20 10:44:09 -07:00
Xi Ge
5295ef7bde Revert "[reflection-dump] Teach reflection dump how to dump protocols from the __swift5_protos section of a .o" 2019-06-20 08:29:49 -07:00
Michael Gottesman
db3997d05e Merge pull request #25617 from gottesmm/pr-0749a889482066e40ee2f5681a4bb0020007fa7f
[reflection-dump] Teach reflection dump how to dump protocols from the __swift5_protos section of a .o
2019-06-19 21:40:31 -07:00
Ed Greenaway
a92357ab05 Update documentation for CommandLine.arguments (#25304)
Addresses SR-6776 Documentation comment for CommandLine.arguments contains implementation remarks
2019-06-19 15:47:17 -07:00
Michael Gottesman
fce7454ada [reflection] Extract out ReflectionInfo from TypeRefBuilder -> ReflectionInfo.
The reason why I am doing this is so that I can create an adaptor class
(templated on Runtime) for reading protocol info from ReflectionInfo without
having to make ReflectionInfo itself generic. If ReflectionInfo becomes generic
on Runtime, it will cause a cascading need to mark classes in Reflection as
generic as well.
2019-06-19 15:16:17 -07:00
Arnold Schwaighofer
fb08153de0 Fix dynamic replacement runtime when generating replacements from multiple object files
The sections with the replacements get merged and we need to consider all replacements.

SR-10947
rdar://51913012
2019-06-19 15:11:33 -07:00
David Smith
28dcc915e3 Merge pull request #25418 from Catfish-Man/no-objc-complications-4
Use the remaining half bit in the refcount to bypass ObjC deallocation overhead
2019-06-19 11:08:29 -07:00
David Smith
c51294671b Revert "Revert "Use the remaining half bit in the refcount to bypass ObjC deallocation overhead""
And add availability checking for back deployment

This reverts commit 817ea129f2.
2019-06-18 16:16:38 -07:00
Mike Ash
b70cd7031f Merge pull request #25150 from mikeash/dlopen-race
[Runtime] Fix a race with dlopen and libobjc.
2019-06-18 11:48:49 -07:00
Arnold Schwaighofer
85bfbe2dd3 Merge pull request #25473 from aschwaighofer/back_deploy_dynamic_replacement
stdlib: Add backward deployment versions for the dynamic-replacement runtime functions
2019-06-18 09:02:22 -07:00
Steven Brunwasser
e595b44a10 Fixed some grammar and changed some wording 2019-06-18 01:32:12 -07:00
Arnold Schwaighofer
906f0b4e9e Address review comments 2019-06-17 19:47:52 -07:00
Arnold Schwaighofer
5d329464d6 Use thread private key to avoid weak linkage
We use one bit of the third reserved swift private tls key.

Also move the functionality into a separate static archive that is
always linked dependent on deployment target.
2019-06-17 15:03:45 -07:00
swift-ci
2330d81ad1 Merge pull request #25519 from compnerd/windows-resource-dir 2019-06-17 14:14:28 -07:00
Saleem Abdulrasool
ad9346344c Shims: support clang-cl for building the runtime for Windows
`-print-resource-dir` is not available with `clang-cl` which is required
for building the standard library for Windows on Windows.  Use the
`/clang:-print-resource-dir` spelling instead.  This allows us to build
the standalone runtime for Windows on Windows.
2019-06-17 13:03:07 -07:00
Karoy Lorentey
194dba6c69 Merge pull request #25454 from lorentey/nsvalue-availability
[Foundation] Set correct availability on NSValue.value(of:)
2019-06-17 12:25:17 -07:00
Karoy Lorentey
308d584d4c Merge pull request #25444 from lorentey/ClockKit-overlay
[SDK] Add overlay shims for ClockKit framework
2019-06-17 12:24:26 -07:00
Vlad Gorlov
6370681656 Android cross-compile on macOS: Fix for compile error addressed Float80 data type. (#25502)
* Fixes issue addressed Float80 data type. Float80 is disabled for Intel architectures (i.e. Android Simulator).

* More precise condition check.
2019-06-17 13:40:44 -04:00
Saleem Abdulrasool
1db3865d90 build: dereference the SDK name variable
This is needed to ensure that we get the correct modulemap file for
Android on certain versions of CMake.
2019-06-16 16:49:06 -07:00
Steven Brunwasser
8bb63c0c15 [Foundation]: Adding detailed documentation for NSLocalizedString 2019-06-15 14:50:03 -07:00
swift-ci
48e34070e6 Merge pull request #24904 from GeorgeLyon/master 2019-06-14 14:28:35 -07:00
Harlan Haskins
047749a745 Merge pull request #25419 from harlanhaskins/property-reprs
[ModuleInterface] Qualify all types in module interfaces
2019-06-14 14:23:08 -07:00
Mike Ash
2ac0ab069a [Runtime] Use objc_addLoadImageFunc when available to find out about newly loaded images.
rdar://problem/49742015
2019-06-14 17:09:28 -04:00
Arnold Schwaighofer
5003c15079 stdlib: Add backward deployment versions for the
dynamic-replacement runtime functions.

The recent change of how we do dynamic replacements added 2 new runtime
functions. This patch adds those functions to the Compatibility50 static
archive.

This will allow backward deployment to a swift 5.0 runtime.

Patch by Erik Eckstein with a modification to call the standard
libraries implementation (marked as weak) when it is available.

This ensures we can change the implementation in the future and are not
ABI locked.

rdar://problem/51601233
2019-06-14 10:53:26 -07:00
Saleem Abdulrasool
5befea4d8d build: query the resource dir when needed
When building the standard library standalone with the host compiler, we
do not have the location of the resource dir available to us nor can it
be computed.  Use `-print-resource-dir` to query the value from the
compiler and use that.  This is needed to cross-compile the standard
library to android from Windows.
2019-06-13 22:55:03 -07:00
Karoy Lorentey
8ae76342f8 [Foundation] Set correct availability on NSValue.value(of:)
(cherry picked from commit 35a47b3a55e113fd1212485b85d808427ccf5dea)
2019-06-13 20:10:06 -07:00
Karoy Lorentey
dcda278cb3 [SDK] Add overlay shims for ClockKit framework 2019-06-13 17:05:40 -07:00
Vlad Gorloff
28d1fb65b7 Android Mac Cross-compile: Fixes issue "ld.gold: error: cannot find -lutil". 2019-06-13 23:57:18 +02:00
Harlan Haskins
f02bac341f Add new flag to XCTest overlay 2019-06-13 11:26:54 -07:00
Nate Cook
e730bd1256 Remove residual gyb bits from LazyPrefixWhileCollection. 2019-06-13 11:39:15 -05:00
Karoy Lorentey
6a2123fbb7 Merge pull request #25364 from lorentey/ModelIO-arrays
[SDK] Modernize array initialization pattern in ModelIO overlay
2019-06-12 11:28:15 -07:00
Stephen Canon
2df36527d3 Provide a default implementation of multipliedFullWidth (#25346)
* Provide a default implementation of multipliedFullWidth

Previously, [U]Int64 fatalErrored on 32b platforms, which is obviously undesirable. This PR provides a default implementation on FixedWidthInteger, which is not ideally efficient for all types, but is correct, and gives the optimizer all the information that it needs to generate good code in the important case of Int64 arithmetic on 32b platforms. There's still some minor room for improvement, but we'll call that an optimizer bug now.

* Clarify comments somewhat, remove `merge` nested function

I was only using `merge` in one place, so making it a function seems unnecessary. Also got rid of some trucatingIfNeeded inits where the compiler is able to reason that no checks are needed anyway.

* Add some basic test coverage specifically for multipliedFullWidth

* Fix typo, further clarify bounds comments.

* Make new defaulted implementation @_aEIC so we don't need availability.
2019-06-11 22:02:48 -07:00
Saleem Abdulrasool
9f070edc17 Merge pull request #25308 from Azoy/demangle-bug-thing
[Runtime] swift_demangle: Update buffer size after copying
2019-06-11 16:56:57 -07:00
Karoy Lorentey
b4998fb9ff [SDK] Modernize array initialization pattern in ModelIO overlay
We have nondeterministic test failures indicating a memory safety issue in ModelIO’s overlay. This switches the overlay’s property implementations to use the new `Array(unsafeUninitializedCount:,initializedWith:)` initializer rather than the potentially unreliable `&values[0]` pattern.

rdar://problem/50449570
2019-06-11 15:18:44 -07:00
Slava Pestov
67fd1f2372 Foundation: Manually define hashValue witnesses for CocoaError, URLError, POSIXError and MachError 2019-06-11 14:26:21 -07:00
Slava Pestov
3491fecc04 Revert "Sema: Go back to synthesizing hashValue on _StoredBridgedNSError conformers"
This reverts commit 712927c494.
2019-06-11 14:22:48 -07:00
Karoy Lorentey
fd39f2f9d2 Merge pull request #25301 from fassko/SR_10094_withContiguousStorageIfAvailable_docs
[Doc] [SR-10094]  Add missing documentation for SE-0237
2019-06-11 11:52:50 -07:00
Karoy Lorentey
b48175525e Merge pull request #25345 from lorentey/foundation-diff-apis
[Foundation] Bridge difference APIs between Foundation and swift stdlib
2019-06-11 11:43:10 -07:00
Stephen Canon
bbd44a186f Replace two #ifs with #if/#else in new integer random algorithm (#25352)
Swift gets used on archs other than 32 and 64b Intel and ARM (e.g. IBM's systems); as written this would fail to compile there.
2019-06-11 14:36:43 -04:00
Slava Pestov
6ee5774371 Merge pull request #25349 from slavapestov/synthesized-hashValue-abi-break
Sema: Go back to synthesizing hashValue on _StoredBridgedNSError conformers
2019-06-11 11:32:21 -07:00