Commit Graph

60 Commits

Author SHA1 Message Date
Max Moiseev
a49dab6bf8 Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-02-29 12:08:52 -08:00
Daniel Duan
2bc78b8c09 [stdlib] update for 'inout' adjustment (SE-0031) 2016-02-26 12:02:29 -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
Dmitri Gribenko
dd75aed67a Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-02-17 14:40:05 -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
Nate Cook
355fa4d064 Mark true as code in documentation comments. 2016-02-12 04:21:57 -06:00
Nate Cook
5849e167dd [stdlib] Fix a spate of typos.
Fix bulleted list formatting in Unsafe(Mutable)Pointer.
Fix incorrect type mentions on CustomPlaygroundQuickLookable.
Use 'An' instead of 'A' before '8-bit (un)signed integer.
Fix error in Range sample code.
Fix typo in Dictionary.updateValue(_:forKey:) doc comment.
Remove extra documentation in Mirror.AncestorRepresentation.
Fix improper case for operators and methods in IntegerArithmeticType.
2016-02-11 11:39:39 -06:00
Max Moiseev
86680ec622 [stdlib] @available attributes for removed APIs 2016-01-20 13:08:27 -08:00
Doug Gregor
7d70b704e4 Merge commit '5e11e3f7287427d386636a169c4065c0373931a8' into swift-3-api-guidelines 2016-01-19 23:18:20 -08:00
Chris Lattner
671eb1f4dd Merge pull request #976 from gregomni/associatedtype-in-stdlib
[stdlib] Switch keywords from 'typealias' to 'associatedtype' in stdlib
2016-01-17 14:09:06 -08:00
Anton Blanchard
b1827d8a8f Add powerpc64le Linux support
This patch adds powerpc64le Linux support. While the patch also adds
the matching powerpc64 bits, there are endian issues that need to be
sorted out.

The PowerPC LLVM changes for the swift ABI (eg returning three element
non-homogeneous aggregates) are still in the works, but a simple LLVM
fix to allow those aggregates results in swift passing all but 8
test cases.
2016-01-15 06:48:31 +00:00
gregomni
e2dee6b9dd [stdlib] Switch keywords from 'typealias' to 'associatedtype' in stdlib
Fixes deprecation warnings arising from addition of new
‘associatedtype’ keyword in sr-511.
2016-01-14 09:39:15 -08:00
practicalswift
21c3d93bea Remove unused imports. 2016-01-09 01:39:22 +01:00
Max Moiseev
f51e708a8f Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-01-04 12:25:25 -08:00
Zach Panzarino
e3a4147ac9 Update copyright date 2015-12-31 23:28:40 +00:00
Max Moiseev
a7339e67ac Merge remote-tracking branch 'origin' into swift-3-api-guidelines 2015-12-22 11:36:07 -08:00
Chris Lattner
be53728691 Mark the ++ and -- operators in the standard library as deprecated for Swift 2.2,
to be removed in Swift 3.0.  I plan to improve the QoI of this deprecation in a
subsequent commit.
2015-12-21 22:10:25 -08:00
practicalswift
36d7072013 Remove immediately adjacent repeated words ("the the", "for for", "an an", etc.). 2015-12-21 22:16:04 +01:00
Maxim Moiseev
e6468a0eca _precondition => _require 2015-12-16 17:19:01 -08:00
Max Moiseev
2021dd5a4d Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2015-12-15 12:49:22 -08:00
Patrick Pijnappel
bbe0e514a2 [stdlib] Fix capitalization 2015-12-13 21:37:44 +11:00
Maxim Moiseev
b702b1a903 more number type renames 2015-12-10 17:08:41 -08:00
Maxim Moiseev
c35b0058fc SignedNumberType => SignedNumber 2015-12-10 17:07:10 -08:00
Maxim Moiseev
1b6244f3ee integer types renamed 2015-12-10 17:03:40 -08:00
Maxim Moiseev
0c4c56cd5f BitwiseOperationsType => BitwiseOperations 2015-12-10 14:59:40 -08:00
Maxim Moiseev
c678a839dc IndexType => Index 2015-12-09 17:16:42 -08:00
Dmitri Gribenko
174d475833 stdlib: Remove unavavailable APIs that were left as migration aids
These APIs are from the Swift 1.2 => Swift 2.0 transition, and are not
relevant anymore.

Removing them reduces the surface area of the library that needs to be
reviewed.
2015-12-02 01:19:50 -08:00
Jordan Rose
cf8baedee2 Re-apply "Rename @transparent to @_transparent for now."
This re-applies 90fcbfe9a6. I'll be committing
the corresponding change to Foundation momentarily.
2015-11-16 10:53:56 -08:00
Xin Tong
16843684b2 Revert "Rename @transparent to @_transparent for now."
This reverts commit 90fcbfe9a6.

Seems there are still some tests that are left not modified.
2015-11-14 07:04:31 -08:00
Jordan Rose
90fcbfe9a6 Rename @transparent to @_transparent for now.
This feature has not been fully designed, let alone properly implemented.
For more information, see docs/TransparentAttr.rst.
2015-11-13 16:25:34 -08:00
Arnold Schwaighofer
6e51e15a59 Add _sizeInBytes to fixed point types.
Swift SVN r32243
2015-09-25 22:05:15 +00:00
Dmitri Hrybenko
4375a463a7 stdlib: rename Int**.value and Float**.value to _value per naming convention
rdar://21357661

Swift SVN r32096
2015-09-20 00:01:13 +00:00
Dave Abrahams
07c47326cb [stdlib] Integer Prototype: get most signifcant bit
Swift SVN r31898
2015-09-11 18:40:47 +00:00
Dmitri Hrybenko
dd3194a18c stdlib: adopt @warn_unused_result
rdar://20957486

Swift SVN r31048
2015-08-06 14:53:18 +00:00
David Farler
311baf73cf Index protocol extensions
- Remove free Swift functions for advance and distance and replace
  them with protocol extension methods:
  - advancedBy(n)
  - advancedBy(n, limit:)
  - distanceTo(end)
- Modernize the Index tests
  - Use StdlibUnittest
  - Test for custom implementation dispatch

Perf impact: No significant changes reported in the
Swift Performance Measurement Tool.

rdar://problem/22085119

Swift SVN r30958
2015-08-03 20:06:44 +00:00
Dmitri Hrybenko
f5de8757e4 stdlib: remove Word and UWord
These types are leftovers from the early pre-1.0 times when Int and UInt
were always 64-bit on all platforms.  They serve no useful purpose
today.  Int and UInt are defined to be word-sized and should be used
instead.

rdar://18693488

Swift SVN r30564
2015-07-24 05:01:32 +00:00
Joe Groff
0b54e21629 simd overlay: Use LLVM vector types.
This brings the David Owens benchmark from http://owensd.io/2015/06/27/performance-xcode7-beta-2.html from parity with simd.h-based C to 3x faster.

Before:

RenderGradient ([UInt32].withUnsafeMutablePointer (SIMD))                 │ 7.035851 │ 6.304739 │ 9.815832 │  1.212 │

After:

RenderGradient ([UInt32].withUnsafeMutablePointer (SIMD))                 │ 2.318357 │ 2.223325 │ 2.697981 │ 0.1490 │

This also addresses rdar://problem/21574425, since Builtin.add_VecNxIntM isn't overflow-checked, and overflow checks really aren't wanted when working with vector types directly.

Reapplying now that Nadav's fixed the ARM64 SelectionDAG issue this exposed before, and Arnold's fixed
yet another SelectionDAG issue exposed after that.

Swift SVN r30006
2015-07-09 01:20:01 +00:00
Jordan Rose
1edf9b3ae8 Check access for associated type requirements, too.
This is a straight-up "oops". You could always get to these typealiases via
the protocol, but like the member requirements you should have to say so.

