23ee425de7
The existing signature shaker transforms optional and named parameters of static and top-level methods and constructors into required parameters whenever they are always passed. This change improves signature shaking in a number of areas: - Extend signature shaking to cover instance methods. - Remove parameters which are never passed. - Remove parameters which are not used. - Transform signatures before unboxing, enabling transformed parameters to be unboxed. TFA summaries for transformed functions are updated to stay in sync with the program for later transformations. Reduces instructions size of Flutter Gallery on ARM64 by 2.2%. Issue: https://github.com/dart-lang/sdk/issues/40488 Change-Id: I39e364bc23b01e4502864d7369a745a9278cfb92 Cq-Do-Not-Cancel-Tryjobs: true Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161175 Commit-Queue: Aske Simon Christensen <askesc@google.com> Reviewed-by: Martin Kustermann <kustermann@google.com> Reviewed-by: Alexander Markov <alexmarkov@google.com>