KeyPaths: Take a bit for encoding "let"-ness of stored properties.

If we know a key path component can be accessed as a stored property, then we should also know whether it's a `let` or not, so it should be safe to encode this in the key path pattern. Stage this change in by changing the number of bits used to store in-line offsets, fixing up the parts of the key path implementation that assumed that it took up the entire payload bitfield.
This commit is contained in:
Joe Groff
2018-08-16 13:17:28 -07:00
parent c11aacc576
commit 00b50ce6ab
7 changed files with 73 additions and 47 deletions

View File

@@ -59,17 +59,23 @@ static const __swift_uint32_t _SwiftKeyPathComponentHeader_ExternalTag
static const __swift_uint32_t
_SwiftKeyPathComponentHeader_TrivialPropertyDescriptorMarker = 0U;
static const __swift_uint32_t _SwiftKeyPathComponentHeader_StoredOffsetPayloadMask
= 0x007FFFFFU;
static const __swift_uint32_t _SwiftKeyPathComponentHeader_MaximumOffsetPayload
= 0x00FFFFFCU;
= 0x007FFFFCU;
static const __swift_uint32_t _SwiftKeyPathComponentHeader_UnresolvedIndirectOffsetPayload
= 0x00FFFFFDU;
= 0x007FFFFDU;
static const __swift_uint32_t _SwiftKeyPathComponentHeader_UnresolvedFieldOffsetPayload
= 0x00FFFFFEU;
= 0x007FFFFEU;
static const __swift_uint32_t _SwiftKeyPathComponentHeader_OutOfLineOffsetPayload
= 0x00FFFFFFU;
= 0x007FFFFFU;
static const __swift_uint32_t _SwiftKeyPathComponentHeader_StoredMutableFlag
= 0x00800000U;
static const __swift_uint32_t _SwiftKeyPathComponentHeader_OptionalChainPayload
= 0;