aeb3a5884d
When inlining a method call, if a parameter is using multiple times then (except in the case of variables) we should capture the argument value in a variable to avoid potential side-effects (or worsened performance) of evaluating the expression multiple times. Fixes https://github.com/dart-lang/sdk/issues/52844 Change-Id: Icc52e478fd27cedfb68a032af19cc58bb1444167 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/452780 Reviewed-by: Samuel Rawlins <srawlins@google.com> Commit-Queue: Samuel Rawlins <srawlins@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>