mirror of
https://github.com/apple/swift-nio
synced 2026-11-25 04:47:49 +00:00
CI: use DEVELOPMENT-SNAPSHOT-2019-01-23-a (#780)
Motivation: Newer Swift versions are good and we should test them, this one threw a few curveballs at us: - started using `posix_memalign` which needed fixing in our alloc tests (fixed in #782) - the optimiser decided not to inline a function that needs to be inlined Modifications - `@inline(__always)` to help the optimiser - update Swift version Result: - fixes #727 - fixes #726
This commit is contained in:
1 parent
0eb85a4478
commit
58a58b9680
2 files changed
+10
-7
No files matched your search
@@ -74,6 +74,9 @@ private func writeTrailers(wrapOutboundOut: (IOData) -> NIOAny, ctx: ChannelHand
|
||||
}
|
||||
}
|
||||
|
||||
// starting about swift-5.0-DEVELOPMENT-SNAPSHOT-2019-01-20-a, this doesn't get automatically inlined, which costs
|
||||
// 2 extra allocations so we need to help the optimiser out.
|
||||
@inline(__always)
|
||||
private func writeHead(wrapOutboundOut: (IOData) -> NIOAny, writeStartLine: (inout ByteBuffer) -> Void, ctx: ChannelHandlerContext, headers: HTTPHeaders, promise: EventLoopPromise<Void>?) {
|
||||
|
||||
var buffer = ctx.channel.allocator.buffer(capacity: 256)
|
||||
|
||||
Reference in new issue
Block a user