Commit Graph

4650 Commits

Author SHA1 Message Date
Dmitri Gribenko
d18308d82b Merge pull request #1365 from Nirma/join_logic_simplification
Logic simplification of next() function in JoinGenerator Struct.
2016-02-19 08:54:12 -08:00
Dmitri Gribenko
f39b443e24 Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-02-19 01:16:19 -08:00
Nicholas Maccharoli
0541028b62 Remove unnecessary nil initialization of optional 2016-02-19 18:03:40 +09:00
Nicholas Maccharoli
dd0c9719ee Logic simplification of next() function in JoinGenerator Struct. 2016-02-19 18:00:04 +09:00
Dmitri Gribenko
9293c1f5cc stdlib: fix coding style 2016-02-18 22:30:58 -08:00
Dmitri Gribenko
98561f6137 stdlib: joinWithSeparator(_:) => join(separator:) 2016-02-18 22:30:57 -08:00
Dmitri Gribenko
6c64dcf499 stdlib: lowercase enum cases in _JoinIteratorState 2016-02-18 22:30:57 -08:00
Dmitri Gribenko
5625117942 Merge pull request #1346 from Nirma/joinWithSeparator_guard
Rewrite joinWithSeparator's zero count separator if/else statement with an early-return if check
2016-02-18 20:40:20 -08:00
Dmitri Gribenko
52981e87e1 stdlib: remove redundant initializers for HalfOpenInterval and ClosedInterval 2016-02-18 18:03:51 -08:00
Dmitri Gribenko
f912c8faf0 stdlib: readLine(stripNewline:) => readLine(strippingNewline:) 2016-02-18 17:16:49 -08:00
Dmitri Gribenko
593b4cc3d6 stdlib: add first argument label to _failEarlyRangeCheck2() 2016-02-18 17:11:35 -08:00
Dmitri Gribenko
0f36bec31f Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-02-18 16:41:35 -08:00
Nicholas Maccharoli
cc2251c635 Rewrite joinWithSeparator to use early return if separator count is zero 2016-02-19 02:48:52 +09:00
Dmitri Gribenko
a609277f55 IOKit depends on Dispatch 2016-02-18 09:43:30 -08:00
Joe Groff
ae0e855aaf Revert "Runtime: Remove retainCount entry points."
This reverts commit 51e0594e1c. The retainCount
entry points are used by Instruments.
2016-02-18 09:38:23 -08:00
Chris Lattner
d73141479e Merge pull request #1348 from Nirma/constant_predicate
Change _predicate from variable to constant.
2016-02-18 09:00:13 -08:00
practicalswift
bb3f6ac508 [gardening] Fix header consistency for recently introduced .S file 2016-02-18 15:36:05 +01:00
Janosch Hildebrand
916841d9db [stdlib] Fix precondition messages for MutableCollectionType slice replacing
The precondition messages in `_writeBackMutableSlice` were inverted in their respective meaning.
2016-02-18 15:02:28 +01:00
Nicholas Maccharoli
4d1efe984b Change _predicate from variable to constant. 2016-02-18 20:57:57 +09:00
Dmitri Gribenko
708d90aa80 Adjust IOKit dependencies to be only in effect on OS X 2016-02-18 02:38:16 -08:00
Dmitri Gribenko
f775457699 Add missing dependencies for the IOKit overlay 2016-02-18 02:22:22 -08:00
John McCall
e249fd680e Destructure result types in SIL function types.
Similarly to how we've always handled parameter types, we
now recursively expand tuples in result types and separately
determine a result convention for each result.

The most important code-generation change here is that
indirect results are now returned separately from each
other and from any direct results.  It is generally far
better, when receiving an indirect result, to receive it
as an independent result; the caller is much more likely
to be able to directly receive the result in the address
they want to initialize, rather than having to receive it
in temporary memory and then copy parts of it into the
target.

The most important conceptual change here that clients and
producers of SIL must be aware of is the new distinction
between a SILFunctionType's *parameters* and its *argument
list*.  The former is just the formal parameters, derived
purely from the parameter types of the original function;
indirect results are no longer in this list.  The latter
includes the indirect result arguments; as always, all
the indirect results strictly precede the parameters.
Apply instructions and entry block arguments follow the
argument list, not the parameter list.

A relatively minor change is that there can now be multiple
direct results, each with its own result convention.
This is a minor change because I've chosen to leave
return instructions as taking a single operand and
apply instructions as producing a single result; when
the type describes multiple results, they are implicitly
bound up in a tuple.  It might make sense to split these
up and allow e.g. return instructions to take a list
of operands; however, it's not clear what to do on the
caller side, and this would be a major change that can
be separated out from this already over-large patch.

