[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:
Michael Ilseman
2018-02-06 17:36:32 -08:00
committed by GitHub
parent 3df5928122
commit b1f1e98a63
2 changed files with 74 additions and 12 deletions

View File

@@ -60,7 +60,7 @@ struct _StringGuts {
init(rawBits: _RawBitPattern) {
self.init(
object: _StringObject(rawBits: rawBits.0),
object: _StringObject(noReallyHereAreTheRawBits: rawBits.0),
otherBits: rawBits.1)
}
}