-
Notifications
You must be signed in to change notification settings - Fork 138
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
Use parent to determine whether an expression is target of an invocation #3340
Conversation
Cadence Benchstat comparisonThis branch with compared with the base branch onflow:master commit be70c5b Collapsed results for better readability
|
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.
Great work! 👏
I wonder if we can also refactor other existing flags, like inAssignment
(in a follow-up PR)
Yeah, would be great if we can remove these other flags as well. I'll create an issue for this. |
Port https://github.com/dapperlabs/cadence-internal/pull/220
Closes https://github.com/dapperlabs/cadence-internal/issues/213
Also lays the foundation for #3341
Description
Concept is same as https://github.com/dapperlabs/cadence-internal/pull/146, where parent is tracked to determine whether the current expression is an invoked-expression.
However, unlike in https://github.com/dapperlabs/cadence-internal/pull/146, only record the parent temporarily as the checker visit the expression, and then reset it. Doesn't store the parent-child mapping in the elaboration. This way, there is no performance impact:
master
branchFiles changed
in the Github PR explorer