Skip to content

Import the Foundation overlay codebase from the Swift repository #2915

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1,591 commits into from
Nov 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1591 commits
Select commit Hold shift + click to select a range
0cd81b9
Refactor the looking for existing container code and change the error…
pitiphong-p Dec 4, 2018
19219b1
Added: Expected to failed test cases on requesting an already request…
pitiphong-p Dec 4, 2018
e5fc736
NIT fixing and add some comments in the test methods
pitiphong-p Dec 5, 2018
6539d9d
Uses the `expectCrash` instead of `xfail` in the Encoder Tests
pitiphong-p Dec 8, 2018
d9351e5
[Foundation] Update hashing for bridged Error/NSError types
lorentey Dec 5, 2018
d312d6f
[Foundation] _Bridged[Stored]NSError: Remove explicit impls for hashV…
lorentey Dec 10, 2018
7fb4666
[Foundation] CocoaError.Code, URLError.Code: Remove hashValue impleme…
lorentey Dec 10, 2018
a42026b
Initial draft of DataProtocol ContiguousCollection and new inline Data
phausler Oct 25, 2018
f145d2c
Merge pull request #20225 from phausler/inline_data_and_dataprotocol
Dec 13, 2018
509d2ea
Build crash fix: AnyObject -> NSDictionary
millenomi Dec 13, 2018
c7be592
[Foundation] Fallback to presuming 32-bit platforms if we dont explic…
phausler Dec 13, 2018
64cc96e
Add #available checks for NSKeyedArchiver methods in tests
Dec 13, 2018
408ac15
Merge pull request #21297 from millenomi/fix-crash-init-cocoaDictionary
millenomi Dec 13, 2018
2307118
Revert "[Foundation] Fallback to presuming 32-bit platforms if we don…
phausler Dec 13, 2018
588ec94
Merge pull request #21301 from itaiferber/fix-nskeyedarchiver-availab…
Dec 13, 2018
030b54e
Merge pull request #21308 from phausler/revert_32_bit_data_check
swift-ci Dec 14, 2018
12272bf
Adopt the new bulk Dictionary initializer in bridging
Catfish-Man Dec 11, 2018
0807881
Migrate Data from hashValue to hash(into:)
Jan 8, 2019
a64aeda
Refine inlinability of _DataStorage
Jan 8, 2019
8ee8e03
Refine inlinability of InlineData
Jan 8, 2019
3a1b85c
Annotate inlinability of InlineSlice
Jan 8, 2019
1759bc4
Refine inlinability of LargeSlice and RangeReference
Jan 8, 2019
2ee374a
Refine inlinability of _Representation
Jan 8, 2019
8eac6ea
Refine inlinability of Data and Data.Iterator
Jan 9, 2019
97b1bcb
Remove Data.hashValue==NSData.hashValue test
Jan 10, 2019
867d604
Add buffering to worst-case scenarios in Data.init<S>/.append<S>
Jan 10, 2019
c2ff433
Account for Int vs. UInt8 in InlineData.hash(into:)
Jan 10, 2019
b3a4489
Correct buffering in .init<S> and .append<S> and add unit test
Jan 11, 2019
4a33887
Remove unnecessary @inlinable annotations on hash(into:)
Jan 11, 2019
29fb663
Clarify new append tests
Jan 11, 2019
d80dce4
Typo fixes in tests
Jan 11, 2019
7428526
Merge pull request #19532 from dlbuckley/SR-8649_ranges_codable
Jan 14, 2019
cec6558
[Stdlib][Overlays] Rename various classes to avoid conflicting ObjC n…
mikeash Dec 14, 2018
fd91e7f
[Stdlib] Fix botched merge conflict resolution in Data.swift.
mikeash Jan 15, 2019
3b42dc7
[stdlib][Foundation] Avoid coexistence conflicts with JSONEncoder/Dec…
mikeash Jan 17, 2019
a1e6f6b
[String] Add UTF-8 fast-paths for Foundation initializers
milseman Jan 17, 2019
11a1945
Merge pull request #21959 from milseman/fast_foundation
milseman Jan 23, 2019
2196944
[SR-7076] Codable tests for ContiguousArray
benrimmington Jan 29, 2019
dd7e77e
[Foundation] Rename swift_errorBridgingInfo so it doesn't conflict wi…
DougGregor Jan 30, 2019
26b84cb
[SDK] Fix thread safety of KVO swizzling
lilyball Oct 25, 2018
00dc4c3
[SDK] Fix potential race with NSKeyValueObservation
lilyball Oct 25, 2018
c2253a0
[SDK] Fix NSSortDescriptor.keyPath
lilyball Oct 25, 2018
7fc6444
[SDK] Replace global KeyPath table with a per-thread table
lilyball Oct 26, 2018
30b25c1
[SDK] Clean up the KVO swizzles slightly
lilyball Nov 14, 2018
71ebe33
Rebase master; move this to use NSSet, not AnyObject.
millenomi Jan 30, 2019
d770c21
Merge pull request #22209 from benrimmington/sr-7076-tests
Jan 30, 2019
368505c
Merge pull request #20103 from lilyball/fix_kvo
millenomi Jan 30, 2019
5b25ab6
Update master to build with Xcode 10.2 beta 1
shahmishal Jan 31, 2019
cb9e0b7
Revert "Merge pull request #20103 from lilyball/fix_kvo"
millenomi Feb 1, 2019
07f5eaf
Take 2 of “[SDK] Fix multiple issues with Swift KVO”
millenomi Feb 1, 2019
ab9f046
Merge pull request #22274 from apple/update-master-xcode-10.2-beta-1
shahmishal Feb 2, 2019
3db104b
Merge pull request #22311 from millenomi/fix_kvo-take-2
millenomi Feb 2, 2019
6b9de2f
Merge pull request #20951 from pitiphong-p/encoders-nested-key-edge-c…
jrose-apple Feb 4, 2019
4ea6de4
Add unit tests covering Data.init<T>(buffer: Unsafe{Mutable}BufferPoi…
Feb 11, 2019
180c315
Add a safe API for NSValue and migrate NSValue value fetching to the …
phausler Feb 13, 2019
8c45e71
[String.Index] Deprecate encodedOffset var/init
milseman Jan 26, 2019
1686853
Merge pull request #22108 from milseman/en_gadus_offset
milseman Feb 19, 2019
f9770f4
[Foundation] NSSet, NSDictionary: Use as! casts to force-bridge elements
lorentey Mar 2, 2019
73d4f2f
Fix off-by-one when initializing Data with discontiguous, underestima…
Mar 12, 2019
9bf6d7f
Merge pull request #23244 from itaiferber/data-underestimated-sequenc…
Mar 13, 2019
0a740da
[Foundation] Collapse `as AnyObject as! Foo` cast sequences
lorentey Mar 15, 2019
3a8f5a0
Merge pull request #23174 from lorentey/tacoma-narrows
swift-ci Mar 15, 2019
2b645dd
test: temporarily disable several failing tests on CI. rdar://49026133
nkcsgexi Mar 19, 2019
1200fd2
Add a mode to test implicit dynamic with private imports
aschwaighofer Mar 18, 2019
68709bb
test: temporarily disable stdlib/TestJSONEncoder.swift
nkcsgexi Mar 22, 2019
3b3ee3f
Merge pull request #23491 from nkcsgexi/49161053
nkcsgexi Mar 22, 2019
6aadec9
Refactor if statements in URL.swift
Luigi123 Mar 23, 2019
8afcb15
[String] Add generic String.Index and range inits within a String
milseman Feb 26, 2019
a8c3b84
[stdlib] Change the signature of Dictionary’s bulk initializer (#23758)
lorentey Apr 3, 2019
b1ef771
Avoid O(n) copies when bridgable NSData objects are available
phausler Apr 4, 2019
7a1d389
[TestJSONEncoder] Re-enable tests and add a special case to handle a …
bendjones Apr 4, 2019
cbd79c9
[Foundation] IndexPath: Add explicit hash(into:) definition, hashing …
lorentey Feb 9, 2019
383570b
[Foundation] NSRange: Add an explicit definition for hash(into:)
lorentey Feb 9, 2019
b5abdcc
[Foundation] Calendar: Modernize hashing
lorentey Feb 9, 2019
6a5cbc7
[Foundation] CharacterSet: Modernize hashing
lorentey Apr 4, 2019
146130a
[Foundation] String.Encoding: Modernize hashing
lorentey Apr 4, 2019
4f35ef3
[Foundation] AffineTransform: modernize hashing
lorentey Apr 5, 2019
454cc4e
[Foundation] Date: Modernize hashing
lorentey Apr 5, 2019
c61bced
[Foundation] DateComponents: Modernize hashing
lorentey Apr 5, 2019
488bb46
[Foundation] DateInterval: Modernize hashing
lorentey Apr 5, 2019
f9b3431
[Foundation] Decimal: Modernize hashing
lorentey Apr 5, 2019
804ffcb
[Foundation] Locale: Modernize hashing
lorentey Apr 5, 2019
9bc35c0
[Foundation] IndexSet: Modernize hashing
lorentey Apr 5, 2019
3ea211b
[Foundation] IndexPath: Modernize hashing
lorentey Apr 5, 2019
8b18ad7
[Foundation] Notification: Modernize hashing
lorentey Apr 5, 2019
ae5c8e7
[Foundation] NSRange: Modernize hashing
lorentey Apr 5, 2019
562b6ec
[Foundation] TimeZone: Modernize hashing
lorentey Apr 5, 2019
f07b8e1
[Foundation] URL: Add hash(into:) implementation
lorentey Apr 5, 2019
4999448
[Foundation] URLComponents: Modernize hashing
lorentey Apr 5, 2019
76d56b9
[Foundation] URLRequest: Modernize hashing
lorentey Apr 5, 2019
a601e3f
[Foundation] UUID: Modernize hashing
lorentey Apr 5, 2019
c05f33e
[Foundation] PersonNameComponents: Modernize hashing
lorentey Apr 5, 2019
a062aa7
[Foundation] Measurement: Fix hashing
lorentey Apr 5, 2019
e927b97
[Foundation] Data: Hash the entire contents, not just an arbitrary su…
lorentey Apr 5, 2019
0fa4da5
[Foundation] URL: Fix availability of the new hash(into:) implementation
lorentey Apr 6, 2019
eccf550
[Foundation] URL is actually already Hashable
lorentey Apr 9, 2019
36f2bc6
[Foundation] Fix bizarre indentation issues
lorentey Apr 9, 2019
e259061
Revert "[Foundation] Data: Hash the entire contents, not just an arbi…
lorentey Apr 9, 2019
88768b5
[TestJSONEncoder] - Originally we thought the level of precision requ…
bendjones Apr 9, 2019
1ead74c
appendingPathComponent(:isDirectory:) should account for isDirectory
Coeur Apr 10, 2019
492f690
[Foundation] Notification: Add note on == not being reflexive and sta…
lorentey Apr 12, 2019
4d81e27
Fix doc typo on `yearForWeekOfYear` case in `DateComponents`
yigitcanyurtsever Apr 13, 2019
258ead3
fix warnings
Gumichocopengin8 Apr 18, 2019
6373d99
change var to let
Gumichocopengin8 Apr 18, 2019
1f0af4e
[String] [Foundation] perf: UTF8 String -> Data
ianpartridge Apr 23, 2019
71196f5
[test] TestNotification: Fix checkHashable invocation
lorentey Apr 24, 2019
cbb96b3
[test] TestPersonNameComponents: adjust OS check for hashing
lorentey Apr 25, 2019
67ff8dc
Merge pull request #23832 from lorentey/foundation-hashing
lorentey Apr 26, 2019
0a64e25
Merge remote-tracking branch 'origin' into fix-build-warnings
Gumichocopengin8 May 1, 2019
99efe52
Fix bounds check in bridged ASCII String comparison
Catfish-Man May 3, 2019
8c4ea16
[test] Add availability guards on Foundation hashing tests
lorentey May 4, 2019
2362f0b
[Foundation] Fix availability of NSValue.value(of:)
lorentey May 4, 2019
96e54d9
Merge pull request #24496 from lorentey/stdlib-version-checks-alt
lorentey May 6, 2019
ea021b4
[test] TestNotification: Check availability before running hashing test
lorentey May 7, 2019
ee7c66d
Merge pull request #24127 from Gumichocopengin8/fix-build-warnings
swift-ci May 13, 2019
dc79551
[gardening] Remove unnecessary breaks
ikesyo May 14, 2019
d2110dd
[Test] Add runtime 9999-availability check for a new test in Swift 5.1
bob-wilson May 14, 2019
1961979
Merge pull request #24498 from lorentey/nsvalue-availability
bob-wilson May 14, 2019
84ba611
Add tests and validate Data and DispatchData as sequences
phausler May 13, 2019
1dc8bb3
Revert "[Foundation] Fix availability of NSValue.value(of:)"
beccadax May 15, 2019
66a925c
Merge pull request #23793 from phausler/data_mapped_perf_bug
swift-ci May 15, 2019
22294f2
Foundation: Provide a Hashable.hashValue witness for _BridgedStoredNS…
slavapestov May 17, 2019
38567f2
[stdlib] Improve error messages when snake case conversion is used.
May 19, 2019
bf570e4
[Foundation]Fix newValue/oldValue in swift KVO when keyPath having a …
zetasq Apr 28, 2019
ce3d98a
Fix `DataProtocol.lastRange(of:)` (and cherry-pick Data.swift changes…
ikesyo May 25, 2019
1f6e814
Merge pull request #24767 from ikesyo/remove-unnecessary-breaks
swift-ci May 25, 2019
ca74709
[gardening] Use `Collection.isEmpty` over `Collection.count`
ikesyo May 26, 2019
37cc712
[gardening] Avoid fallthrough where appropriate (for readability/unde…
ikesyo May 26, 2019
aecaed7
Merge pull request #25067 from ikesyo/avoid-fallthrough-where-appropr…
ikesyo May 28, 2019
bafb859
Merge pull request #25065 from ikesyo/fix-dataprotocol-lastrange
May 28, 2019
0bdc02c
De-underscore @frozen, apply it to structs (#24185)
airspeedswift May 31, 2019
f54f65a
Remove some UNSUPPORTED swift_test_mode_optimize_none_with_implicit_d…
aschwaighofer May 31, 2019
e231a0e
[redux][Foundation] Fix availability of NSValue.value(of:) (#25179)
lorentey Jun 1, 2019
6a81b3c
[Foundation] Bridge difference APIs between Foundation and swift stdlib
numist Jun 11, 2019
6348f14
[Foundation] Temporarily revert to 9999 versions
lorentey Jun 11, 2019
2eaae45
Sema: Go back to synthesizing hashValue on _StoredBridgedNSError conf…
slavapestov Jun 11, 2019
fe6eab4
Merge pull request #25345 from lorentey/foundation-diff-apis
lorentey Jun 11, 2019
c92b1f9
Revert "Sema: Go back to synthesizing hashValue on _StoredBridgedNSEr…
slavapestov Jun 11, 2019
b78fc1b
Foundation: Manually define hashValue witnesses for CocoaError, URLEr…
slavapestov Jun 11, 2019
dd29a80
[Foundation] Set correct availability on NSValue.value(of:)
lorentey Jun 14, 2019
eacd5e9
Merge pull request #24904 from GeorgeLyon/master
swift-ci Jun 14, 2019
049c7dc
[Foundation]: Adding detailed documentation for NSLocalizedString
libsteve Jun 15, 2019
d27190b
Merge pull request #25454 from lorentey/nsvalue-availability
lorentey Jun 17, 2019
da4e6a5
Fixed some grammar and changed some wording
libsteve Jun 18, 2019
1460113
Use headers that describe the section's purpose
libsteve Jun 22, 2019
97cefa6
Use `- note:` syntax
libsteve Jun 22, 2019
e3ed373
Use more formal wording
libsteve Jun 22, 2019
056bc06
Remove extra information from parameter description
libsteve Jun 22, 2019
0f88080
Remove the default value from the parameter description
libsteve Jun 22, 2019
3c010f2
`key` must not be the empty string
libsteve Jun 22, 2019
1cdd93e
Add reason why `key` can't be empty
libsteve Jun 22, 2019
c367259
Describe the behavior of `value` without mentioning its default value
libsteve Jun 22, 2019
3f4b3f0
Reword returns section without bullets
libsteve Jun 22, 2019
8f30e5f
Focus on what to do and why to do it
libsteve Jun 22, 2019
e1e8896
[Foundation] Fix two Decimal members with respect to NaN (#25698)
xwu Jun 25, 2019
280c850
[gardening] Sync formatting for constants with sclf version
xwu Jun 25, 2019
d8d2b6a
Note major divergences with sclf in implementation
xwu Jun 25, 2019
36dee58
[NFC] Use sclf implementation of + - * / operators, move them and `ne…
xwu Jun 25, 2019
0b1745e
Apply fix for SR-3126 and other changes to sync Decimal.init(_: Doubl…
xwu Jun 25, 2019
9739a37
[NFC] Reorder Decimal protocol conformances to match documentation or…
xwu Jun 25, 2019
ae2bef8
[NFC] Consolidate Decimal FloatingPoint implementations into one exte…
xwu Jun 25, 2019
54db024
[gardening] Update copyright year
xwu Jun 25, 2019
dcc47cc
Performance improvements and availability updates for Collection.diff…
numist Jun 26, 2019
7b777b5
Fix verb tense disagreement
libsteve Jun 29, 2019
65e2c49
Correct spelling mistakes and typos
libsteve Jun 29, 2019
65b020d
"Must" must not be used outside a precondition
libsteve Jun 29, 2019
2a2420f
Fix wording for manual string management header
libsteve Jun 29, 2019
b212ef8
Capitalize the w in with
libsteve Jun 29, 2019
5bbc230
Bridge non-ASCII SmallStrings as native Swift Strings rather than by …
Catfish-Man Jun 28, 2019
04ca77d
Merge pull request #25866 from Catfish-Man/someone-set-up-us-the-bom
Catfish-Man Jul 3, 2019
f5f7937
Revert "Capitalize the w in with"
natecook1000 Jul 3, 2019
afa0ea4
Add test for pow(_: Decimal, _: Int)
xwu Jul 5, 2019
6f01fb2
Merge pull request #25503 from stevebrun/stevebrun/NSLocalizedString-…
swift-ci Jul 5, 2019
60166b8
Merge pull request #25745 from xwu/sync-decimal
xwu Jul 5, 2019
696fc89
[Darwin] Fix ABI breaks introduced since 5.1
lorentey Jul 9, 2019
ca5ead0
Replace stdlib and test/stdlib 9999 availability. (#26108)
stephentyrone Jul 12, 2019
d39362e
Restore more-correct behavior of getting the full contents of bridged…
Catfish-Man Jul 15, 2019
b1e7bec
Let NSMutableDictionary check for -copy on keys, rather than doing it…
Catfish-Man Jul 17, 2019
2279570
Merge pull request #26194 from Catfish-Man/if-it-quacks-like-a-key
swift-ci Jul 18, 2019
4d96a7d
Merge pull request #24356 from zetasq/zetasq-fix-KVO
swift-ci Jul 25, 2019
8a03fde
Redo CFStringCreateWithBytes shim
Catfish-Man Aug 9, 2019
e3623cc
Remove warnings from TestJSONEncoder compilation.
drodriguez Sep 5, 2019
f188bff
[doc] Avoid use of “iff” in public API documentation
lorentey Sep 11, 2019
af82665
TestDecimal.swift fails when backporting to pre-macOS10.15/iOS13
phausler Oct 19, 2019
658a237
TestData.swift fails when backporting to pre-macOS10.15/iOS13
phausler Oct 19, 2019
1793832
[test] xfail several stdlib tests failing in CI
nkcsgexi Oct 25, 2019
48dcf5c
Fix reference to `range(of:)` in the contains doc
lucatorella Nov 29, 2018
ba854b4
Use precondition instead of fatalError in DateInterval initializer
ogres Nov 3, 2017
5d164ee
IndexSet.union performance improvement
Jul 1, 2018
8103c8e
[Foundation] Reorder _DataStorage to save 14 bytes of overhead
phausler Mar 5, 2018
a1ebe28
Merge pull request #28327 from CodaFi/do-it-for-the-datagrams
swift-ci Nov 18, 2019
80fc99c
[Foundation][runtime] Remove swift_errorBridgingInfo
lorentey Dec 10, 2019
ca7d0db
[stdlib][Qol] SR-11295 Removing stdlib unnecessary coercions (#27165)
LucianoPAlmeida Dec 11, 2019
3aae97d
Merge pull request #28685 from lorentey/i-heard-you-like-runtime-so-i…
lorentey Dec 11, 2019
1cf2e3b
[Foundation] DataProtocol: Reimplement firstRange(of:in:)/lastRange(o…
YOCKOW Sep 2, 2019
65a71a2
[Foundation] Add tests for [SR-10689](https://bugs.swift.org/browse/S…
YOCKOW Dec 8, 2019
90cc3a0
[Foundation] Remove inlinable shim calls
lorentey Dec 21, 2019
92b9803
[Foundation] Switch to private imports of Foundation shims
lorentey Dec 21, 2019
6341e47
[Foundation] Fix Data.count’s setter
lorentey Dec 21, 2019
47430c5
Merge branch 'fix-Data.count-setter' into foundation-no-inlinable-shi…
lorentey Dec 21, 2019
a234136
[Foundation] Fix potential backdeployment regression in append
lorentey Jan 9, 2020
ee520c0
[Foundation] Switch to private imports of CoreFoundation shims
lorentey Jan 22, 2020
1393786
[stdlib] Update one String initializer and client to use @_spi
xymus Feb 6, 2020
b6c1f70
[NFC][Foundation] Remove or replace unnecessary uses of 'fileprivate'
xwu Feb 23, 2020
c91003b
Update master to build with Xcode 11.4
shahmishal Mar 24, 2020
fd753b6
Merge branch 'master' into foundation-no-inlinable-shim-calls
lorentey Apr 1, 2020
df1bc81
test: disable stdlib/TestData.swift due to rdar://61347106
nkcsgexi Apr 6, 2020
eb1a1b9
Removes redundant buffer zeroing in _persistCString func
valeriyvan Apr 18, 2020
2012802
[Foundation] Adjust stray public import of _SwiftFoundationOverlayShims
lorentey Apr 28, 2020
407a48a
[shims] Re-add Foundation shims removed in #28918
lorentey Apr 28, 2020
cf7121d
Revert "test: disable several tests failing in CI"
lorentey Apr 30, 2020
fbc3ff2
NFC: fix stdlib compilation warning. (#31509)
dan-zheng May 5, 2020
1f38318
Merge branch 'master' into RemoveRedundantBufferZeroingNSStringAPI
valeriyvan May 5, 2020
986e1dd
Revert "[Foundation] Fix potential backdeployment regression in append"
lorentey May 6, 2020
34a7e86
[Foundation] Data.append: Switch to using resetBytes(in:)
lorentey May 6, 2020
acc2cc4
[test] Data: Add tests exercising Sequence-based init and append
lorentey May 6, 2020
4d33a5e
Disable test that is known to fail in asan
aschwaighofer May 6, 2020
e354d84
Merge branch 'master' into RemoveRedundantBufferZeroingNSStringAPI
valeriyvan May 6, 2020
d647d4d
Merge pull request #31601 from lorentey/data-append
lorentey May 7, 2020
8ed3d2a
Revert "Disable test that is known to fail in asan"
lorentey May 7, 2020
31c82b8
[overlay] Remove unnecessary Optional unwrapping
ApolloZhu May 10, 2020
4c6e2ec
Merge branch 'master' into RemoveRedundantBufferZeroingNSStringAPI
valeriyvan May 10, 2020
757edf4
Using initialize instead of assign
valeriyvan May 11, 2020
556d676
Foundation: fix typo in Publishers+Timer.swift (#31966)
MaxDesiatov May 23, 2020
27b9962
Merge pull request #31121 from valeriyvan/RemoveRedundantBufferZeroin…
swift-ci Jun 1, 2020
02def84
Update master to build with Xcode 12 beta
shahmishal Jun 20, 2020
f92538c
Remove comment in TestData.swift
shahmishal Jun 23, 2020
399a6a2
Remove comment in TestData.swift
shahmishal Jun 23, 2020
cf25ec6
[Foundation] Update & simplify class name stability check
lorentey Jul 2, 2020
a3f2254
[Foundation] Extract logging details to a standalone function
lorentey Jul 9, 2020
6f85d43
[Foundation] Work around name resolution in Swift 5.3
lorentey Jul 14, 2020
de09560
[Tests] Codesign the binary before executing the test
shahmishal Aug 7, 2020
a315541
Merge pull request #28639 from YOCKOW/sr-10689-cherry-pick
Aug 7, 2020
059bfbe
Merge pull request #33354 from apple/shahmishal/codesign-tests
shahmishal Aug 8, 2020
1ce3b64
[stdlib] Removes redundant buffer zeroing in IndexPath initialiser by…
valeriyvan Sep 4, 2020
7f82d06
Update doc and links to support new main branch
shahmishal Sep 23, 2020
ec122cb
Merge pull request #23926 from Coeur/patch-1
xwu Oct 4, 2020
c7485fb
[test] Don’t check for new behavior on older systems that don’t inclu…
lorentey Oct 6, 2020
a77fb6d
De-gyb NSValue.swift.gyb
lorentey Oct 29, 2020
b878ee2
Refresh file headers
lorentey Oct 29, 2020
4dbabb7
Import local shims instead of picking them up from the toolchain
lorentey Oct 29, 2020
8f5a507
Add magic install_name symbols to support back-deployment to older OSes
lorentey Oct 29, 2020
476f1da
Add xcconfig files
lorentey Oct 29, 2020
d1d2b80
Port tests to XCTest.
lorentey Oct 29, 2020
4399dee
Add auxiliary test target files
lorentey Oct 29, 2020
ab87cfd
Create an empty CoreFoundation test target
lorentey Oct 29, 2020
e120ff1
Get rid of dependency on Swift runtime headers
lorentey Oct 29, 2020
c7339b9
Add Xcode project
lorentey Oct 29, 2020
2424d51
Use PROJECT_DIR, not SOURCE_DIR, to find module install script
lorentey Oct 29, 2020
b463609
Import the Foundation overlay codebase from the Swift repository
lorentey Oct 30, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions Darwin/Config/install-swiftmodules.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/sh
#===----------------------------------------------------------------------===//
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2020 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
#
#===----------------------------------------------------------------------===//

set -e
#set -xv

# This only needs to run during installation, but that includes "installapi".
[ "$ACTION" = "installapi" -o "$ACTION" = "install" ] || exit 0

[ "$SKIP_INSTALL" != "YES" ] || exit 0
[ "$SWIFT_INSTALL_MODULES" = "YES" ] || exit 0

srcmodule="${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.swiftmodule"
dstpath="${INSTALL_ROOT}/${INSTALL_PATH}/"

if [ ! -d "$srcmodule" ]; then
echo "Cannot find Swift module at $srcmodule" >&2
exit 1
fi

mkdir -p "$dstpath"
cp -r "$srcmodule" "$dstpath"
49 changes: 49 additions & 0 deletions Darwin/Config/overlay-base.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2020 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LICENSE.txt for license information
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//

// Configuration settings file format documentation can be found at:
// https://help.apple.com/xcode/#/dev745c5c974

// Base configuration for Swift overlays.

EXECUTABLE_PREFIX = libswift
SWIFT_OVERLAY_INSTALL_PATH=/usr/lib/swift
STRIP_SWIFT_SYMBOLS = NO
BUILD_LIBRARY_FOR_DISTRIBUTION = YES
GENERATE_TEXT_BASED_STUBS = YES
SWIFT_LINK_OBJC_RUNTIME = NO
CLANG_LINK_OBJC_RUNTIME = NO

// Enable InstallAPI.
SUPPORTS_TEXT_BASED_API = YES

// We need to run install-swiftmodules.sh during the installapi action.
INSTALLHDRS_SCRIPT_PHASE = YES

INSTALL_PATH=$(SWIFT_OVERLAY_INSTALL_PATH)

OTHER_SWIFT_FLAGS = -module-link-name $(SWIFT_MODULE_LINK_NAME) -autolink-force-load -runtime-compatibility-version none
SWIFT_MODULE_LINK_NAME = swift$(PRODUCT_NAME)
SWIFT_ENABLE_INCREMENTAL_COMPILATION = NO // YES conflicts with -autolink-force-load

// Custom build settings for install-swiftmodules.sh.
SWIFT_INSTALL_MODULES = YES
SWIFT_MODULE_INSTALL_PATH = $(INSTALL_PATH)

// We need to generate swiftmodules for these architectures, so that they can be
// imported in apps that are deployable on OS versions that support them.
// However, we can only generate module files for these; we can't emit binaries.
// (All imported definitions will be unavailable on these older OS versions.)
SWIFT_MODULE_ONLY_IPHONEOS_DEPLOYMENT_TARGET = 10.3
SWIFT_MODULE_ONLY_ARCHS_iphoneos = armv7 armv7s
SWIFT_MODULE_ONLY_ARCHS_iphonesimulator = i386
SWIFT_MODULE_ONLY_ARCHS = $(SWIFT_MODULE_ONLY_ARCHS_$(PLATFORM_NAME))
24 changes: 24 additions & 0 deletions Darwin/Config/overlay-debug.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2020 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LICENSE.txt for license information
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//

// Configuration settings file format documentation can be found at:
// https://help.apple.com/xcode/#/dev745c5c974

#include "../Config/overlay-base.xcconfig"

ONLY_ACTIVE_ARCH = YES
ENABLE_TESTABILITY = YES
GCC_OPTIMIZATION_LEVEL = 0
SWIFT_OPTIMIZATION_LEVEL = -Onone
DEBUG_INFORMATION_FORMAT = dwarf
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG
GCC_PREPROCESSOR_DEFINITIONS = DEBUG=1 $(inherited)
24 changes: 24 additions & 0 deletions Darwin/Config/overlay-release.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2020 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LICENSE.txt for license information
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//

// Configuration settings file format documentation can be found at:
// https://help.apple.com/xcode/#/dev745c5c974

#include "../Config/overlay-base.xcconfig"

ONLY_ACTIVE_ARCH = NO
ENABLE_TESTABILITY = NO
GCC_OPTIMIZATION_LEVEL = s
SWIFT_OPTIMIZATION_LEVEL = -O
DEBUG_INFORMATION_FORMAT = dwarf-with-dsym
SWIFT_COMPILATION_MODE = wholemodule
ENABLE_NS_ASSERTIONS = NO
40 changes: 40 additions & 0 deletions Darwin/Config/overlay-shared.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2020 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LICENSE.txt for license information
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//

// Configuration settings file format documentation can be found at:
// https://help.apple.com/xcode/#/dev745c5c974

SWIFT_IS_OVERLAY = YES

SWIFT_VERSION = 5.0
SUPPORTED_PLATFORMS = macosx iphoneos iphonesimulator appletvos appletvsimulator watchos watchsimulator

// TAPI needs to be told about the magic-symbols-for-install-name header.
OTHER_TAPI_FLAGS = $(inherited) -extra-public-header $(SRCROOT)/$(PRODUCT_NAME)-swiftoverlay/magic-symbols-for-install-name.h

// Pass the module link name to C/C++ files; this is needed to generate the
// magic install name symbols for overlays that existed in Swift 5.0.
GCC_PREPROCESSOR_DEFINITIONS = SWIFT_TARGET_LIBRARY_NAME=$(SWIFT_MODULE_LINK_NAME)

// We need to generate swiftmodules for these architectures, so that they can be
// imported in apps that are deployable on OS versions that support them.
// However, we can only generate module files for these; we can't emit binaries.
// (All imported definitions will be unavailable on these older OS versions.)
SWIFT_MODULE_ONLY_IPHONEOS_DEPLOYMENT_TARGET = 10.3
SWIFT_MODULE_ONLY_ARCHS_iphoneos = armv7 armv7s
SWIFT_MODULE_ONLY_ARCHS_iphonesimulator = i386
SWIFT_MODULE_ONLY_ARCHS = $(SWIFT_MODULE_ONLY_ARCHS_$(PLATFORM_NAME))

// Custom settings specific for the Foundation overlay
OTHER_SWIFT_FLAGS = $(inherited) -Xllvm -sil-inline-generics -Xllvm -sil-partial-specialization
ALWAYS_SEARCH_USER_PATHS = NO
CLANG_ENABLE_OBJC_ARC = NO
31 changes: 31 additions & 0 deletions Darwin/Config/overlay-tests-shared.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2020 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LICENSE.txt for license information
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//

// Configuration settings file format documentation can be found at:
// https://help.apple.com/xcode/#/dev745c5c974

SWIFT_VERSION = 5.0

ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/../Frameworks @loader_path/../Frameworks

PRODUCT_NAME = $(TARGET_NAME)
INFOPLIST_FILE = $(PROJECT_DIR)/$(PRODUCT_NAME)/Info.plist

// Can't emit a swift module interface with bridging headers
SWIFT_EMIT_MODULE_INTERFACE = NO

CLANG_LINK_OBJC_RUNTIME = YES
SWIFT_LINK_OBJC_RUNTIME = YES
CLANG_ENABLE_OBJC_ARC = YES

ALWAYS_SEARCH_USER_PATHS = NO
18 changes: 18 additions & 0 deletions Darwin/CoreFoundation-swiftoverlay-Tests/CoreFoundationTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2020 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LICENSE.txt for license information
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//

import XCTest
import CoreFoundation

class CoreFoundationTests: XCTestCase {
// There are no tests dedicated to the CoreFoundation overlay yet.
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2020 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LICENSE.txt for license information
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//

#include "../Config/overlay-tests-shared.xcconfig"

PRODUCT_BUNDLE_IDENTIFIER = org.swift.CoreFoundationTests
22 changes: 22 additions & 0 deletions Darwin/CoreFoundation-swiftoverlay-Tests/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
26 changes: 26 additions & 0 deletions Darwin/CoreFoundation-swiftoverlay/CoreFoundation.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//

@_exported import CoreFoundation

public protocol _CFObject: class, Hashable {}
extension _CFObject {
public var hashValue: Int {
return Int(bitPattern: CFHash(self))
}
public func hash(into hasher: inout Hasher) {
hasher.combine(self.hashValue)
}
public static func ==(left: Self, right: Self) -> Bool {
return CFEqual(left, right)
}
}
21 changes: 21 additions & 0 deletions Darwin/CoreFoundation-swiftoverlay/CoreFoundation.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2020 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LICENSE.txt for license information
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//

#include "../Config/overlay-shared.xcconfig"

PRODUCT_NAME = CoreFoundation
OTHER_LDFLAGS = $(inherited) -framework CoreFoundation

// Use 0.0.0 as the version number for development builds.
CURRENT_PROJECT_VERSION = 0.0.0
DYLIB_CURRENT_VERSION = $(CURRENT_PROJECT_VERSION)
MODULE_VERSION = $(CURRENT_PROJECT_VERSION)
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//===--- magic-symbols-for-install-name.c - Magic linker directive symbols ===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//

#include "magic-symbols-for-install-name.h"
Loading