Commit Graph

19 Commits

Author SHA1 Message Date
Kuba (Brecka) Mracek
8b189d99e4 Turn off SWIFT_ENABLE_REFLECTION on the stdlib_minimal preset (#39030) 2021-09-12 18:54:53 -07:00
Arnold Schwaighofer
b31b7a9d8e Remove some UNSUPPORTED swift_test_mode_optimize_none_with_implicit_dynamic
rdar://51228899
2019-05-31 08:45:37 -07:00
Arnold Schwaighofer
e113ef8c93 Add a mode to test implicit dynamic with private imports 2019-03-20 14:34:01 -07:00
Michael Ilseman
fe7c3ce2e4 [String] Refactorings and cleanup
* Refactor out RRC implementation into dedicated file.

* Change our `_invariantCheck` pattern to generate efficient code in
  asserts builds and make the optimizer job's easier.

* Drop a few Bidi shims we no longer need.

* Restore View decls to String, workaround no longer needed

* Cleaner unicode helper facilities
2018-11-04 10:42:40 -08:00
Arnold Schwaighofer
2d8a1dbbfe Codesign test/stdlib 2018-08-10 06:58:40 -07:00
Ben Cohen
685f31b0e2 [stdlib] Migrate stdlib tests of Swift 3 (#17427)
* First sweep of Swift 3 stdlib test upgrades

* Review feedback

* Remove a handful more #if >=4.0

* Fix up Dictionary tests
2018-07-08 09:37:01 -07:00
Ben Cohen
a4230ab2ad [stdlib] Update stdlib to 4.0 and reorganize compatibility shims (#17580)
* Update stdlib to 4.0 and move all compatibility shims into a dedicated source file
2018-06-29 06:26:52 -07:00
Ben Cohen
f9b3e14137 [stdlib] Use Swift-native Character iteration for hasPrefix/Suffix (#14390)
* Use Swift-native Character iteration for hasPrefix/Suffix

* Remove old tests for removed C shims
2018-03-12 17:41:55 -07:00
Saleem Abdulrasool
b67d5f0cf7 test: convert rm -rf && mkdir -p into %empty-directory
This converts the instances of the pattern for which we have a proper
substitution in lit.  This will make it easier to replace it
appropriately with Windows equivalents.
2018-03-06 14:30:54 -08:00
Ben Cohen
4ddac3fbbd [stdlib] Eradicate IndexDistance associated type (#12641)
* Eradicate IndexDistance associated type, replacing with Int everywhere

* Consistently use Int for ExistentialCollection’s IndexDistance type.

* Fix test for IndexDistance removal

* Remove a handful of no-longer-needed explicit types

* Add compatibility shims for non-Int index distances

* Test compatibility shim

* Move IndexDistance typealias into the Collection protocol
2017-12-08 12:00:23 -08:00
Doug Gregor
772352e524 Add requirement StringProtocol.SubSequence : StringProtocol 2017-10-01 15:08:23 -07:00
Arnold Schwaighofer
c665c326d4 Add missing REQUIRES: executable_test
To get check-swift-only_non_executable clean again.
2017-09-12 14:50:15 -07:00
Michael Ilseman
3243b8a59f [stdlib] Availability checking for String.*View.popFirst
Collection's popFirst is only present when the Collection is its own
SubSequence type. String and String's views are no longer their own
SubSequenes, so popFirst is no longer present. Unfortunately, this
breaks code in swift-version 3 and it also gives a terrible diagnostic
to users. This change introduces an implementation for swift-version 3
mode and better diagnostics for Swift 4 code. Tests included.
2017-08-09 19:41:52 -07:00
Dave Abrahams
05ff40d125 [stdlib] Backward-compatible String.UTF8View slicing
When slicing String.UTF8View in Swift 3 mode, in the absence of type
context, produce String.UTF8View.
2017-07-20 14:54:16 -07:00
Dave Abrahams
38828872b9 [stdlib] Add missing unwraps for backward compatibility
Otherwise, the result would have been an infinite recursion.
2017-07-14 15:30:06 -07:00
Dave Abrahams
e59cb97048 [stdlib/Foundation] Swift 3 backward compatibility hack
Since samePosition(in:) now unconditionally returns optionals,
String.UTF16View.Index.distance(to: String.UTF16View.Index) must accept an
optional to keep some code working.

Fixes <rdar://33307780>.
2017-07-14 15:30:06 -07:00
Dave Abrahams
807410b99e [stdlib] Make String("...") non-failable in Swift 4 2017-05-24 16:11:34 -07:00
Maxim Moiseev
8876655f6b [stdlib] Reverting the String.init?(_: String) behavior (#9659) 2017-05-17 13:56:15 -07:00
Max Moiseev
12f8b390c1 [stdlib] Mark String.init?(_: String) obsoleted in Swift 4
It is still possible to get the same behavior by providing an explicit
type context, or in a generic code, but otherwise, `String("")!` will
not compile.
2017-05-13 11:45:26 -07:00