fa6fce61fa
Rationale: Previous method cached graph information (instruction and call site counts) on a per-function level, not accounting for potential specializations. The improved method runs an extra constant folding pass, and only caches per-function information for non-specialized cases. As a result, we inling much better, see for example, the added test as illustration. Since we no longer cache for constants, compile-time may be increased a bit due to the extra scan. In the long run we should consider for common constant "situations" as the call site. https://github.com/dart-lang/sdk/issues/36880 Change-Id: I19f007c7f1860ad0ea88fafb38695dc154189ad5 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105460 Commit-Queue: Aart Bik <ajcbik@google.com> Reviewed-by: Martin Kustermann <kustermann@google.com> Reviewed-by: Alexander Markov <alexmarkov@google.com>