dart-sdk/sdk
Stephen Adams 8c13fa841e [dart2js] Kernel transformer expansion for List.generate
Simple calls to `List.generate` are expanded into a list allocation
and a loop. This generates better code for several reasons:

 - There is no overhead for the function argument (closure allocation,
   closure type, closure class)

 - Global type inference is more precise since each List.generate list
   is tracked separately, and the assignments in the loop give better
   inference to the collection's element type.

To get precise element type inference, there are two new JSArray
constructors. Global type inference starts with the element type being
bottom for these elements, avoiding spurious nulls in the inferred
type.

Change-Id: I5efb90651ae3f9eb2e81af556704960cdf0b75c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168770
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-11-11 04:27:22 +00:00
..
bin [win] Use find.exe from %SystemRoot%/System32 to avoid conflicts with cygwin find. 2020-08-14 18:22:17 +00:00
lib [dart2js] Kernel transformer expansion for List.generate 2020-11-11 04:27:22 +00:00
api_readme.md
BUILD.gn Reland "Switch wasmer FFI boilerplate to new API" 2020-10-13 19:30:58 +00:00