Commit Graph

7802 Commits

Author SHA1 Message Date
Roman Levenstein
4d4c2cdba9 Move pre-specializations of popular types away from the standard library.
Pre-specializations were only used by Onone builds, but were kept inside the standard library dylyb anyways. This commit moves all the pre-specializations into a dedicated Swift module and a dynamic library, which are only used by Onone builds.

This reduces the code size of libswiftCore.dylib by 5%.
2016-02-22 07:54:44 -08:00
Han Sangjin
e06c7136cb Porting to Cygwin. rebased and squashed 2016-02-22 13:20:21 +09:00
Dmitri Gribenko
f27315b6f8 Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-02-20 15:36:04 -08:00
Dmitri Gribenko
3d3d4540e1 Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-02-20 14:37:49 -08:00
Dmitri Gribenko
835ef4186c Merge pull request #1381 from Nirma/constant_transform_closure
Change _transform from variable to constant
2016-02-20 14:25:28 -08:00
Xi Ge
0fc0f6dd23 Module groups: partially address @gribozavr and @natecook1000's comments. 2016-02-20 13:10:06 -08:00
Nicholas Maccharoli
7be032b146 Unify usage of shorthand
Use plus-equals shorthand instead of longhand throughout index.swift
2016-02-21 02:46:11 +09:00
Nicholas Maccharoli
09e884bac9 Change _transform from variable to constant
Since `_transform` never changes after being given an initial value in `init` it might be best  to make it a constant.
2016-02-21 02:20:27 +09:00
Chris Lattner
76b2577236 Merge pull request #1377 from WorldDownTown/refactor_zero_count_separator
Rewrite _copyToNativeArrayBuffer to use early return if separator count is zero
2016-02-20 09:03:20 -08:00
WorldDownTown
bb762496bb Rewrite _copyToNativeArrayBuffer to use early return if separator count is zero 2016-02-20 21:09:55 +09:00
Dmitri Gribenko
7e88bd7b2f stdlib: remove dead code 2016-02-20 02:30:46 -08:00
Dmitri Gribenko
a5bdf9bc32 stdlib: Optional._unsafelyUnwrapped => ._unsafelyUnwrappedUnchecked 2016-02-20 00:55:36 -08:00
Dmitri Gribenko
a6696ef996 stdlib: lowercase option set names in a comment 2016-02-20 00:55:36 -08:00
Dmitri Gribenko
9968dee759 stdlib: remove dead code 2016-02-20 00:55:36 -08:00
Dmitri Gribenko
2c14a00de2 stdlib: add labels to DictionaryLiteral.Element tuple 2016-02-20 00:55:35 -08:00
Dmitri Gribenko
63481be8bd stdlib: lowercase cases of the PlaygroundQuickLook enum 2016-02-20 00:55:35 -08:00
Dmitri Gribenko
ad604ed7c4 Merge pull request #1367 from practicalswift/remove-redundant-nil-initialization
[gardening] Remove redundant assignments: "var foo: Foo? = nil" → "var foo: Foo?"
2016-02-19 20:45:46 -08:00
Max Moiseev
78ba5d5f3f [stdlib] Requires in comments changed to Precondition 2016-02-19 18:57:26 -08:00
Max Moiseev
40b1a0b7e0 [stdlib] all sorts of require renamed back to precondition 2016-02-19 18:21:29 -08:00
Xi Ge
239c803dbb Module group: Add a Json file to primitively group stdlib source files. 2016-02-19 17:21:28 -08:00
Dmitri Gribenko
b1ef18fb75 stdlib: lowercase cases of AncestorRepresentation and DisplayStyle enums 2016-02-19 16:06:26 -08:00
Dmitri Gribenko
380a13e98f stdlib: lowercase cases of the _DefaultDescendantRepresentation enum 2016-02-19 15:18:55 -08:00
Dmitri Gribenko
f64f0be93a stdlib: ManagedBuffer.create(_:) => .create(minimumCapacity:) 2016-02-19 15:04:54 -08:00
Dmitri Gribenko
08229b21f7 stdlib: fix coding style 2016-02-19 15:04:54 -08:00
practicalswift
401fe4e577 [gardening] Remove redundant assignment: "var foo: Foo? = nil" → "var foo: Foo?" 2016-02-19 19:09:08 +01:00
Dmitri Gribenko
b90470e2fe Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-02-19 09:51:53 -08:00
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
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
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
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
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