3f717df415
Inferring array element type E from static type Iterable<E> allows compiler to remove extra checks left from iterator code. This is valid as List<E> implements Iterable<E>. This change makes for-in loops over built-in lists with static types Iterable<E> as efficient as loops over List<E>. TEST=runtime/tests/vm/dart/regress_56840_il_test.dart Fixes https://github.com/dart-lang/sdk/issues/56840 Change-Id: Ie52208b9c3e92dcc52079e66c910b023f09a2173 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/392401 Reviewed-by: Slava Egorov <vegorov@google.com> Commit-Queue: Alexander Markov <alexmarkov@google.com>