-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[SIL] Hollow out Builtin.copy and deprecate _copy. #73422
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
6a0e263
to
91e88db
Compare
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.
Seems like we should be able to remove this.
It looks like the main concern is source compatibility with the removal of the always-emit-into-client |
@@ -265,3 +265,12 @@ extension String { | |||
} | |||
} | |||
#endif | |||
|
|||
@available(swift, deprecated: 6, message: "Use the copy operator") |
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.
It would be better to rather deprecate this in all language modes, not just in Swift 6+:
@available(swift, deprecated: 6, message: "Use the copy operator") | |
@available(*, deprecated, message: "Use the copy operator") |
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.
Fixed
a281002
to
c5d2cac
Compare
|
The copy operator has been implemented and doesn't use it. Remove `Builtin.copy` and `_copy` as much as currently possible. Source compatibility requires that `_copy` remain in the stdlib. It is deprecated here and just uses the copy operator. Handling old swiftinterfaces requires that `Builtin.copy` be defined. Redefine it here as a passthrough--SILGen machinery will produce the necessary copy_addr. rdar://127502242
c5d2cac
to
06921cf
Compare
@swift-ci please test |
@swift-ci please test source compatibility |
@swift-ci please apple silicon benchmark |
Source compat failures match failures in baseline. |
The copy operator has been implemented and doesn't use it. Remove
Builtin.copy
and_copy
as much as currently possible.Source compatibility requires that
_copy
remain in the stdlib. It is deprecated here and just uses the copy operator.Handling old swiftinterfaces requires that
Builtin.copy
be defined. Redefine it here as a passthrough--SILGen machinery will produce the necessary copy_addr.rdar://127502242