David Smith
e7a007f231
InvalidStrideable.swift accidentally didn't catch the thing it was meant to test, and now just always crashes. This represents a small regression (possibly?) in diagnostic quality for an obscure edge case, but bringing that back can wait, we shouldn't leave the test crashing until then
2019-01-28 16:01:15 -08:00
Jordan Rose
a628d5d76a
Mark another thorough String test as requiring an optimized stdlib ( #21835 )
...
This one's taking a pretty long time on simulators, only sometimes
making it under the timeout limit.
2019-01-15 15:37:31 -08:00
Pavel Yaskevich
e25d7b3c32
[TypeChecker] NFC: Workaround "expression too complex" in StringNormalization test
...
Resolves: rdar://problem/47149976
Resolves: rdar://problem/46830020
2019-01-11 11:46:16 -08:00
Michael Ilseman
509aa6bc14
[test] Require -O stdlib for long-running test
2019-01-08 17:41:42 -08:00
Lance Parker
15aaa1e777
[stdlib]String normalization functions ( #21026 )
...
* fast/foreignNormalize functions
2019-01-08 13:55:29 -08:00
David Smith
4e4325d248
Merge pull request #21235 from Catfish-Man/cheaper-by-the-dozen
...
Adopt bulk Dictionary creation in bridging
2018-12-21 11:37:40 -08:00
David Smith
016ced2c44
Adopt the new bulk Dictionary initializer in bridging
2018-12-20 16:57:38 -08:00
Maxim Moiseev
1f5c0f8bd4
Fix PersistentVector prototype
2018-12-18 16:12:48 -08:00
Karoy Lorentey
f0e04f73f4
[stdlib] Process elements from back to front
2018-12-18 09:49:58 -08:00
Karoy Lorentey
039891c24b
[stdlib] Dictionary: Add support for non-unique keys in bulk loading init
2018-12-18 09:49:58 -08:00
Karoy Lorentey
f1f5e0f2bf
[stdlib] Dictionary: Add unsafe bulk-loading initializer
...
Interface inspired by this Array pitch:
https://forums.swift.org/t/array-initializer-with-access-to-uninitialized-buffer/13689
2018-12-18 09:49:58 -08:00
Karoy Lorentey
c8664c490d
[test] Dictionary: Add checks for expected failures in Dictionary bridging
2018-12-13 17:09:36 +00:00
Brent Royal-Gordon
eb81efe369
Update two diagnostics in validation tests
2018-12-12 13:01:38 -08:00
Michael Ilseman
647c60b6b1
Merge pull request #21217 from milseman/test_if_contiguous
...
[test] Test String.UTF8View.withContiguousStorageIfAvailable
2018-12-12 10:44:32 -08:00
John McCall
2ba7090fe8
Remove the extra-inhabitant value witness functions.
...
This is essentially a long-belated follow-up to Arnold's #12606 .
The key observation here is that the enum-tag-single-payload witnesses
are strictly more powerful than the XI witnesses: you can simulate
the XI witnesses by using an extra case count that's <= the XI count.
Of course the result is less efficient than the XI witnesses, but
that's less important than overall code size, and we can work on
fast-paths for that.
The extra inhabitant count is stored in a 32-bit field (always present)
following the ValueWitnessFlags, which now occupy a fixed 32 bits.
This inflates non-XI VWTs on 32-bit targets by a word, but the net effect
on XI VWTs is to shrink them by two words, which is likely to be the
more important change. Also, being able to access the XI count directly
should be a nice win.
2018-12-11 22:18:44 -05:00
Michael Ilseman
d6bee746ff
[test] Test String.UTF8View.withContiguousStorageIfAvailable
2018-12-11 11:57:05 -08:00
Ben Cohen
11769d2494
Add tests for withContiguousStorageIfAvailable
2018-12-07 17:30:13 -08:00
Ben Cohen
ad50a39b12
[stdlib] Add withContiguous{Mutable}StorageIfAvailable ( #21092 )
...
* Add MutableCollection.withContiguousMutableStorageIfAvailable
* Add withContiguousMutableStorageIfAvailable impls
* Add tests on concrete types
* Add Sequence.withContiguousStorageIfAvailable
* Implement withContiguousStorageIfAvailable in concrete types
2018-12-07 10:01:18 -08:00
Karoy Lorentey
b77351548a
Merge pull request #21045 from lorentey/modify-vs-throw
...
[stdlib] Dictionary: Support throwing yields in _modify accessors
2018-12-07 17:08:42 +00:00
Lance Parker
407a3fc34f
Put the requires back in its place
2018-12-05 11:42:22 -08:00
Lance Parker
f051d6b9e4
added an opaque flavor of the normalization tests
2018-12-05 11:42:22 -08:00
Karoy Lorentey
ce96f1e528
[stdlib] _modify: Use defer to ensure invariants are restored when yield throws
...
_modify mustn’t leave Collection storage in an inconsistent state when the code to which we’re yielding happens to throw. In practice this means that any cleanup code must happen in defer blocks before the yield.
Fix Dictionary to do just that and add tests to cover this functionality (as well as some other aspects of _modify).
2018-12-05 17:35:24 +00:00
Ben Cohen
fc7830a4ed
Remove Swift 3-only Compatibility Shims ( #21019 )
2018-12-04 18:22:27 -08:00
Lance Parker
da8ff3adee
Merge pull request #20889 from lancep/NFC-codeunit-tests
...
Add tests for normalizing random unicode strings
2018-12-04 16:36:09 -08:00
Lance Parker
135476d594
These tests require unicode 11
2018-12-04 11:25:04 -08:00
Michael Ilseman
c0c530aef8
[String] Speed up constant factors on comparison.
...
Include some tuning and tweaking to reduce the constant factors
involved in string comparison. This yields considerable improvement on
our micro-benchmarks, and allows us to make less inlinable code and
have a smaller ABI surface area.
Adds more extensive testing of corner cases in our existing
fast-paths.
2018-12-03 15:49:38 -08:00
Michael Ilseman
94942c5b3b
[String] Fix corner case in comparison fast-path. ( #20937 )
...
When in a post-binary-prefix-scan fast-path, we need to make sure we
are comparing a full-segment scalar, otherwise we miss situations
where a combining end-of-segment scalar would be reordered with a
prior combining scalar in the same segment under normalization in one
string but not the other.
This was hidden by the fact that many combining scalars are not
NFC_QC=maybe, but those which are not present in any precomposed form
have NFC_QC=yes. Added tests.
2018-12-03 10:41:45 -08:00
Karoy Lorentey
1ef6cf4813
Merge pull request #20866 from lorentey/deprecate-hashValue-1
...
[test] Modernize hashing throughout the test suite
2018-11-30 14:21:04 +00:00
Lance Parker
24e6a590b8
remove unecessary change to RUN: line
2018-11-29 15:32:17 -08:00
Lance Parker
dd700641d2
Add tests for normalizing random unicode strings
2018-11-29 14:53:01 -08:00
Karoy Lorentey
666a22feff
[test] Modernize hashing throughout the test suite
2018-11-29 17:38:29 +00:00
Saleem Abdulrasool
c9cf8fcd20
Merge pull request #20719 from compnerd/threading-extras
...
port SwiftPrivatePthreadExtras to Windows
2018-11-29 08:45:57 -08:00
Doug Gregor
411c124248
Merge pull request #20776 from DougGregor/remangle-old-ext-generic-args
...
[Mangle] Include generic arguments of extensions for the Objective-C runtime
2018-11-26 20:18:36 -08:00
swift-ci
68884b286c
Merge pull request #20768 from milseman/empty_range
2018-11-26 14:59:06 -08:00
Doug Gregor
cfc0f892e3
[Mangle] Include generic arguments of extensions for the Objective-C runtime
...
The remangler for the Objective-C runtime was dropping generic arguments
of extension contents, leading to collisions with @objc class names.
Include the generic arguments of extensions.
Fixes rdar://problem/45956357.
2018-11-26 13:51:40 -08:00
Saleem Abdulrasool
ce40d72641
stdlib: implement _stdlib_pthread_join in terms of Windows threading
...
Implement `_stdlib_pthread_join` in terms of windows threading.
Additionally, rename it to `_stdlib_thread_join`.
2018-11-26 13:10:00 -08:00
Saleem Abdulrasool
6bf7b9e711
stdlib: implement _stdlib_create_pthread_block in terms of Windows threaing
...
Port the block based thread constructor to Windows threading model, and
rename it to `_stdlib_create_thread_block`.
2018-11-26 13:10:00 -08:00
Saleem Abdulrasool
65bdce00b6
stdlib: rename _stdlib_PTHREAD_BARRIER_SERIAL_THREAD -> _stdlib_THREAD_BARRIER_SERIAL_THREAD
2018-11-26 13:10:00 -08:00
Saleem Abdulrasool
7b06586fe1
stdlib: rename _stdlib_pthread_barrier_t to _stdlib_thread_barrier_t
2018-11-26 13:09:49 -08:00
Saleem Abdulrasool
940db1b0cf
stdlib: remove pthread_attr_t from _stdlib_pthread_create_block
...
The attributes were not being used currently. Since this is a private
interface, remove the parameter as it makes it easier to port to
Windows.
2018-11-26 13:09:31 -08:00
Saleem Abdulrasool
82360c6b27
stdlib: remove pthread_barrier attributes
...
These were not in use, and removing this from the signature makes it
possible to re-use the exact signature on Windows more easily.
2018-11-26 13:09:31 -08:00
Saleem Abdulrasool
0693bec1f1
sdlib: rename SwiftPrivatePthreadExtras to SwiftPrivateThreadExtras
...
This is in preparation to make the code here more target agnostic for
porting to the Windows threading primitives. This is used pretty
extensively in the tests, so disabling tests would lose a chunk of
coverage.
2018-11-26 13:09:31 -08:00
Doug Gregor
d5f6d7f2cb
Merge pull request #20491 from DougGregor/runtime-conformance-descriptor-cache
...
[Runtime] Cache protocol conformance descriptors, not witness tables.
2018-11-26 12:56:23 -08:00
Michael Ilseman
4111b21cb0
[String] Bug fix for empty-range getCharacters
2018-11-26 12:13:23 -08:00
Karoy Lorentey
5e53e5b144
[test] Set: Add some tests for new index validation features in 5.0
2018-11-23 16:48:32 +00:00
Karoy Lorentey
92d355a4be
[test] Dictionary: Add some tests for new index validation features in 5.0
2018-11-23 16:48:23 +00:00
Karoy Lorentey
5d3768d7ff
[test] Add more tests for Set.update(with:)
...
rdar://problem/26013581
2018-11-23 12:50:06 +00:00
Karoy Lorentey
cc3b270691
[test] Set/Dictionary: Restore bucket-level tests for collision handling
2018-11-23 12:49:35 +00:00
Doug Gregor
d00a7b75c0
Revert "Update Set<AnyHashable> test case that no longer crashes"
...
This reverts commit 6abc8489ce .
2018-11-21 07:03:19 -08:00
Graydon Hoare
364be39f2a
<rdar://46174386> Restrict CharacterPropertiesLong test to optimized_stdlib configs.
2018-11-19 16:05:20 -08:00