David Smith
8b57921905
Assorted bridging changes:
...
• Convert _AbstractStringStorage to a protocol, and the free functions used to deduplicate implementations to extensions on that protocol.
• Move 'start' into the abstract type and use that to simplify some code
• Move the ASCII fast path for length into UTF16View.
• Add a weirder but faster way to check which (if any) of our NSString subclasses a given object is, and adopt it
2018-11-28 16:04:34 -08:00
Argyrios Kyrtzidis
5e7327714f
[api-digester] Add '-protocol-requirement-white-list' option to the digester for when diagnosing API breakage in SDKs
...
This option access a file that lists protocol names that are 'whitelisted' for getting new protocol requirements.
This allows the SDK checker to avoid flagging protocol method additions for protocols that we know are not intended
for user classes to conform to.
2018-11-28 15:01:39 -08:00
Argyrios Kyrtzidis
0413358f25
[api-digester] Don't report as API breaking when an ObjC protocol gets a new optional method
2018-11-28 11:59:20 -08:00
Slava Pestov
1cf17d9e7b
Merge pull request #20811 from slavapestov/weak-unowned-mangling
...
AST: Don't mangle weak/unowned as part of a property's type
2018-11-27 21:29:03 -05:00
swift-ci
d3bd4c5817
Merge pull request #20812 from milseman/sliced_guts
2018-11-27 17:45:23 -08:00
Michael Ilseman
e44972dcea
[String] Expunge _StringGutsSlice from ABI
...
_StringGutsSlice is an implementation helper that's no longer needed
from inlinable code. Internalize it.
2018-11-27 15:07:27 -08:00
Slava Pestov
0ec5ac282a
AST: Don't mangle weak/unowned as part of a property's type
...
LibraryEvolution.rst stipulates that adding or removing 'weak',
'unowned' and 'unowned(unsafe)' is a resilient change if the type
is resilient. This means we should not mangle these attributes as
part of the accessor declaration.
2018-11-27 18:04:25 -05:00
Harlan Haskins
245109d909
Merge pull request #20250 from harlanhaskins/accessorizing
...
[ParseableInterface] Standardize printing for accessors
2018-11-27 10:31:17 -08:00
Ben Rimmington
c5997491da
[stdlib] Remove Strideable closed range operator
2018-11-27 12:58:22 +00:00
Slava Pestov
86b5411a5a
stdlib: __SwiftNativeNSString does not need to be public
2018-11-27 00:16:34 -05:00
Harlan Haskins
a1c23be91a
[ParseableInterface] Standardize printing for accessors
...
We want to make sure we are consistent when printing accessors.
@jrose-apple and I landed on the following table for disambiguating all
the possible combinations of accessors:
\### Computed Properties
| Semantics | Syntax |
|------------|------------------------|
| Read-only | var x: T { get } |
| Read-write | var x: T { get set } |
\### Stored Properties
| Semantics | Syntax |
|--------------------------|-------------------------------------|
| Immutable | let x: T |
| Mutable (trivial setter) | var x: T |
| Mutable (custom setter) | @_hasStorage var x: T { get set } |
| Private(set) | @_hasStorage var x: T { get } |
This first commit enables printing @_hasStorage outside of SIL mode.
2018-11-26 18:40:37 -08:00
Karoy Lorentey
811d3d710e
[test] Update for RawRepresentable hashing changes
2018-11-22 17:16:07 +00:00
Ted Kremenek
6c8bed847f
Merge pull request #20374 from tkremenek/swift5-verison
...
Bump compiler version to Swift 5.
2018-11-16 04:30:08 -08:00
Ben Cohen
f86fc100a5
Ditch the underscore
2018-11-15 20:55:10 -08:00
Ben Cohen
1673c12d78
[stdlib] Replace "sanityCheck" with "internalInvariant" ( #20616 )
...
* Replace "sanityCheck" with "internalInvariant"
2018-11-15 20:50:22 -08:00
swift-ci
f76d920709
Merge pull request #20612 from DougGregor/runtime-demangle-to-metadata-overriode
2018-11-15 17:16:29 -08:00
Michael Ilseman
0a5177d778
Merge pull request #20605 from milseman/abi_publishing
...
Finish String and Unicode ABI audit
2018-11-15 14:03:28 -08:00
Karoy Lorentey
7df40769a4
Merge pull request #20509 from lorentey/not-quite-shadowy-enough
...
[stdlib] Unexport shadow protocols
2018-11-15 20:09:26 +00:00
Michael Ilseman
6576f6aa4e
[test] Update the API and ABI expected checks
2018-11-15 11:53:48 -08:00
Doug Gregor
a53b2e285c
[Standard library] Drop _typeByMangledName().
...
This underscored function was only intended for testing; drop it from the
ABI. We’re keeping _typeByName because it’s used by Foundation.
2018-11-15 11:06:52 -08:00
Karoy Lorentey
ca10375a48
[test] Remove spurious ABI change (?)
2018-11-15 15:10:07 +00:00
Karoy Lorentey
93a3ebe509
[stdlib] Make the rest of the shadow protocols internal
...
These shadow protocols don’t add any real type safety, and exposing them in the ABI seems unnecessary.
2018-11-15 09:54:25 +00:00
Karoy Lorentey
c4c4c17871
[stdlib] _BridgeStorage: Remove second type parameter (ObjCClass)
...
It used to be a shadow protocol existential, but now it’s invariably AnyObject.
I see no reason to keep supporting this unused abstraction.
2018-11-15 09:54:25 +00:00
Karoy Lorentey
0463230e2f
[stdlib] _SliceBuffer: Make the order of fields a bit more sensible
...
Also, move field declarations to the top of the struct.
2018-11-15 09:54:25 +00:00
Karoy Lorentey
ee17e975ca
[stdlib] Make protocol _NSArrayCore internal
...
These shadow protocols don’t add any real type safety, and exposing them in the ABI seems unnecessary.
2018-11-15 09:54:25 +00:00
Karoy Lorentey
c71abaaf51
[stdlib] Make protocol _NSNumber internal
2018-11-15 09:54:25 +00:00
Karoy Lorentey
4f8eeae64e
[stdlib] Make _NSSetCore, _NSSet internal
...
These shadow protocols don’t add any real type safety, and exposing them in the ABI seems unnecessary.
2018-11-15 09:54:25 +00:00
Karoy Lorentey
096903732c
[stdlib] Make _NSDictionaryCore, _NSDictionary internal
...
These shadow protocols don’t add any real type safety, and exposing them in the ABI seems unnecessary.
2018-11-15 09:54:25 +00:00
Ted Kremenek
4562cc6971
Incorporate changes for Swift 5 version mode.
2018-11-14 18:43:57 -08:00
Lance Parker
146fea489b
update ABI checker test
2018-11-14 13:23:08 -08:00
Ben Cohen
df2307e035
[stdlib][DNM] Collapse sequence and collection wrappers ( #20221 )
...
* Concretize dropFirst/Last/sufix/prefix from Sequence
Remove split customization point
Eliminate SubSequence from Sequence protocol
Collapse LazyCollection
Collapse LazyMapCollection
Eliminate _SequenceWrapper
Collapse LazyFilterCollection
Collapse LazyDrop/PrefixWhileCollection
Fix tests, ABI stability update
Collapse FlattenSequence
* Add entries to source/ABI compatible expected results.
* Update tests to avoid pre-10.14 objc runtime bug
* Expunge _preprocessingPass
2018-11-14 10:05:58 -08:00
Karoy Lorentey
671de071c6
[stdlib] Audit @_fixed_layout usage in collection storage classes
...
- Remove __SwiftNativeNSEnumerator from the ABI. (It’s only used in internal classes and in the Objective-C runtime.)
- Remove inlinability of init() and deinit for all the __SwiftNativeNSFoo superclasses except Array’s and Data’s.
2018-11-12 20:53:10 +00:00
Michael Ilseman
9315b3a190
Merge pull request #20438 from milseman/uniterator
...
[String] Custom Iterators for String Views
2018-11-11 16:14:13 -08:00
Richard Wei
aeadc14f32
Merge branch 'master' into additive-arithmetic
2018-11-09 17:27:22 -08:00
Michael Ilseman
b19f8ccda6
Merge pull request #20480 from milseman/fixed_nixed
...
[stdlib] Expunge FixedArray from ABI
2018-11-09 16:15:29 -08:00
swift-ci
40f45f7c67
Merge pull request #20477 from eeckstein/stringswitch-abi
2018-11-09 15:35:14 -08:00
Michael Ilseman
24a95992f9
Merge branch 'master' into uniterator
2018-11-09 15:08:25 -08:00
swift-ci
8e4503abed
Merge pull request #20479 from milseman/dce
2018-11-09 14:42:46 -08:00
Richard Wei
c0268518df
Merge branch 'master' into additive-arithmetic
2018-11-09 14:28:36 -08:00
Erik Eckstein
1a02650c25
stdlib: remove all FIXME(sil-serialize-all) attributes in StringSwitch.swift
...
Those attributes were generated automatically, but are not needed.
All the annotated declarations are only used stdlib internally
rdar://problem/45927899
2018-11-09 14:27:29 -08:00
Michael Ilseman
08d83d0678
[stdlib] Expunge FixedArray from ABI
2018-11-09 13:47:22 -08:00
Michael Ilseman
4ddfd30787
[stdlib] Remove dead code
2018-11-09 13:39:59 -08:00
Richard Wei
4e2147e6f8
Merge branch 'master' into additive-arithmetic
2018-11-09 10:17:58 -08:00
Michael Ilseman
103861b31f
Merge branch 'master' into uniterator
2018-11-09 10:17:05 -08:00
Karoy Lorentey
51be8c7650
[stdib] Remove RandomNumberGenerator._fill(bytes:)
...
This hidden customization point isn’t used in the stdlib anymore.
2018-11-09 17:37:25 +00:00
Karoy Lorentey
d6868edcf9
[test] Confess ABI changes
2018-11-09 10:38:15 +00:00
Michael Ilseman
75943350d2
[String] Give String a custom iterator
...
Gives us modest wins on complex grapheme strings, but up to 40% on
heavy-ASCII strings.
2018-11-08 18:25:01 -08:00
Michael Ilseman
abe101c5b9
[String] Custom iterator for UnicodeScalarView
...
Provide a custom iterator rather than relying a the IndexingIterator,
as an indexing model is less efficient for stateful processing of
strings. Provides around a 30% speedup.
2018-11-08 18:00:39 -08:00
Richard Wei
da50193c93
Update ABI test
2018-11-08 17:07:16 -08:00
David Smith
96691208e9
Bridged Strings should have some different/additional overrides for performance
2018-11-08 11:08:03 -08:00