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

… 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

@swift-ci smoke test

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