Commit Graph

2015 Commits

Author SHA1 Message Date
swift-ci
e657ece02b Merge pull request #3617 from natecook1000/nc-existenz-identity 2016-07-24 23:31:40 -07:00
Dmitri Gribenko
558f2b8591 Merge pull request #3517 from natecook1000/nc-SE-0120
[stdlib] Implement partition API change (SE-0120)
2016-07-24 01:43:02 -07:00
Andrew Trick
ecc6bd51ad Type system support for raw pointer conversion. (#3685)
* [Type System] Handle raw pointer conversion.

As proposed in SE-0107: UnsafeRawPointer.
https://github.com/apple/swift-evolution/blob/master/proposals/0107-unsaferawpointer.md#implicit-argument-conversion

UnsafeMutablePointer<T> -> UnsafeMutableRawPointer
UnsafeMutablePointer<T> -> UnsafeRawPointer
UnsafePointer<T> -> UnsafeRawPointer
UnsafeMutableRawPointer -> UnsafeRawPointer

inout:
&anyVar -> UnsafeMutableRawPointer
&anyVar -> UnsafeRawPointer

array -> UnsafeRawPointer
string -> UnsafeRawPointer

varArray -> UnsafeMutableRawPointer

* Rename expectEqual(_, _, sameValue:) to expectEqualTest to workaround a type system bug.

<rdar://26058520> Generic type constraints incorrectly applied to functions with the same name

This is exposed by additions to the type system for UnsafeRawPointer.

Warning: unit tests fail very confusingly without this fix.
2016-07-23 11:30:49 -07:00
Nate Cook
c9c865c279 [stdlib] Update partition(by:) tests
Adds a dispatch test for partition(by:), since it's now a protocol
requirement. Also adds a new logging collection wrapper that only
logs when _withUnsafeMutableBufferPointerIfSupported is called --
any calls to this method from dispatched methods are uncounted by
the standard logging wrappers.
2016-07-22 22:31:27 -05:00
Slava Pestov
ddc51c5917 AST: Implement SE-0102, introducing new semantics for Never alongside @noreturn
No migrator support yet, and the code for @noreturn is still in
place.
2016-07-22 14:56:39 -07:00
Xin Tong
bbf86865d6 Change unicodescalar to failable
We were using a precondition which crashes the program when invalid input is
provided. We want to provide a way to gracefully check and handle invalid input
or shutdown the program if necessary.

SR-1930
2016-07-21 15:27:13 -07:00
Nate Cook
29bbff221b [stdlib] Update partition tests with feedback 2016-07-21 10:18:20 -05:00
Nate Cook
1d037800b9 [stdlib] Update tests for new partition APIs
Special thanks to @aschwaighofer for help with these tests and fix-its!
2016-07-21 10:18:20 -05:00
Alexander Lash
9a4caf6c4b [core] hasPrefix/hasSuffix consider the empty string a prefix/suffix of all strings. 2016-07-20 17:46:47 -07:00
Maxim Moiseev
c2e3369968 Photos overlay (#3613) 2016-07-20 15:01:46 -07:00
Nate Cook
7e6a1055b7 stdlib: underscore AnyCollectionProtocol 2016-07-20 15:52:10 -05:00
Nate Cook
34b9b98988 [stdlib] Convert existential collection === operator to method 2016-07-20 10:01:39 -05:00
Luke Larson
74e0498015 Revert "Update master to build with Xcode 8 beta 3, OS X 10.12, iOS 10, tvOS 10, and watchOS 3 SDKs."
This reverts commit 62d1fa760c.
2016-07-19 15:18:17 -07:00
Tony Parker
3cb4a76fed Merge pull request #3576 from parkera/se86_outputstream
Rename OutputStream to OutputStreamable [SE-0086]
2016-07-19 13:45:01 -07:00
Mishal Shah
62d1fa760c Update master to build with Xcode 8 beta 3, OS X 10.12, iOS 10, tvOS 10, and watchOS 3 SDKs. 2016-07-19 22:31:34 +02:00
Andrew Trick
5a8271c621 Rename UnsafePointer allocate & deallocate. (#3608)
As proposed in SE-0107: UnsafeRawPointer:
Rename 'init(allocatingCapacity:)' to 'UnsafeMutablePointer.allocate(capacity:)'
Rename 'deallocateCapacity' to 'deallocate(capacity:)'

`allocate` should not be an initializer. It's primary function is to allocate
memory, not initialize a pointer.
2016-07-19 11:48:18 -07:00
Dave Abrahams
a68f648fab encode(_:output:) => encode(_:into processCodeUnit:) 2016-07-19 07:13:00 -06:00
Dave Abrahams
5a5f19aa45 first/contains(predicate) => first/contains(where: predicate) 2016-07-19 07:12:59 -06:00
Dave Abrahams
dcbfdb5339 _ includeElement/whereElementsSatisfy predicate => _ isIncluded 2016-07-19 07:05:54 -06:00
Dave Abrahams
014b6972cf isOrderedBefore: => by areInIncreasingOrder: 2016-07-19 07:05:54 -06:00
Andrew Trick
73106dd7c3 Rename initialize(with:count:) to initialize(to:count:). (#3601)
As proposed in SE-0107: UnsafeRawPointer.

"with" is considered a vacuous preposition. "to" implies direction.
2016-07-18 23:37:45 -07:00
Tony Parker
2a4e916296 Rename OutputStream to TextOutputStream [SE-0086] 2016-07-18 16:47:23 -07:00
Michael Gottesman
fc37603c5f Revert "Implement SE-0118" 2016-07-18 16:44:58 -07:00
Andrew Trick
0230efc614 Rename UnsafePointer assign/initialize and eliminate Backward variants. (#3585)
Also fixes the comments to clarify that source and self memory
must be disjoint.
2016-07-18 15:15:47 -07:00
Dave Abrahams
da2947f079 encode(_:output:) => encode(_:into processCodeUnit:) 2016-07-18 14:30:46 -06:00
Dave Abrahams
7987b8549b first/contains(predicate) => first/contains(where: predicate) 2016-07-18 14:29:09 -06:00
Dave Abrahams
4bb21b8a2f _ includeElement/whereElementsSatisfy predicate => _ isIncluded 2016-07-18 14:29:09 -06:00
Dave Abrahams
f3ccc956c6 isOrderedBefore: => by areInIncreasingOrder: 2016-07-18 14:29:09 -06:00
Dmitri Gribenko
b868fb1a50 stdlib tests: adapt to removal of Bool.boolValue 2016-07-18 02:41:20 -07:00
Chris Lattner
0917c01922 update validation tests for Boolean removal. 2016-07-17 22:49:20 -07:00
Mark Lacey
65bf35d48b Merge remote-tracking branch 'origin/master' into master-next 2016-07-16 23:25:30 -07:00
Dmitri Gribenko
1d3f595955 stdlib: re-enable validation-test/stdlib/String.swift 2016-07-15 20:33:47 -07:00
Michael Gottesman
40e1991e12 Revert "Name and label changes for closure parameters (for review only) (#2981)"
This reverts commit 18406900ba.
2016-07-15 19:45:26 -07:00
Mark Lacey
1c00ac4c6d Merge remote-tracking branch 'origin/master' into master-next
Conflicts:
	lib/IRGen/IRGen.cpp
	test/DebugInfo/parent-scope.swift
2016-07-15 19:23:53 -07:00
Dmitri Gribenko
1ce9219c7c Merge pull request #3532 from apple/stdlib-use-expectCollectionAssociatedTypes
stdlib: String tests: use expectCollectionAssociatedTypes()
2016-07-15 17:43:55 -07:00
Dave Abrahams
18406900ba Name and label changes for closure parameters (for review only) (#2981)
Implement SE-0118 Name and label changes for closure parameters

[SE-0118](https://github.com/apple/swift-evolution/blob/master/proposals/0118-closure-parameter-names-and-labels.md)
2016-07-15 15:31:48 -07:00
Michael Gottesman
16143ca41f Disable test to unbreak the build.
rdar://27381049
2016-07-15 15:08:54 -07:00
Dmitri Gribenko
0e886ce26c stdlib: String tests: use expectCollectionAssociatedTypes() 2016-07-15 10:45:56 -07:00
Dave Abrahams
b21d8bea92 [stdlib] Bridging [aClass] to ObjC in O(1) (redux #2)
There's no need for a deferred conversion in these cases.

This time committing ALL the changes needed to get the validation tests to pass.
2016-07-14 12:45:54 -07:00
Nate Cook
3d2d3423ab [stdlib] Add test for Collection associated type inference 2016-07-14 02:23:28 -05:00
Vivian Kong
7080a54237 Fix PersistentVector test for s390x 2016-07-13 13:35:24 -04:00
Dmitri Gribenko
2bf19132de Merge pull request #3452 from natecook1000/nc-utf8index-nocore
[stdlib] Remove _StringCore from UTF8View.Index
2016-07-13 09:11:29 -07:00
Robert Widmann
f97e5dcb0e [SE-0115][1/2] Rename *LiteralConvertible protocols to ExpressibleBy*Literal. This
change includes both the necessary protocol updates and the deprecation
warnings
suitable for migration.  A future patch will remove the renamings and
make this
a hard error.
2016-07-12 15:25:24 -07:00
Doug Gregor
823c24b355 [SE-0112] Rename ErrorProtocol to Error.
This is bullet (5) of the proposed solution in SE-0112, and the last
major piece to be implemented.
2016-07-12 10:53:52 -07:00
Nate Cook
b0e20e1eda [stdlib] Add string view index comparability test 2016-07-12 09:29:49 -05:00
Russell Currey
9af6321235 Fix PersistentVector test for powerpc64{le}
This test has a check for 32/64bit, include powerpc64{le} in this check.

Signed-off-by: Russell Currey <ruscur@russell.cc>
2016-07-12 16:03:04 +10:00
Russell Currey
a16a063ac6 Use TIOCSTI instead of TIOCGWINSZ in Glibc test
validation-test/stlib/Glibc.swift was failing on powerpc64le due to the
missing TIOCGWINSZ symbol.  Since (from what I can tell) this is just a
random tty ioctl, replace it with a different ioctl that should be more
commonly defined.

Signed-off-by: Russell Currey <ruscur@russell.cc>
2016-07-12 16:02:54 +10:00
Dmitri Gribenko
824bccc871 stdlib: change Collection._copyToNativeArrayBuffer() to be defined in terms of public types 2016-07-11 10:54:43 -07:00
Dmitri Gribenko
bcb5a363d1 Merge pull request #3287 from PatrickPijnappel/utf-refactor
[stdlib] Significant UTF8/16 decode speed-ups for iterator nil-guarantee
2016-07-08 14:07:15 -07:00
Dmitri Gribenko
ce94bd9cca Merge pull request #3268 from natecook1000/nc-scalarindex-nocore
[stdlib] Remove _StringCore from UnicodeScalarIndex
2016-07-07 17:41:36 -07:00