mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[string] Clean up StringObject; Clarify its tagged BridgeObjects. (#14425)
[string] Clean up StringObject; Clarify its tagged BridgeObjects. Bifurcate StringObjects raw bit-pattern initializers to expose whether the caller is passing a value rather than a reference. This way, StringObject can call the approprite BridgeObject helper and participate in upcoming peephole optimizations like retains of known-values. This is all meant to be a NOP. Additionally, do some cleanup while we're at it.
This commit is contained in:
@@ -60,7 +60,7 @@ struct _StringGuts {
|
||||
|
||||
init(rawBits: _RawBitPattern) {
|
||||
self.init(
|
||||
object: _StringObject(rawBits: rawBits.0),
|
||||
object: _StringObject(noReallyHereAreTheRawBits: rawBits.0),
|
||||
otherBits: rawBits.1)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user