Optimise DisplayClass Allocations (#32092)
The current implementation of closure conversion creates closure environments for each new scope. This change tries to minimize the number of closure environments, and thus closure environment allocations, when possible by merging "adjacent" closure environments. To merge two closure environments, they have to: 1. Be captured by exactly the same set of closures 2. Have no backwards branching between the allocation of the two environments 3. Have the same environment lifetime If so, all of the variables will be merged into a single closure environment. Fixes #29965
Showing
此差异已折叠。
想要评论请 注册 或 登录