From 1def9ea3934a1d92b34c35b1eff9cb100eef49ed Mon Sep 17 00:00:00 2001 From: Karoy Lorentey Date: Wed, 7 Feb 2018 20:26:16 +0000 Subject: [PATCH 1/2] [stdlib] Make _mixInt and _combineHashValues non-inlineable. --- stdlib/public/core/Hashing.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/public/core/Hashing.swift b/stdlib/public/core/Hashing.swift index 02acd8e2b5551..005d999e250eb 100644 --- a/stdlib/public/core/Hashing.swift +++ b/stdlib/public/core/Hashing.swift @@ -149,7 +149,7 @@ func _mixUInt(_ value: UInt) -> UInt { } @_inlineable // FIXME(sil-serialize-all) -@_transparent +@inline(never) public // @testable func _mixInt(_ value: Int) -> Int { #if arch(i386) || arch(arm) @@ -200,7 +200,7 @@ func _squeezeHashValue(_ hashValue: Int, _ upperBound: Int) -> Int { /// code that creates the synthesized AST nodes. /// /// [ref]: https://pdfs.semanticscholar.org/03bf/7be88e88ba047c6ab28036d0f28510299226.pdf -@_transparent +@inline(never) public // @testable func _combineHashValues(_ firstValue: Int, _ secondValue: Int) -> Int { // Use a magic number based on the golden ratio From 7a8635ea9e539e525aa70a8b5d92fc14b7a8c4f6 Mon Sep 17 00:00:00 2001 From: Karoy Lorentey Date: Thu, 8 Feb 2018 23:50:12 +0000 Subject: [PATCH 2/2] Add @effects(readonly) to _combineHashValues. --- stdlib/public/core/Hashing.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/stdlib/public/core/Hashing.swift b/stdlib/public/core/Hashing.swift index 005d999e250eb..bc90a13ebe170 100644 --- a/stdlib/public/core/Hashing.swift +++ b/stdlib/public/core/Hashing.swift @@ -201,6 +201,7 @@ func _squeezeHashValue(_ hashValue: Int, _ upperBound: Int) -> Int { /// /// [ref]: https://pdfs.semanticscholar.org/03bf/7be88e88ba047c6ab28036d0f28510299226.pdf @inline(never) +@effects(readonly) public // @testable func _combineHashValues(_ firstValue: Int, _ secondValue: Int) -> Int { // Use a magic number based on the golden ratio