Roman Levenstein
e155caedd3
Boolean || and && operators should be declared as @_transparent.
...
This recovers the performance reported in [SR-2247](https://bugs.swift.org/browse/SR-2247 ) and rdar://27645751
2016-08-01 18:10:34 -07:00
Dmitri Gribenko
4e7cc0d938
SwiftShims: remove C++ code and unprefixed names from RuntimeShims.h
2016-08-01 16:53:11 -07:00
Chris Williams
71f6b8aabc
Add cFuncSuffix to SwiftFloatingPointTypes
2016-08-01 14:27:51 -07:00
Chris Williams
c8458cebc4
Create SwiftFloatingPointTypes for float-related helpers
2016-08-01 14:27:51 -07:00
Chris Williams
c3ac97db67
SE-0080 - Failable Float->Int initializers
2016-08-01 14:27:51 -07:00
Chris Williams
1d6c3b84be
Move Float->Int initializer to FixedPoint
2016-08-01 14:27:51 -07:00
Jordan Rose
802a0b9074
[stdlib] Mark public classes as 'open'. ( #3876 )
...
Part of SE-0117.
2016-08-01 11:01:51 -07:00
Michael Gottesman
acc5fd5443
Merge pull request #3898 from natecook1000/nc-revise-fp
...
[stdlib] Revise and expand floating-point documentation
2016-08-01 09:15:27 -07:00
Daniel Duan
c9b73dacc2
[Sema] ban multi-arguments to tuple coercion
...
Implements part of SE-0110. Single argument in closures will not be accepted if
there exists explicit type with a number of arguments that's not 1.
```swift
let f: (Int, Int) -> Void = { x in } // this is now an error
```
Note there's a second part of SE-0110 which could be considered additive,
which says one must add an extra pair of parens to specify a single arugment
type that is a tuple:
```swift
let g ((Int, Int)) -> Void = { y in } // y should have type (Int, Int)
```
This patch does not implement that part.
2016-07-31 16:22:57 -07:00
Nate Cook
29c9c61f03
[stdlib] Revise and expand floating-point documentation
2016-07-31 10:14:06 -05:00
Dmitri Gribenko
a61d618c9e
stdlib: fix indentation style
2016-07-31 02:04:28 -07:00
Dmitri Gribenko
bb6c6740ca
stdlib: fix a bug in ArraySlice.removeLast() when startIndex != 0
...
ArraySlice.removeLast() only worked when startIndex was equal to zero.
This change fixes the bug, and uses the proper customization point for
the algorithm.
Fixes SR-1791, rdar://problem/26897658.
2016-07-31 02:04:23 -07:00
Dmitri Gribenko
eae0f52a36
stdlib: annotate RangeReplaceableCollection.removeLast() as having a discardable result
2016-07-31 02:04:05 -07:00
Dmitri Gribenko
833854f187
stdlib: SE-0101: make old APIs unavailable (sizeof, alignof, strideof)
2016-07-30 00:38:18 -07:00
Dave Abrahams
ccf555c4d0
[stdlib] Improve unavailable diagnostics
...
Making these generic and removing inout from the arguments cuts down on
the number of useless notes we give users when they try to use them.
Arguably the compiler should do better, but this moves our test results
along.
2016-07-29 18:23:21 -07:00
Dave Abrahams
59adfe9c52
[stdlib] Correct renamed protocol @available decls
2016-07-29 18:14:36 -07:00
Robert Widmann
b79fa44da5
Merge pull request #3878 from CodaFi/decltype
...
[SE-0096] Implement type(of:)
2016-07-29 18:05:01 -07:00
Dave Abrahams
f06a9a1154
Merge 'origin/master' into new-integer-protocols
2016-07-29 17:52:49 -07:00
Doug Gregor
b9363fe6bd
[SE-0111] Enable SE-0111 by default.
2016-07-29 17:28:24 -07:00
Robert Widmann
14dc86cf15
Polish off uses of dynamicType in codebase
2016-07-29 16:58:40 -07:00
Dmitri Gribenko
99dffd7682
Merge pull request #3854 from rintaro/SE-0101-memorylayout
...
[SE-0101] Implement: Reconfiguring sizeof and related functions into a unified MemoryLayout struct - Part 1
2016-07-29 15:56:27 -07:00
Michael Ilseman
ccda8f33d1
[noescape by default] Proliferate @escaping
...
Adds an explicit @escaping throughout the standard library, validation
test suite, and tests. This will be necessary as soon as noescape is
the default for closure parameters.
2016-07-29 13:48:07 -07:00
Rintaro Ishizaki
091506315b
[SE-0101] Implement: Reconfiguring sizeof and related functions into MemoryLayout struct
...
As of now:
* old APIs are just marked as `deprecated` not `unavaiable`. To make it
easier to co-operate with other toolchain repos.
* Value variant of API is implemented as public @private
`_ofInstance(_:)`.
2016-07-30 03:09:28 +09:00
Maxim Moiseev
969bbfb0ab
Turning operators into static funcs
2016-07-29 13:31:21 +03:00
Maxim Moiseev
522ad4eafb
a bunch of unavailable declarations
2016-07-29 13:31:21 +03:00
Maxim Moiseev
bf1467c0c7
removing unnecessary fatalError calls
2016-07-29 13:31:21 +03:00
Maxim Moiseev
3517b62c42
implementing popcount
2016-07-29 13:31:21 +03:00
Maxim Moiseev
d42743f985
removing IntegerArithmetic.swift
2016-07-29 13:31:21 +03:00
Maxim Moiseev
148282d659
a better fixme message on == (Int, Int). removing < (Int, Int)
2016-07-29 13:31:21 +03:00
Maxim Moiseev
1f07b84b33
FIXME for the unsafe functions
2016-07-29 13:31:21 +03:00
Maxim Moiseev
8341f6c1b7
removing explicit typecasts
2016-07-29 13:31:21 +03:00
Maxim Moiseev
655bfe2a57
FIXMEs to change FixedWidthInteger to BinaryInteger in generic code
2016-07-29 13:31:21 +03:00
Maxim Moiseev
2df96d043c
removing commented out default implementation
2016-07-29 13:31:21 +03:00
Maxim Moiseev
4cc7c004ad
replacing Int32()._value with let zero: Int32 = 0
2016-07-29 13:31:21 +03:00
Maxim Moiseev
0195fb1833
adding a proper arguemnt label to 'unsafe' methods
2016-07-29 13:31:21 +03:00
Maxim Moiseev
1dd6c2d3d4
Addressing some of the FIXMEs
2016-07-29 13:31:21 +03:00
Maxim Moiseev
ac7201d257
no IntMax in IntegerParsing
2016-07-29 13:31:21 +03:00
Maxim Moiseev
6dbb572038
toIntMax is gone
2016-07-29 13:31:21 +03:00
Maxim Moiseev
e2e032bc20
core and overlays build
2016-07-29 13:31:21 +03:00
Maxim Moiseev
f3b472c7f0
uncommenting some implementations
2016-07-29 13:31:21 +03:00
Maxim Moiseev
6ccc6ae490
SetAlgebra conformance errors
2016-07-29 13:31:21 +03:00
Max Moiseev
4595052022
infinite inlining loop
2016-07-29 13:31:21 +03:00
Max Moiseev
28a252e33d
Operators compile
2016-07-29 13:31:21 +03:00
Max Moiseev
1867ca4a0f
WIP eliminating compilation errors one by one...
2016-07-29 13:31:21 +03:00
Max Moiseev
1ed25bdfa3
un-underscoring
2016-07-29 13:31:21 +03:00
Max Moiseev
3ed8fdad6c
uncommenting failing exact initializer from BinaryInteger in Arithmetic
2016-07-29 13:31:21 +03:00
Max Moiseev
c3967d8649
Using gybbed all_integer_types
2016-07-29 13:31:21 +03:00
Max Moiseev
7b9baa021b
Concrete underscored types with fatalErrors everywhere
2016-07-29 13:31:21 +03:00
Andrew Trick
3f890081a7
Disallow illegal UnsafePointer conversions. ( #3858 )
...
As proposed in SE-0107: UnsafeRawPointer.
https://github.com/apple/swift-evolution/blob/master/proposals/0107-unsaferawpointer.md
Remove the initializers that allow type inference to
change the Pointee type of an UnsafePointer.
These initializers violate the strict aliasing
aspect of the memory model and can lead to undefined
behavior.
2016-07-29 01:57:36 -07:00
Dmitri Gribenko
e5db796212
Merge pull request #3843 from atrick/rawptr-convert
...
Remove "illegal" UnsafePointer casts from the stdlib.
2016-07-28 22:40:16 -07:00