This code as written is not sound and should not type check
for non-final classes conforming to SequenceType (eg, NSArray).
Instead, capture the base of the call from the preprocess closure
passed in. The closure is @noescape, so it should be equivalent.
This brings down StdlibUnittest build time to 90 seconds with either
a DebugAssert or a ReleaseAssert compiler.
The new library, StdlibCollectionTests, is only built when running
validation tests.
The Generator interface is specialized for iteration and is often faster than indexing.
Using _initialize_to results in a ~10% speedup for Dictionary. For collections with more complex iteration state (such as search trees with O(log(n)) indexing), this leads to a complexity class improvement.
This requires a small change to the testsuite, because the generate() method of Defaulted*RangeReplaceableSlice called Array(self), which now leads to infinite recursion.
https://bugs.swift.org/browse/SR-610
This reverts commit 29214253e5.
This change massively regresses test execution times for DebugAssert builds, where we won't currently benefit from this added validation.
Moving forward, we'll scope this exclusively to optimized builds.
This reinstates commit 79517a8edf.
Let's try again. All blocking problems should be resolved now.
Compiling StdlibUnittest with -sil-serialize-all gives a much higher test coverage because we can inline and optimize unittest code togeter with the test file.
It already helped to uncover some compiler bugs which we wouldn't have found without this change.
On the downside, a test-run in optimized mode takes considerable longer than before, because some tests need much longer to compile.
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.
`++` operators were being used for the implementation of a
StdlibUnittest helper function, in environments where the
Objective-C runtime was unavailable. Replace these with
successor functions.
Overriding `AnySequence.dropFirst` and `AnySequence.prefix` to delegate
these operations to an underlying sequence, thus simplifying default
implementations in `Sequence`.
There is absolutely no point in making this a runtime check, because
the library will be built differently on the different platforms
anyway. We only need to determine the version at runtime.