Unsurprisingly, the most invasive changes here are in
SILGen; this requires substantial reworking of both call
emission and reabstraction.  It also proved important
to switch several SILGen operations over to work with
RValue instead of ManagedValue, since otherwise they
would be forced to spuriously "implode" buffers.
2016-02-18 01:26:28 -08:00
Dmitri Gribenko
65d840c0ae stdlib: lowercase cases in Optional and ImplicitlyUnwrappedOptional 2016-02-18 00:40:33 -08:00
William Dillon
d0d9b1de5a Discard swift.ld and support gold linker 2016-02-17 17:47:35 -08:00
Dmitri Gribenko
80fa72ad59 stdlib: fix coding style 2016-02-17 14:50:16 -08:00
Dmitri Gribenko
dd75aed67a Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-02-17 14:40:05 -08:00
Dmitri Gribenko
473ffe55f4 IOKit overlay: fix coding style 2016-02-17 09:13:11 -08:00
Dmitri Gribenko
0795970fa7 Merge pull request #1096 from mattrajca/master
Added an an overlay for IOKit that adds the kIOReturnError* constants
2016-02-17 09:11:25 -08:00
Maksim Odnoletkov
9fffeda0ae Re-format to fit 80 columns 2016-02-17 00:43:52 +03:00
Maksim Odnoletkov
7bfabd535c [stdlib] Fixed IntervalType.overlaps for empty interval case 2016-02-16 22:19:02 +03:00
Dmitri Gribenko
0e1c488f9a stdlib: print, debugPrint: 'toStream:' => 'to:' 2016-02-15 23:48:02 -08:00
Dmitri Gribenko
25cc2d5695 stdlib: add first argument labels to Set and Dictionary 2016-02-15 23:48:02 -08:00
Dmitri Gribenko
bf34b047d8 stdlib: lowercase cases of FloatingPointClassification enum 2016-02-15 23:48:02 -08:00
Dmitri Gribenko
40a31f2da0 stdlib: fix coding style 2016-02-15 23:48:01 -08:00
Dmitri Gribenko
efaa39ea79 stdlib: add first argument labels and some other changes to conform to API guidelines 2016-02-15 23:47:54 -08:00
Max Moiseev
a558d13a3b Revert "Replace Unmanaged with UnsafeReference"
This reverts commit d72932e931.
2016-02-15 17:13:40 -08:00
Max Moiseev
3a3984877a Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-02-15 15:43:34 -08:00
Slava Pestov
e5dac9c793 Runtime: Fix crash with non-pointer isa in swift_deallocPartialClassInstance()
Deallocation of partially-initialized instances of @objc classes
isn't supported yet, but let's avoid a regression compared to
Swift 2.1 behavior by fixing the one case that used to work,
where the early return occurs after all stored properties have
been initialized.

Fixes SR-704.
2016-02-15 14:36:48 -08:00
Dmitri Gribenko
8b86dac8c1 Revert "[gardening] Fix typo: "nul-terminated" → "null-terminated"" 2016-02-13 15:27:53 -08:00
Chris Lattner
2ba93a2ba9 Merge pull request #1300 from peterfriese/gardening-typo-nul-terminated
[gardening] Fix typo: "nul-terminated" → "null-terminated"
2016-02-13 09:08:51 -08:00
David Farler
46b7d549e5 [Reflection] Update Linux linker script for .swift3_fieldmd, .swift3_assocty 2016-02-12 16:34:28 -08:00
Dmitri Gribenko
2d27beccfc Merge pull request #1286 from natecook1000/natecook-doc-consistency
[stdlib] Documentation consistency fixes
2016-02-12 08:59:21 -08:00
Nate Cook
355fa4d064 Mark true as code in documentation comments. 2016-02-12 04:21:57 -06:00
Nate Cook
51251dc133 Convert imperative function summaries to present.
i.e., "Return ..." -> "Returns ..."
2016-02-12 04:20:39 -06:00
Nate Cook
f3c4e0ac74 Remove style on *generator* and friends. 2016-02-12 04:20:01 -06:00
Nate Cook
d9575c2d7f Make doc consistency fix for String.UnicodeScalarView´ 2016-02-12 01:56:37 -06:00
Jordan Rose
7f221323ca Merge pull request #1271 from hpux735/VarArgs
Add support for __gnuc_va_list to ClangImporter.
2016-02-11 20:22:33 -08:00
William Dillon
582c268ae9 Add support for __gnuc_va_list to ClangImporter
The implementation of va_list is pretty inconsistent across platforms.
On linux-arm __gnuc_va_list is the type used. This change adds that to ClangImporter.
The change to the test is optional, but it dramatically improves the error message printed to the console when the test fails.
Finally, the change to the application of alignment padding is due to the fact that all ARM platforms other than iOS need AAPCS-complient alignemnt.
2016-02-12 03:16:44 +00:00
Nate Cook
44e866ce21 Fix Optional errors. 2016-02-11 13:40:36 -06:00
Nate Cook
32f81e8238 Add missing abstracts for types and protocols. 2016-02-11 11:47:27 -06:00