Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tree shake parameter defaults (#4498)
* Implement basic support for parameter default tree-shaking * Refine parameter default tree-shaking * Use an inclusion parameter instead of separate methods to handle this * Make call argument inclusion path aware so that in the future, we can use this mechanism to determine possible values for parameters for deoptimization * Support parameter default treeshaking for functions, object and class methods, functions in array tuples and template tags * Use full CallExpression logic for TaggedTemplateExpression * Use optional chaining instead of null checks * Always call applyDeoptimizations both in hasEffects and include * Add more tests * Replace includeAsStatement with parameter * Revert previous because it is handled via NodeBase * Ensure properties are deoptimized by default * Track calls through possible TDZ violations * Improve coverage * Remove defaults without side effects for unused parameters * Check for unknown values via typeof to prepare for different types of unknown * Remove defaults when passing non-literal values * Deoptimize this for tagged template expression and improve coverage
- Loading branch information
1 parent
05d294f
commit 4624917
Showing
104 changed files
with
1,112 additions
and
611 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.