-
Notifications
You must be signed in to change notification settings - Fork 1.7k
JavaScript: Improve detection of UMD modules. #8603
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
94c2e0b
to
67236e0
Compare
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 assuming an evaluation works out.
(Let me know if you want me to do one for you).
That would be fantastic, thanks! (The language tests pass.) |
I've started one. It should appear as a backref shortly. |
The evaluation revealed significant performance regressions that need looking into. |
I took a quick look at the regression, but didn't make much progress. It's easy to reproduce by, for example, running |
63b97cb
to
2c7ec9c
Compare
We previously required the `define` to appear directly as an expression statement, but there are common patterns where this is not the case.
2c7ec9c
to
b700972
Compare
I've looked a bit at this, and I think I we could merge it now. Some of the performance regression seem to have disappeared from just waiting (core improvements?). However, the cause seems to be that we recognize more flowsteps. I think the trade-off is worth it. |
Ah, self-fixing performance problems! Those are the best. |
@erik-krogh, could you re-approve so I can auto-merge? |
Specifically, we now detect this pattern:
We previously missed it because we expected the
define
to appear as an expression statement, but here it is nested a bit more deeply.I fixed this by using the
inVoidContext
predicate we use in a few other queries, which however needed a bit of extra work. I'm curious to see whether that has any knock-on effects on performance or results, if it does I'm happy to switch to a more targeted fix.