Skip to content

Conversation

@gottesmm
Copy link
Contributor

We are creating/relying on a contract between the AST and SIL... that SILDeclRef
should accurately describe the method/accessor that a class_method is from. By
doing this we eliminate pattern matching on the AST which ties this code too
tightly to the AST and makes it brittle in the face of AST changes. This also
fixes an issue where we were not handling setters correctly.

I am doing this now since it is natural to fix it along side fixing the
ref_element_addr issue in a previous PR since they are effectively doing
the same thing.

rdar://153207557

@gottesmm
Copy link
Contributor Author

@swift-ci smoke test

@gottesmm
Copy link
Contributor Author

gottesmm commented Nov 7, 2025

@swift-ci smoke test

… for class_methods as well.

The two pieces of code are fundamentally doing the same thing so I can reuse the
code. I am doing the refactoring as a separate change so that it is easier to
review.
…clRef instead of using the AST directly.

We are creating/relying on a contract between the AST and SIL... that SILDeclRef
should accurately describe the method/accessor that a class_method is from. By
doing this we eliminate pattern matching on the AST which ties this code too
tightly to the AST and makes it brittle in the face of AST changes. This also
fixes an issue where we were not handling setters correctly.

I am doing this now since it is natural to fix it along side fixing the
ref_element_addr issue in the previous commit since they are effectively doing
the same thing.

rdar://153207557
@gottesmm
Copy link
Contributor Author

gottesmm commented Nov 7, 2025

Linux test failure was real. macOS failure was due to some weird issue around incremental testing. I am going to do a clean smoke test

@gottesmm
Copy link
Contributor Author

gottesmm commented Nov 7, 2025

@swift-ci clean smoke test

@gottesmm gottesmm enabled auto-merge November 7, 2025 04:35
@gottesmm gottesmm merged commit 1bb65d8 into swiftlang:main Nov 7, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant