google / google/closure-compiler
Proposal: stop special casing constructors in collapse properties
Open
- Dominant language
- JavaScript
- Stars
- 7.7k
- Forks
- 1.2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 6
Description
CollapseProperties currently collapse properties on constructors unconditionally. This seems unnecessary with our type based optimizations (which will disambiguate properties on constructors when possible, if uncollapsed).
1) continue to collapse properties on constructors that are unescaped
2) enhance "RemoveUnusedClassProperties" or "RemoveUnusedPrototypeProperties" to be able to remove properties added to functions annotated as "constructors".
Contributor guide
Assessment
This issue has not been assessed yet.