Skip to content

[stdlib] Misc inlinability fixes #20410

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 3 commits into from
Nov 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion stdlib/public/core/AssertCommon.swift
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ func _unimplementedInitializer(className: StaticString,
Builtin.int_trap()
}

@inlinable // FIXME(sil-serialize-all)
public // COMPILER_INTRINSIC
func _undefined<T>(
_ message: @autoclosure () -> String = String(),
Expand Down
3 changes: 0 additions & 3 deletions stdlib/public/core/Misc.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ public func _autorelease(_ x: AnyObject) {
///
/// This function is primarily useful to call various runtime functions
/// written in C++.
@inlinable // FIXME(sil-serialize-all)
internal func _withUninitializedString<R>(
_ body: (UnsafeMutablePointer<String>) -> R
) -> (R, String) {
Expand All @@ -67,13 +66,11 @@ internal func _withUninitializedString<R>(
// with type names that we are nested in.
// But we can place it behind #if _runtime(_Native) and remove it from ABI on
// Apple platforms, deferring discussions mentioned above.
@inlinable // FIXME(sil-serialize-all)
@_silgen_name("swift_getTypeName")
public func _getTypeName(_ type: Any.Type, qualified: Bool)
-> (UnsafePointer<UInt8>, Int)

/// Returns the demangled qualified name of a metatype.
@inlinable // FIXME(sil-serialize-all)
public // @testable
func _typeName(_ type: Any.Type, qualified: Bool = true) -> String {
let (stringPtr, count) = _getTypeName(type, qualified: qualified)
Expand Down
1 change: 0 additions & 1 deletion stdlib/public/core/Pointer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,6 @@ func _convertMutableArrayToPointerArgument<
}

/// Derive a UTF-8 pointer argument from a value string parameter.
@inlinable // FIXME(sil-serialize-all)
public // COMPILER_INTRINSIC
func _convertConstStringToUTF8PointerArgument<
ToPointer : _Pointer
Expand Down
1 change: 0 additions & 1 deletion stdlib/public/core/REPL.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
//===----------------------------------------------------------------------===//

/// Print a string as is to stdout.
@inlinable // FIXME(sil-serialize-all)
public // COMPILER_INTRINSIC
func _replPrintLiteralString(_ text: String) {
print(text, terminator: "")
Expand Down
6 changes: 2 additions & 4 deletions stdlib/public/core/Runtime.swift.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,7 @@ internal struct _Buffer32 {

internal mutating func withBytes<Result>(
_ body: (UnsafeMutablePointer<UInt8>) throws -> Result
) rethrows -> Result
{
) rethrows -> Result {
return try withUnsafeMutablePointer(to: &self) {
try body(UnsafeMutableRawPointer($0).assumingMemoryBound(to: UInt8.self))
}
Expand All @@ -192,8 +191,7 @@ internal struct _Buffer72 {

internal mutating func withBytes<Result>(
_ body: (UnsafeMutablePointer<UInt8>) throws -> Result
) rethrows -> Result
{
) rethrows -> Result {
return try withUnsafeMutablePointer(to: &self) {
try body(UnsafeMutableRawPointer($0).assumingMemoryBound(to: UInt8.self))
}
Expand Down
35 changes: 12 additions & 23 deletions test/api-digester/Outputs/stability-stdlib-abi.swift.expected
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@

/* Generic Signature Changes */
Func MutableCollection._partition(within:by:) has generic signature change from <τ_0_0 where τ_0_0 : MutableCollection, τ_0_0 : RandomAccessCollection> to <τ_0_0 where τ_0_0 : BidirectionalCollection, τ_0_0 : MutableCollection>

/* RawRepresentable Changes */

/* Removed Decls */
Class _stdlib_AtomicInt has been removed
Func BinaryInteger._description(radix:uppercase:) has been removed
Func MutableCollection._partition(within:by:) has been renamed to Func MutableCollection._partitionImpl(by:)
Func MutableCollection._heapSort(within:by:) has been removed
Func MutableCollection._heapify(within:by:) has been removed
Func MutableCollection._introSort(within:by:) has been removed
Func MutableCollection._introSortImpl(within:by:depthLimit:) has been removed
Func MutableCollection._siftDown(_:within:by:) has been removed
Func MutableCollection._sort3(_:_:_:by:) has been removed
Func MutableCollection._partition(within:by:) has parameter 0 type change from Range<τ_0_0.Index> to (τ_0_0.Element) throws -> Bool

Func BinaryInteger._description(radix:uppercase:) has been removed
Struct _Buffer32 has been removed
Struct _Buffer72 has been removed
Func _int64ToString(_:radix:uppercase:) has been removed
Func _int64ToStringImpl(_:_:_:_:_:) has been removed
Func _uint64ToStringImpl(_:_:_:_:_:) has been removed
Func _withUninitializedString(_:) has been removed

Class _stdlib_AtomicInt has been removed
Func _stdlib_atomicCompareExchangeStrongInt(object:expected:desired:) has been removed
Func _stdlib_atomicCompareExchangeStrongInt32(object:expected:desired:) has been removed
Func _stdlib_atomicCompareExchangeStrongInt64(object:expected:desired:) has been removed
Expand Down Expand Up @@ -50,25 +52,12 @@ Func _swift_stdlib_atomicStoreInt32(object:desired:) has been removed
Func _swift_stdlib_atomicStoreInt64(object:desired:) has been removed
Func _swift_stdlib_atomicStoreUInt32(object:desired:) has been removed
Func _swift_stdlib_atomicStoreUInt64(object:desired:) has been removed
Func _uint64ToStringImpl(_:_:_:_:_:) has been removed

Struct Hasher._Core has removed conformance to _HasherCore
Protocol _HasherCore has been removed
Struct _Buffer32 has been removed
Struct _Buffer72 has been removed
Struct _BufferingHasher has been removed
Struct _HasherTailBuffer has been removed

/* Moved Decls */

/* Renamed Decls */
Func MutableCollection._partition(within:by:) has been renamed to Func MutableCollection._partitionImpl(by:)

/* Type Changes */
Func MutableCollection._partition(within:by:) has parameter 0 type change from Range<τ_0_0.Index> to (τ_0_0.Element) throws -> Bool
Var Hasher._core has declared type change from _BufferingHasher<Hasher._Core> to Hasher._Core
Var Hasher._Core._buffer is added to a non-resilient type
Var Hasher._Core._state in a non-resilient type changes position from 0 to 1
Struct Hasher._Core has removed conformance to _HasherCore

/* Decl Attribute changes */

/* Protocol Requirement Changes */