google / google/closure-compiler

Proposal: stop special casing constructors in collapse properties

Open
#637 3 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.