SwiftPrivateDarwinExtras is used by non-Darwin platforms as well; its
name is misleading. Rename it to SwiftPrivateLibcExtras, which is
closer to its actual function.
The default mirror tries to access implementation details of the
generator, accessing the 'description' property of the storage, which is
an NSDictionary subclass. The default implementation of -[NSDictionary
description] tries to print the dictionary contents. But if the
Swift.Dictionary can't be bridged to NSDictionary, that causes a runtime
trap.
rdar://problem/24238609
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.
`++` 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`.