Skip to content

Commit 2cff462

Browse files
authored
Merge pull request swiftlang#30492 from atrick/fix-merge-test
2 parents 10c9cb5 + bd03f56 commit 2cff462

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

test/SILOptimizer/merge_exclusivity.swift

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,18 +304,22 @@ public final class StreamClass {
304304
self.buffer = []
305305
}
306306

307+
@inline(__always)
307308
public func write(_ byte: UInt8) {
308309
buffer.append(byte)
309310
}
310311

312+
@inline(__always)
311313
public func write(_ value: WriteProt) {
312314
value.writeTo(self)
313315
}
314316

317+
@inline(__always)
315318
public func writeEscaped(_ string: String) {
316319
writeEscaped(string: string.utf8)
317320
}
318321

322+
@inline(__always)
319323
public func writeEscaped<T: Collection>(
320324
string sequence: T
321325
) where T.Iterator.Element == UInt8 {
@@ -326,12 +330,14 @@ public final class StreamClass {
326330
}
327331
}
328332

333+
@inline(__always)
329334
public func toStream(_ stream: StreamClass, _ value: WriteProt) -> StreamClass {
330335
stream.write(value)
331336
return stream
332337
}
333338

334339
extension UInt8: WriteProt {
340+
@inline(__always)
335341
public func writeTo(_ stream: StreamClass) {
336342
stream.write(self)
337343
}
@@ -344,6 +350,7 @@ public func asWriteProt(_ string: String) -> WriteProt {
344350
private struct EscapedString: WriteProt {
345351
let value: String
346352

353+
@inline(__always)
347354
func writeTo(_ stream: StreamClass) {
348355
_ = toStream(stream, UInt8(ascii: "a"))
349356
stream.writeEscaped(value)
@@ -359,6 +366,7 @@ private struct EscapedTransforme<T>: WriteProt {
359366
let items: [T]
360367
let transform: (T) -> String
361368

369+
@inline(__always)
362370
func writeTo(_ stream: StreamClass) {
363371
for (i, item) in items.enumerated() {
364372
if i != 0 { _ = toStream(stream, asWriteProt(transform(item))) }
@@ -388,6 +396,6 @@ public func run_MergeTest9(_ N: Int) {
388396
let listOfThings: [Thing] = listOfStrings.map(Thing.init)
389397
for _ in 1...N {
390398
let stream = StreamClass()
391-
_ = toStream(stream, asWriteProt(listOfThings, transform: { $0.value }))
399+
_ = toStream(stream, asWriteProt(listOfThings, transform: { $0.value }))
392400
}
393401
}

0 commit comments

Comments
 (0)