Skip to content

Commit 87de3d2

Browse files
authored
Merge branch 'swiftlang:main' into implementation/progress-reporter
2 parents b13718f + 2df5199 commit 87de3d2

File tree

14 files changed

+573
-555
lines changed

14 files changed

+573
-555
lines changed

Benchmarks/Benchmarks/Internationalization/BenchmarkLocale.swift

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,20 @@
1313
import Benchmark
1414
import func Benchmark.blackHole
1515

16-
#if FOUNDATION_FRAMEWORK // This test uses CFString
16+
#if os(macOS) && USE_PACKAGE
17+
import FoundationEssentials
18+
import FoundationInternationalization
19+
#else
1720
import Foundation
21+
#endif
1822

1923
let benchmarks = {
2024
Benchmark.defaultConfiguration.maxIterations = 1_000
2125
Benchmark.defaultConfiguration.maxDuration = .seconds(3)
2226
Benchmark.defaultConfiguration.scalingFactor = .kilo
23-
Benchmark.defaultConfiguration.metrics = [.cpuTotal, .wallClock, .mallocCountTotal, .throughput]
27+
Benchmark.defaultConfiguration.metrics = [.cpuTotal, .wallClock, .throughput, .peakMemoryResident, .peakMemoryResidentDelta]
2428

29+
#if FOUNDATION_FRAMEWORK
2530
let string1 = "aaA" as CFString
2631
let string2 = "AAà" as CFString
2732
let range1 = CFRange(location: 0, length: CFStringGetLength(string1))
@@ -34,5 +39,22 @@ let benchmarks = {
3439
CFStringCompareWithOptionsAndLocale(string1, string2, range1, .init(rawValue: 0), nsLocale)
3540
}
3641
}
37-
}
3842
#endif
43+
44+
let identifiers = Locale.availableIdentifiers
45+
let allComponents = identifiers.map { Locale.Components(identifier: $0) }
46+
Benchmark("LocaleInitFromComponents") { benchmark in
47+
for components in allComponents {
48+
let locale = Locale(components: components)
49+
let components2 = Locale.Components(locale: locale)
50+
let locale2 = Locale(components: components2) // cache hit
51+
}
52+
}
53+
54+
Benchmark("LocaleComponentsInitIdentifer") { benchmark in
55+
for identifier in identifiers {
56+
let components = Locale.Components(identifier: identifier)
57+
}
58+
}
59+
}
60+

Proposals/0007-swift-subprocess.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Status: **Accepted as 0.1**
77
* Bugs: [rdar://118127512](rdar://118127512), [apple/swift-foundation#309](https://github.com/apple/swift-foundation/issues/309)
88
* Review: [Pitch](https://forums.swift.org/t/pitch-swift-subprocess/69805/65), [1st review](https://forums.swift.org/t/review-sf-0007-introducing-swift-subprocess/70337), [2nd review](https://forums.swift.org/t/review-2nd-sf-0007-subprocess/76547), [3rd review](https://forums.swift.org/t/review-3rd-sf-0007-subprocess/78078/64)
9-
9+
* Implementation: https://github.com/swiftlang/swift-subprocess
1010

1111
## Revision History
1212

Proposals/0014-attributed-string-discontiguous-operations.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* Review Manager: [Tina Liu](https://github.com/itingliu)
66
* Status: **Accepted**
77
* Review: ([Pitch](https://forums.swift.org/t/pitch-attributedstring-discontiguous-operations/76574))
8+
* Implementation: #1145
89

910
## Introduction
1011

Proposals/0017-expanded-calendar-support.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# Expanded calendar support
22

3-
* Proposal: SF-017
3+
* Proposal: SF-0017
44
* Authors: [Dragan Besevic]([email protected])
55
* Review Manager: Tina Liu
6+
* Implementation: https://github.com/swiftlang/swift-foundation/pull/1171
67
* Status: **Accepted**
78

89

Proposals/0021-ISO8601ComponentsStyle.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
* Proposal: SF-0021
44
* Author(s): Tony Parker <[email protected]>
5-
* Status: **Review: March 19, 2025...March 26, 2025**
5+
* Status: **Accepted**
66
* Intended Release: _Swift 6.2_
7+
* Implementation: https://github.com/swiftlang/swift-foundation/pull/1209
78
* Review: ([pitch](https://forums.swift.org/t/pitch-iso8601-components-format-style/77990))
89
*_Related issues_*
910

Proposals/0023-progress-reporter.md

Lines changed: 489 additions & 509 deletions
Large diffs are not rendered by default.

Proposals/0024-CurrentBundle.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* Proposal: [SF-0024](0024-filename.md)
55
* Authors:[Matt Seaman](https://github.com/matthewseaman), [Andreas Neusuess](https://github.com/Tantalum73)
66
* Review Manager: [Tina L](https://github.com/itingliu)
7+
* Implementation: https://github.com/swiftlang/swift-foundation/pull/1274
78
* Status: **Accepted**
89

910

Proposals/0025-markdown-list-delimiters.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* Authors: [Jeremy Schonfeld](https://github.com/jmschonfeld)
55
* Review Manager: TBD
66
* Status: **Pitch**
7+
* Implementation: https://github.com/swiftlang/swift-foundation/pull/1272
78
* Review: ([pitch](https://forums.swift.org/t/pitch-markdown-list-delimiters/79174))
89

910
## Revision history

Proposals/0026-preferredLocales.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
* Proposal: [SF-0026](0026-preferredLocales.md)
44
* Authors: [करन मिश्र · Karan Miśra](https://github.com/karan-misra)
55
* Review Manager: TBD
6-
* Status: **Awaiting review**
6+
* Status: **Accepted**
7+
* Implementation: https://github.com/swiftlang/swift-foundation/pull/1315
78
* Review: ([pitch](https://forums.swift.org/t/pitch-introduce-locale-preferredlocales/79900))
89

910
## Introduction

Sources/FoundationEssentials/Data/Data.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2205,6 +2205,9 @@ public struct Data : Equatable, Hashable, RandomAccessCollection, MutableCollect
22052205

22062206
#if compiler(>=6.2) && $LifetimeDependence
22072207
@available(FoundationSpan 6.2, *)
2208+
#if FOUNDATION_FRAMEWORK
2209+
@_disfavoredOverload
2210+
#endif // FOUNDATION_FRAMEWORK
22082211
public var bytes: RawSpan {
22092212
@lifetime(borrow self)
22102213
borrowing get {

0 commit comments

Comments
 (0)