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

Always request a new tree-shaking pass when deoptimizations are performed #4111

Merged
merged 1 commit into from May 29, 2021

Conversation

lukastaegert
Copy link
Member

… are first included

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (bugfixes and features will not be merged without tests)
  • no

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no

List any relevant issue numbers:
Resolves #4097

Description

Now that all deoptimizations happen lazily, there is a now class of issues that can arise, notably when during a tree-shaking pass, no new variables are included but some nodes perform deoptimizations for the first time.
Previously, new passes were only triggered when new variables were included. This has been changed to also trigger new passes when deoptimizations are applied.

@lukastaegert lukastaegert mentioned this pull request May 28, 2021
@github-actions
Copy link

Thank you for your contribution! ❤️

You can try out this pull request locally by installing Rollup via

npm install rollup/rollup#gh-4097-request-treeshaking-pass-on-deopt

or load it into the REPL:
https://rollupjs.org/repl/?pr=4111

@codecov
Copy link

codecov bot commented May 28, 2021

Codecov Report

Merging #4111 (43b58dc) into master (8a02af1) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #4111   +/-   ##
=======================================
  Coverage   98.08%   98.08%           
=======================================
  Files         201      201           
  Lines        7039     7056   +17     
  Branches     2061     2061           
=======================================
+ Hits         6904     6921   +17     
  Misses         64       64           
  Partials       71       71           
Impacted Files Coverage Δ
src/Module.ts 100.00% <100.00%> (ø)
src/ast/nodes/AssignmentExpression.ts 100.00% <100.00%> (ø)
src/ast/nodes/AssignmentPattern.ts 100.00% <100.00%> (ø)
src/ast/nodes/CallExpression.ts 100.00% <100.00%> (ø)
src/ast/nodes/ForInStatement.ts 100.00% <100.00%> (ø)
src/ast/nodes/ForOfStatement.ts 100.00% <100.00%> (ø)
src/ast/nodes/Identifier.ts 100.00% <100.00%> (ø)
src/ast/nodes/MemberExpression.ts 100.00% <100.00%> (ø)
src/ast/nodes/NewExpression.ts 100.00% <100.00%> (ø)
src/ast/nodes/Property.ts 100.00% <100.00%> (ø)
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8a02af1...43b58dc. Read the comment docs.

@lukastaegert lukastaegert merged commit edae1ba into master May 29, 2021
@lukastaegert lukastaegert deleted the gh-4097-request-treeshaking-pass-on-deopt branch May 29, 2021 04:19
@stefcameron stefcameron mentioned this pull request Jun 1, 2021
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

heisenbug
1 participant