-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
Rewrite SimpleDidSetRequest
to not require a typechecked body
#69215
base: main
Are you sure you want to change the base?
Rewrite SimpleDidSetRequest
to not require a typechecked body
#69215
Conversation
@swift-ci please smoke test |
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.
Perhaps one day we can model oldValue as a capture or something, so that interface type computation does not depend on the contents of didSet's body.
@swift-ci please smoke test macOS |
@swift-ci please clean smoke test macOS |
@swift-ci please smoke test |
e37f2a0
to
6f338ad
Compare
@swift-ci please smoke test |
SimpleDidSetRequest's implementation was depending on type-checking the body of the observer, meaning that computing the interface type of a `didSet` would require type-checking the body first. This triggers some request cycles, and is unnecessarily complicated. Rewrite the implementation to work on a non-type-checked body, by using name lookup to establish when the `oldValue` parameter is referenced from the body.
`buildTypeRefinementContextHierarchyDelayed()` is already guarded behind a request, so it doesn't need its own logic for eliminating redundant computation. Remove that logic, which incorrectly assumed that the TRC was built for a function if the function body has already been parsed.
6f338ad
to
df6d501
Compare
@swift-ci please smoke test |
SimpleDidSetRequest's implementation was depending on type-checking the body of the observer, meaning that computing the interface type of a
didSet
would require type-checking the body first. This triggers some request cycles, and is unnecessarily complicated.Rewrite the implementation to work on a non-type-checked body, by using name lookup to establish when the
oldValue
parameter is referenced from the body.