Skip to content

Conversation

@asgerf
Copy link
Contributor

@asgerf asgerf commented Dec 3, 2020

Evaluation (internal link) shows a minor slow down due to optimizer wobbles, but it has been observed to help with the BDD node limit in some cases.

@asgerf asgerf added the JS label Dec 3, 2020
max-schaefer
max-schaefer previously approved these changes Dec 3, 2020
Copy link
Contributor

@max-schaefer max-schaefer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor suggestion.

I'd be happy to accept the (apparently minor) performance penalty.

private class NodeModuleSourcesNodes extends DataFlow::SourceNode::Range {
NodeModuleSourcesNodes() {
exists(NodeModule m |
this = DataFlow::ssaDefinitionNode(SSA::implicitInit([m.getModuleVariable(), m.getExportsVariable()]))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be worth binding the variable to a field and exposing it through a getter? Then we could use that getter in the charpred of {Module,Exports}VarNode to avoid some duplication.

@asgerf asgerf marked this pull request as ready for review December 3, 2020 11:11
@asgerf asgerf requested a review from a team as a code owner December 3, 2020 11:11
max-schaefer
max-schaefer previously approved these changes Dec 3, 2020
Copy link
Contributor

@max-schaefer max-schaefer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@asgerf asgerf force-pushed the js/source-node-tweaks branch from 384297d to 44b9b62 Compare January 11, 2021 15:09
@asgerf
Copy link
Contributor Author

asgerf commented Mar 23, 2021

Superseded by #5499

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants