a6b76a610a
Allows spread, collection for and collection if in list literals to avoid unnecessary checks that the list is growable/modifiable and type checks when adding the elements to the list. Use a `push()` on the underlying JavaScript Array rather than calling the exposed `add()` method. The related ListCopy benchmarks show a performance increases between 10-40%. https://golem.corp.goog/Comparison?repository=dart&team=dartdevc#targetA%3Ddartdevc%3BmachineTypeA%3Dlinux-x64%3BrevisionA%3D89256%3BpatchA%3Dnshahan-optimize-list-add%3BtargetB%3Ddartdevc%3BmachineTypeB%3Dlinux-x64%3BrevisionB%3D89253%3BpatchB%3DNone Change-Id: I7e3ac3044d2af319a7ea40bbceef1d65ecec8261 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172082 Reviewed-by: Mark Zhou <markzipan@google.com> Reviewed-by: Stephen Adams <sra@google.com> Commit-Queue: Nicholas Shahan <nshahan@google.com>