-
Notifications
You must be signed in to change notification settings - Fork 1.7k
JS: add DataFlow::getEnclosingExpr to get Expr for potentially reflective calls #2270
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
Conversation
Apologies, I'm a bit late to this discussion, but I would actually favour just extending |
ec95a62
to
232e875
Compare
It definitely seems better to have one method instead of two. Doing it in |
Fixes #2288. |
As pr. discussion: Lets land this, and then I'll do general changes to |
So I did a pretty big evaluation. I compared a version where just There is no change in results, but there is a nasty decrease in performance. |
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.
LGTM as a surgical fix.
That's a shame, but hopefully something we can fix. It does seem like the right thing to do. |
Based on previous discussion.
Suggestions for the name of the new method are welcome.
I evaluated on
UseOfReturnlessFunction
, which is now the only query using this new method.Evaluation shows no performance degradation, and removal of a whole bunch of FP's.
When I made the
UseOfReturnlessFunction
query I think I found the benchmarks I tested on using an initial query that hadexists(call.asExpr())
, and I therefore missed the benchmarks with lots of reflective calls.