Commit Graph

7767 Commits

Author SHA1 Message Date
Maxim Moiseev
767e8f31ac Merge pull request #3796 from apple/new-integer-protocols
New integer protocols
2017-04-17 16:46:09 -07:00
Arnold Schwaighofer
98e6367f22 Merge pull request #8815 from aschwaighofer/runtime_support_builtin_int512
Runtime: Add support for Builtin.Int512
2017-04-17 16:42:22 -07:00
Max Moiseev
8ca814cc8c Merge remote-tracking branch 'origin/master' into new-integer-protocols 2017-04-17 14:40:20 -07:00
John McCall
2c40b39f26 Move runtime functions for casting into their own header. 2017-04-17 17:16:13 -04:00
Max Moiseev
b7f715f7e5 Fixing the iOS test failures 2017-04-17 14:05:34 -07:00
Dave Abrahams
73f1895aea Merge pull request #8800 from apple/kill-redundant-reserveCapacity
Eliminate redundant capacity reservation
2017-04-17 12:57:26 -07:00
swift-ci
c158056d1e Merge pull request #8559 from phausler/enumerate_bytes_index 2017-04-17 11:08:14 -07:00
Max Moiseev
71b2c1fb41 Adding Swift 3 alias for _SignedInteger 2017-04-17 11:01:59 -07:00
Max Moiseev
192c11217f Adding arithmetic methods to FloatingPoint for Swift 3 mode 2017-04-17 10:43:40 -07:00
Arnold Schwaighofer
7321153c0e Fix the alignment parameter 2017-04-17 10:33:32 -07:00
Arnold Schwaighofer
1d2e46bbec Runtime: Add support for Builtin.Int512
rdar://31540879
2017-04-17 09:58:42 -07:00
Max Moiseev
9b53efd72c Merge branch 'master' into new-integer-protocols 2017-04-17 09:53:44 -07:00
Philippe Hausler
03dd527414 [Foundation] Rework NSFastEnumerationIterator to be more performant
Previously the implementation of NSFastEnumerationIterator would cause many allocations and was overly complex; leading to poor performance in certain cases like DirectoryEnumerator etc. This version instead acts more similarly to how the objc for-in syntax works.
Resolves:
rdar://problem/30905263

and partially addresses some of the concerns backing:
rdar://problem/30195113
2017-04-17 09:44:43 -07:00
Dave Abrahams
6177af57dd [stdlib] Eliminate redundant capacity reservation
append(contentsOf:) already reserves capacity.
2017-04-15 22:00:28 -07:00
Max Moiseev
7b98267d78 Fixing the unicode tests by removing the potential optimization 2017-04-14 17:03:26 -07:00
practicalswift
40cf4d183d [gardening] Use consistent spacing after if, for and while 2017-04-14 17:35:36 +02:00
practicalswift
734ed6834f [gardening] Use correct multi-line block comment 2017-04-14 17:33:24 +02:00
practicalswift
bb822285b4 [gardening] Remove comparison to true 2017-04-14 17:33:24 +02:00
Slava Pestov
a5a40c7fc7 Runtime/IRGen: Preliminary plumbing for subclass existentials 2017-04-13 21:29:57 -07:00
Max Moiseev
8de33b4824 Overloads for +/- on Strideable for Swift 3 compatibility mode 2017-04-13 17:29:42 -07:00
Max Moiseev
54e5f5d741 Handling the differences in << and >> for Swift 3 vs Swift 4
In Swift 3 shifts used to be defined on the concrete integer types, so
the right-hand-side value in the shift expression could define a type
for the result, as in `1 << i32` would have the type Int32. Swift 4
makes shift operators heterogeneous, so now `1 << i32` will result in an
Int, according to the type of the left-hand-side value, which gets a
default type for integer literals.
2017-04-13 15:34:32 -07:00
Ted Kremenek
c18b4be544 Add shim for extern_proc's p_starttime.
This constant is not imported by the ClangImporter:

  #define p_starttime p_un.__p_starttime

Add a shim to do the same thing.

