Skip to content
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

Python: Type tracker changes #6858

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

@hvitved
Copy link
Contributor

@hvitved hvitved commented Oct 12, 2021

The first commit caches TypeBackTracker::prepend, similar to how TypeTracker::append is cached.

The second commit introduces a new predicate TypeBackTracker::getACompatibleTypeTracker(), which is useful when reasoning about nodes that can be reached in both forwards tracking and backwards tracking.

@hvitved hvitved requested a review from as a code owner Oct 12, 2021
tausbn
tausbn approved these changes Oct 25, 2021
Copy link
Contributor

@tausbn tausbn left a comment

One minor suggestion, otherwise LGTM. 👍

*/
TypeTracker getACompatibleTypeTracker() {
exists(boolean hasCall | result = MkTypeTracker(hasCall, content) |
hasCall = false or hasReturn() = false
Copy link
Contributor

@tausbn tausbn Oct 25, 2021

Suggested change
hasCall = false or hasReturn() = false
hasCall = false or this.hasReturn() = false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants