-
Notifications
You must be signed in to change notification settings - Fork 10.5k
TypeLowering: add Type.hasCustomDeinit #81784
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
base: main
Are you sure you want to change the base?
Conversation
d89f074
to
22ac782
Compare
4f4b0b2
to
c7b7811
Compare
@slavapestov Take a look at We need this for certain certain types (Array, Dictionary) that may only have a custom deinit when their generic parameters may have a custome deinit ( I'm using an opaque abstraction pattern, guessing that it can't affect recursive type properties. But maybe this code should know how to extract the Here's the code:
|
c7b7811
to
7d45a5a
Compare
7d45a5a
to
2b38ea0
Compare
@swift-ci test |
Teach SIL type lowering to recursively track custom vs. default deinit status. Determine whether each type recursively only has default deinitialization. This includes any recursive deinitializers that may be invoked by releasing a reference held by this type. If a type only has default deinitialization, then the deinitializer cannot have any semantically-visible side effects. It cannot write to any memory
2b38ea0
to
35c49c8
Compare
@swift-ci test |
[NFC] TypeLowering: add CustomDeinit.
Teach SIL type lowering to recursively track custom vs. default deinit status.
Determine whether each type recursively only has default deinitialization. This
includes any recursive deinitializers that may be invoked by releasing a
reference held by this type.
If a type only has default deinitialization, then the deinitializer cannot
have any semantically-visible side effects. It cannot write to any memory
SwiftCompilerSources bridge Type.hasCustomDeinit.