mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
SIL: Add an allowed access kind to the opened value of an open_existential_addr instruction
Once we move to a copy-on-write implementation of existential value buffers we can no longer consume or destroy values of an opened existential unless the buffer is uniquely owned. Therefore we need to track the allowed operation on opened values. Add qualifiers "mutable_access" and "immutable_access" to open_existential_addr instructions to indicate the allowed access to the opened value. Once we move to a copy-on-write implementation, an "open_existential_addr mutable_access" instruction will ensure unique ownership of the value buffer.
This commit is contained in:
@@ -54,8 +54,7 @@ const uint16_t VERSION_MAJOR = 0;
|
||||
/// in source control, you should also update the comment to briefly
|
||||
/// describe what change you made. The content of this comment isn't important;
|
||||
/// it just ensures a conflict if two people change the module format.
|
||||
const uint16_t VERSION_MINOR = 317; // Last change: search path options record
|
||||
// if it is system or not.
|
||||
const uint16_t VERSION_MINOR = 318; // Last change: SIL open_exist. access kind
|
||||
|
||||
using DeclID = PointerEmbeddedInt<unsigned, 31>;
|
||||
using DeclIDField = BCFixed<31>;
|
||||
|
||||
Reference in New Issue
Block a user