mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user