Fixes rdar://problem/31549450
2017-04-13 09:47:14 -07:00
Max Moiseev
bc7918b94c Commenting out deprecated +/- on Strideable 2017-04-12 17:03:30 -07:00
swift-ci
967e2d9653 Merge pull request #8721 from natecook1000/nc-fixes-73-1 2017-04-12 10:33:53 -07:00
Arnold Schwaighofer
69e6f07167 Merge pull request #8701 from aschwaighofer/wip_ast_silgen_const_string_literal
AST/SILGen support for constant string literals
2017-04-12 09:52:18 -07:00
practicalswift
27eabd4fb5 Merge pull request #8498 from practicalswift/gardening-20170403
[gardening] Fix typos. Fix headers. Python cleanups.
2017-04-12 16:41:33 +02:00
practicalswift
b704f1448b [gardening] Improve header consistency 2017-04-12 15:13:11 +02:00
Nate Cook
909c4c8714 [stdlib] Fix Collection discussion typo 2017-04-12 00:14:53 -05:00
Dave Abrahams
1f7ec57b04 Merge pull request #1527 from codestergit/master
[Stdlib] Improves Collection.sort  to accept throwing closure
2017-04-11 18:03:17 -07:00
Max Moiseev
fe4553eb80 Merge branch 'master' into new-integer-protocols 2017-04-11 17:07:11 -07:00
Max Moiseev
3d7ddc53c9 More typealiases for Swift 3 protocols 2017-04-11 17:05:22 -07:00
Max Moiseev
def49e8fa4 Adding SignedInteger.&+ and &- for source compatibility 2017-04-11 17:05:21 -07:00
Arnold Schwaighofer
4d60ec333b AST/SILGen support for constant string literals
rdar://30545013
2017-04-11 11:41:43 -07:00
Arnold Schwaighofer
b167b4475d Add SIL and IRGen support for a ConstantStringLiteral instruction
This supports a utf8 or utf16 encoding.

rdar://30545013
2017-04-11 08:43:47 -07:00
Dave Abrahams
9b0e80079c [stdlib] EmptyCollection: release-mode checks-=10
These checks weren't protecting memory safety; let's see if benchmarks go faster without them in release mode.
2017-04-10 16:01:17 -07:00
Max Moiseev
a3a3351bd8 Merge branch 'master' into new-integer-protocols 2017-04-10 15:41:13 -07:00
Max Moiseev
d30a2f95e6 Adding non-masking shifts on concrete types 2017-04-10 15:18:21 -07:00
Greg Parker
cfee4d9c5e [runtime] Fix some casts of _SwiftValue (#8457)
* [runtime] Fix some casts of _SwiftValue.

* Allow _SwiftValue to be cast to NSObject by yielding the box object itself.
* Failed casts from NSDictionary containing _SwiftValue should not crash.

SR-4306, rdar://31197066
2017-04-10 14:31:35 -07:00
Max Moiseev
cb82daa282 Speculatively replacing a couple more transparent's with inline-always'es 2017-04-10 13:43:02 -07:00
Joe Groff
39a0849362 SILGen: Codegen for key path applications. 2017-04-09 16:38:34 -07:00
Daniel Duan
ddfe7e814e Merge pull request #8406 from dduan/bridgenonverbatim_unittest
Test: use StdlibUnittest in BridgeNonVerbatim
2017-04-07 18:04:03 -07:00
Max Moiseev
dfc8c65dca Adding overloads for << and >> with the literal on the left-hand side 2017-04-07 13:56:40 -07:00
Max Moiseev
9bf43d632f Arithmetic operators for Strideable where Stride : ExpressibleByIntegerLiteral for compatibility 2017-04-07 11:41:23 -07:00
Max Moiseev
5b613b3f44 Adding deprecated mixed-type arithmetic operators for Strideable & SignedInteger for compatibility 2017-04-07 11:41:22 -07:00
Max Moiseev
ed90d8c908 Adding a few Swift 3 compatibilty APIs 2017-04-07 11:41:22 -07:00
Joe Groff
85ad6b355e Merge branch 'master' into keypaths 2017-04-06 18:02:07 -07:00
Andrew Trick
8668f9bd72 Add init(rebasing:) to UnsafeBufferPointer.
This is required for consistency with UnsafeRawBufferPointer.
2017-04-06 17:12:18 -07:00
Andrew Trick
30f2cce1b6 Do not run recursive O(n^2) collection slice testing on large collections.
Now, even with collection unit testing wired up, the validation tests
take the same amount of time to execute.
2017-04-06 17:12:18 -07:00
Andrew Trick
c12740a8a2 Add UnsafeRawBuffer(rebasing:) initializers.
Allows converting a raw slice into a zero-based raw buffer,
which is a common operation on flat memory.

Add and update UnsafeRawBufferPointer unit tests.
2017-04-06 17:12:18 -07:00
Andrew Trick
3782925a29 Give UnsafeRawBufferPointer a distinct slice type.
SubSequence = RandomAccessSlice<Self>
2017-04-06 17:12:18 -07:00