Commit Graph

32 Commits

Author SHA1 Message Date
Max Moiseev
ea8e0f0e15 Merge remote-tracking branch 'origin/master' into new-integer-protocols 2016-09-21 14:48:35 -07:00
airspeedswift
ed5231b47c Numbered all FIXME(ABI) entries for tracking purposes. (#4868) 2016-09-19 16:41:41 -07:00
practicalswift
3a4ee89034 [gardening] Use consistent formatting. 2016-09-17 12:12:49 +02:00
Nate Cook
d6dec00fe4 [Integer protocols] Make .negate() the customization point (#4413)
The SignedArithmetic protocol provides default implementations for both
negate() and negated(), with negate() calling negated(). This is inconsistent
with the Arithmetic protocol, which provides implementations of the nonmutating
methods that call their mutating counterparts. This flips the implementations
of negate() and negated() so an implementer only has to focus on mutating
methods.
2016-08-19 11:07:54 -07:00
Andrew Trick
d1807f7951 Add some availability attributes for UnsafePointer conversion.
This introduces some important diagnostics to help migration.

Some of the diagnostics that we would like to provide are impossible
on a generic class because they introduce ambiguity.

Renaming UnsafePointer<Void> to UnsafeRawPointer makes extensions and
global operators ambiguous.

We would also like to provide this fix-it on conversion from
UnsafePointer<Void> or UnsafeRawPointer to UnsafePointer<T>
with this message:
  Conversion restricted. Use 'assumingMemoryBound(to:)' or 'bindMemory(to:capacity:)'}}

However, that introduces ambiguous overloads that defeat other hueristics.
2016-08-05 18:30:06 -07:00
Dave Abrahams
59adfe9c52 [stdlib] Correct renamed protocol @available decls 2016-07-29 18:14:36 -07: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
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
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
Robert Widmann
4c2dbe1723 [stdlib][SE-0089] Finish off Lossless String Conversion (#3761)
* Rename string reflection init

* Addressing PR comments and updating some tests

* Update test suite for lossless string conversion
2016-07-28 17:13:25 -07:00
John McCall
c8c41b385c Implement SE-0077: precedence group declarations.
What I've implemented here deviates from the current proposal text
in the following ways:

- I had to introduce a FunctionArrowPrecedence to capture the parsing
  of -> in expression contexts.

- I found it convenient to continue to model the assignment property
  explicitly.

- The comparison and casting operators have historically been
  non-associative; I have chosen to preserve that, since I don't
  think this proposal intended to change it.

- This uses the precedence group names and higherThan/lowerThan
  as agreed in discussion.
2016-07-26 14:04:57 -07:00
Patrick Pijnappel
2728bd0145 [stdlib] Standardize function signature spacing 2016-07-23 11:51:32 +10:00
Maxim Moiseev
5868f9c597 [stdlib] More new integer protocols (#3502) 2016-07-14 17:10:53 -07:00
Maxim Moiseev
61d1c599e8 [stdlib] Introducing the new Arithmetic protocol (#3479)
* [stdlib] Introducing the new Arithmetic protocol

* [stdlib] conforming floating point types to the new Arithmetic protocol

* [stdlib] removing AbsoluteValuable conformance from floating point types

* [stdlib] removing the integers prototype
2016-07-13 11:35:14 -07:00