-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Runtime: Set 'is not bitwise borrowable' bit for raw layout types. #76734
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@swift-ci Please test |
/// | ||
/// No raw layout types are yet, but should we change our mind about that in the future, | ||
/// this flag is here. | ||
BitwiseBorrowable = 0x4, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't all raw layout types not be bitwise borrowable? Can't we just unconditionally set this to false in the init function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought that having a flag to allow a raw layout type to be bitwise-borrowable in the future would be good future proofing, should we have a reason to do so later.
@@ -0,0 +1,41 @@ | |||
// RUN: %target-run-simple-swift(-enable-experimental-feature RawLayout) | |||
// REQUIRES: executable_test | |||
// UNSUPPORTED: use_os_stdlib |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll also want // UNSUPPORTED: back_deployment_runtime
for the full effect.
include/swift/ABI/Metadata.h
Outdated
@@ -2221,7 +2221,7 @@ struct TargetExtendedExistentialTypeShape | |||
bool hasGeneralizationSignature() const { | |||
return Flags.hasGeneralizationSignature(); | |||
} | |||
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bit of whitespace spam.
When initializing metadata for layout-dependent raw layout types, set the "is not bitwise borrowable" bit.
11a6f06
to
6e565b5
Compare
@swift-ci Please test |
@swift-ci Please test Linux |
When initializing metadata for layout-dependent raw layout types, set the "is not bitwise borrowable" bit.