Swift SVN r29952
2015-07-08 00:43:37 +00:00
Arnold Schwaighofer
8517b7ba08 Revert "Un-XFAIL test on Linux."
Revert "simd overlay: Use LLVM vector types."

This reverts commit r29922 and r29924.

More arm64 instruction selection errors.

rdar://21703486

Swift SVN r29941
2015-07-07 16:45:08 +00:00
Joe Groff
9a23fa9040 simd overlay: Use LLVM vector types.
This brings the David Owens benchmark from http://owensd.io/2015/06/27/performance-xcode7-beta-2.html from parity with simd.h-based C to 3x faster.

Before:

RenderGradient ([UInt32].withUnsafeMutablePointer (SIMD))                 │ 7.035851 │ 6.304739 │ 9.815832 │  1.212 │

After:

RenderGradient ([UInt32].withUnsafeMutablePointer (SIMD))                 │ 2.318357 │ 2.223325 │ 2.697981 │ 0.1490 │

This also addresses rdar://problem/21574425, since Builtin.add_VecNxIntM isn't overflow-checked, and overflow checks really aren't wanted when working with vector types directly.

Reapplying now that Nadav's fixed the ARM64 SelectionDAG issue this exposed before.

Swift SVN r29922
2015-07-06 22:56:42 +00:00
Joe Groff
e692c87bbf Revert "simd overlay: Use LLVM vector types."
This reverts commit r29891. It causes an LLVM assertion failure in SelectionDAG on appletvos-arm64.

Swift SVN r29893
2015-07-02 17:31:34 +00:00
Joe Groff
8103dfb825 simd overlay: Use LLVM vector types.
This brings the David Owens benchmark from http://owensd.io/2015/06/27/performance-xcode7-beta-2.html from parity with simd.h-based C to 3x faster.

Before:

RenderGradient ([UInt32].withUnsafeMutablePointer (SIMD))                 │ 7.035851 │ 6.304739 │ 9.815832 │  1.212 │

After:

RenderGradient ([UInt32].withUnsafeMutablePointer (SIMD))                 │ 2.318357 │ 2.223325 │ 2.697981 │ 0.1490 │

This also addresses rdar://problem/21574425, since Builtin.add_VecNxIntM isn't overflow-checked, and overflow checks really aren't wanted when working with vector types directly.

Swift SVN r29891
2015-07-02 17:05:29 +00:00
Doug Gregor
17884f173a Stop declaring function parameters without names, e.g., "func f(Int)".
Swift SVN r29607
2015-06-24 16:01:31 +00:00
Dmitri Hrybenko
491e774f41 stdlib: redeclare requirements from underscored protocols in public protocols
... and remove the warning in comments that encouranged users to read
the declarations inside underscored protocols.

Swift SVN r29500
2015-06-19 01:04:05 +00:00
Dave Abrahams
0fdc73bf43 [stdlib] Minimize and rename _UnsignedIntegerType
The protocol is still needed in order to make sure mixed signed/unsigned
arithmetic doesn't compile, but after pulling all its "real"
requirements into UnsignedIntegerType, that's now its only function.
Thus, rename it to _DisallowMixedSignArithmetic.

Swift SVN r28980
2015-05-24 02:09:14 +00:00
Ted Kremenek
bc1500d50c Revert "[stdlib] Kill _UnsignedIntegerType"
This broke the bots.

Swift SVN r28976
2015-05-23 21:54:58 +00:00
Dave Abrahams
cda6cd207d [stdlib] Kill _UnsignedIntegerType
Swift SVN r28975
2015-05-23 21:14:14 +00:00
Dmitri Hrybenko
313701286b stdlib: Various punctuation and markup improvements to the comments.
Patch by Brian Lanier.

Swift SVN r28659
2015-05-16 03:04:51 +00:00
Dmitri Hrybenko
68ef59e37a stdlib: Convert comments to use '- requires:' instead of 'Requires:'.
Tidy misc. comments and markdown along the way.

Patch by Brian Lanier.

Swift SVN r28473
2015-05-12 17:47:11 +00:00