Commit Graph

2011 Commits

Author SHA1 Message Date
Andrew Trick
849421799a Revert "SE-0138: Proposed amendment to SE-0138: Normalize UnsafeRawBufferPointer Slices (#8222)"
This reverts commit 1d32586d28.
2017-04-06 10:38:52 -07:00
Max Moiseev
8fe28b4e32 Merge branch 'master' into new-integer-protocols 2017-04-06 10:22:37 -07:00
Andrew Trick
1d32586d28 SE-0138: Proposed amendment to SE-0138: Normalize UnsafeRawBufferPointer Slices (#8222)
* Add sliceability tests for Unsafe(Raw)BufferPointer.

Improve the generic sliceability tests to verify that SubSequence indices are
compatible with their parents indices.

* Fix and enable testing stdlib Collection instances.

Top-level entry points fully testing a collection instance:
check${Traversal}Collection

One level of recursion into all slices of the collection instance
O(n^2). (Not combinatorial).

Previously, checkCollection() did nothing. So much of the testing infrastructure was inactive. Now it runs all forward collection tests.

Fixes a bug in subscriptRangeTests.

The UnsafeRawBufferPointer and Data collection testing is disabled and
will be fixed in the following commit.

* Give UnsafeRawBufferPointer a distinct slice type.

SubSequence = RandomAccessSlice<Self>

* Fix raw buffer pointer tests after changing the API

* 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.

* 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.

* Add init(rebasing:) to UnsafeBufferPointer.

This is required for consistency with UnsafeRawBufferPointer.

* Update CHANGELOG.md for SE-0138 amendment: UnsafeRawBufferPointer slice type.
2017-04-06 10:08:09 -07:00
Max Moiseev
3cbcd716f5 Merge branch 'master' into new-integer-protocols 2017-03-31 10:03:20 -07:00
Arnold Schwaighofer
67e3d27fd9 Copy-on-write existential performance work (#8369)
* IRGen: Change c-o-w existential implementation functions

* initialzeBufferWith(Copy|Take)OfBuffer value witness implementation for cow existentials

Implement and use initialzeBufferWith(Copy|Take)OfBuffer value witnesses for
copy-on-write existentials.

Before we used a free standing function but the overhead of doing so was
noticable (~20-30%) on micro benchmarks.

* IRGen: Use common getCopyOutOfLineBoxPointerFunction

* Add a runtime function to conditionally make a box unique

* Fix compilation of HeapObject.cpp on i386

* Fix IRGen test case

* Fix test case for i386
2017-03-27 20:51:02 -07:00
Max Moiseev
6f6c2aee8c Fixing the rest of the tests 2017-03-22 16:06:10 -07:00
Max Moiseev
b9fb3badc8 Merge remote-tracking branch 'origin/master' into new-integer-protocols 2017-03-22 12:30:24 -07:00
Robert Widmann
2c19ceb1c4 Update prefix-drop regression test (#8194) 2017-03-22 11:25:55 -04:00
Erik Eckstein
2a55b26e46 Mangling: enable new mangling for symbols 2017-03-16 12:04:08 -07:00
Robert Widmann
81968e21ff Remove erroneous drop(while:) optimization
Calling drop(while: ) after prefix() on a pure Sequence loses the
prefix, because in the internal drop(while: ) override grabs the
underlying base iterator from _PrefixSequence and wraps it in a
_DropWhileSequence.
2017-03-15 17:01:13 -04:00
Max Moiseev
4f0c7a582c Fixing some more validation tests 2017-03-13 16:37:30 -07:00
Max Moiseev
8ffbc81239 Fixing some validation tests 2017-03-10 17:09:28 -08:00
Max Moiseev
835b8809d2 Merge branch 'master' into new-integer-protocols 2017-03-07 16:18:54 -08:00
Mikio Takeuchi
3a46ecb7f0 Use UNSUPPORTED to skip race tests 2017-02-27 12:17:53 +09:00
Mikio Takeuchi
dfeca11403 Disable race tests if nonatomic reference counting is used 2017-02-27 12:17:53 +09:00
Erik Eckstein
2be1062cf2 Revert "Disable two stdlib tests in optimization mode."
The problem is fixed, so these tests should pass in optimized mode again.

This reverts commit bdd8626374.
2017-02-20 12:49:18 -08:00
Erik Eckstein
bdd8626374 Disable two stdlib tests in optimization mode.
Until rdar://problem/30579713 is fixed.
2017-02-17 14:28:57 -08:00
Philippe Hausler
525ffcc605 Merge pull request #7155 from phausler/Data_as_own_SubSequence
[Foundation] Convert Data’s SubSequence type to be Data
2017-02-15 11:02:27 -08:00
Slava Pestov
8b01cb6e24 Merge pull request #7243 from ikesyo/gardening-seq-to-array-conversion
[gardening] Prefer `Array(seq)` over `seq.map { $0 }`
2017-02-11 19:42:23 -08:00
Max Moiseev
a552cd45e5 [validation-test] Extracting array and slice types conformance tests
Since these tests take the most time, spliting them into 'one type -
one conformance' pairs to maximize parallelism.

<rdar://problem/30269532>
2017-02-07 11:58:47 -08:00
swift-ci
5d2a18560c Merge pull request #7197 from rintaro/diagverify-unknown 2017-02-06 17:47:04 -08:00
Syo Ikeda
e2b03a98dd [gardening] Prefer Array(seq) over seq.map { $0 } 2017-02-04 10:37:22 +09:00
Max Moiseev
c059b45a0b [validation-test] Splitting Arrays.swift.gyb into multiple files
In order to parallelize tests more and avoid a single long running
bottleneck.

<rdar://problem/30269532>
2017-02-03 17:06:55 -08:00
Rintaro Ishizaki
384ab780e9 [Diagnostic verifier] Make '<unknown>' check optional
Added frontend option '-verify-ignore-unknown'
2017-02-02 10:49:32 +09:00
Rintaro Ishizaki
827c6e7c3d [Diagnostic verifier] Diagnostics at '<unknown>:0' are unexpected 2017-02-02 10:48:54 +09:00
Philippe Hausler
1a2687a72e [Foundation] Convert Data’s SubSequence type to be Data
Data can encapsulate it’s own sub-sequence type by housing a range of the slice in the structural type for Data. By doing this it avoids the API explosion of supporting all APIs that take Data would need overloads to take a slice of Data. This does come at a small conceptual cost: any index based iteration should always account for the startIndex and endIndex of the Data (which was an implicit requirement previously by being a Collection). Moreover this prevents the requirement of O(n) copies of Data if it is never mutated while parsing sub sequences; so more than an API amelioration this also could offer a more effecient code-path for applications to use.
2017-02-01 08:50:23 -08:00
Max Moiseev
90ef26824f Merge remote-tracking branch 'origin/master' into new-integer-protocols 2017-01-26 15:28:42 -08:00
Mishal Shah
92ef777085 Update master to build with Xcode 8.3 beta 1, OS X 10.12, iOS 10, tvOS 10, and watchOS 3 SDKs. 2017-01-25 16:13:36 -08:00
Max Moiseev
d128ed42b0 Merge remote-tracking branch 'origin/master' into new-integer-protocols 2017-01-19 14:16:32 -08:00
Robert Widmann
cef4e66233 Merge pull request #6776 from ArtSabintsev/feature/XCTAssertNoThrow
Implementation for XCTAssertNoThrow
2017-01-13 01:39:26 -07:00
Arthur Ariel Sabintsev
12ef5bbc26 Fixes validation test by removing non-existant closure 2017-01-13 02:40:28 -05:00
Arthur Ariel Sabintsev
c7cbb171fd Fixed indentation for 2 methods in XCTest within validation-test 2017-01-13 01:40:55 -05:00
Arthur Ariel Sabintsev
741056578f Revert "All declarations in XCTest in SDK and XCTest in validations-tests have 2 spaces instead of 4"
This reverts commit 43a7b31490.
2017-01-13 01:38:27 -05:00
Arthur Ariel Sabintsev
43a7b31490 All declarations in XCTest in SDK and XCTest in validations-tests have 2 spaces instead of 4 2017-01-13 01:36:37 -05:00
Arthur Ariel Sabintsev
5f9352c8d2 Fixed indentation. 2017-01-13 01:28:53 -05:00
Arthur Ariel Sabintsev
13094af307 Fixed indentation 2017-01-13 01:18:21 -05:00
Arthur Ariel Sabintsev
31b96ad3cd Adjusted _XCTRegisterFailure conditions. Added validation test for XCTAssertNoThrow 2017-01-13 00:41:47 -05:00
Robert Widmann
883ca16ab9 Merge pull request #4314 from ultramiraculous/failable-int-to-float
SE-0080 (4/4) - Failable initializers for Float->Int
2017-01-12 21:57:05 -07:00
Max Moiseev
fa7368ad7d Merge remote-tracking branch 'origin/master' into new-integer-protocols 2017-01-11 14:37:01 -08:00
Robert Widmann
cde11ae1ee Resolve comments from last code review 2017-01-10 10:45:18 -07:00
Alsey Coleman Miller
8157194e83 [stdlib] Added POSIXErrorCode for Linux 2017-01-10 10:40:00 -07:00
Max Moiseev
aecccc7e48 Merge remote-tracking branch 'origin/master' into new-integer-protocols 2017-01-09 17:38:04 -08:00
Ben Cohen
578a52627a Merge branch 'master' into se-147 2017-01-07 13:19:15 -08:00
Ben Cohen
3bdada1773 Merge pull request #6506 from airspeedswift/im-not-warning-you-again
[stdlib] Squash various warnings
2017-01-06 16:51:06 -08:00
Max Moiseev
27889c6376 Merge remote-tracking branch 'origin/master' into new-integer-protocols 2017-01-06 15:54:44 -08:00
Nate Cook
6368857344 Merge pull request #6382 from natecook1000/nc-sort-median
[stdlib] Modify sort to pivot on median of 3
2017-01-06 14:27:53 -06:00
practicalswift
6d1ae2a39c [gardening] 2016 → 2017 2017-01-06 16:41:22 +01:00
Ben Cohen
fefc2e40df Migrate _copyContents to be called from UnsafeMutableBufferPointer with checks for overrun. 2017-01-05 11:59:49 -08:00
ben-cohen
ce0d713cd6 fixed where clauses, Optional-as-Any and unused vars 2016-12-29 07:58:12 -08:00
Doug Gregor
255fdb1d61 Fix some bogus bridging casts that were allowed in Swift 3.
Swift 3 unintentionally allowed collection casts from, e.g.,
Set<AnyHashable> to Set<NSObject>, when in fact the object
representation of the AnyHashable might not be an NSObject. Fix up our
tests and overlays that ran afoul of this rule.
2016-12-21 13:46:13 -08:00