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>
For this to work properly, we first need the test infrastructure to have support
for the `--output-directory` flag (see base CL)
Change-Id: I75f788d19ad3b4e9523830250c4a1c9de8418cda
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104400
Reviewed-by: Johnni Winther <johnniwinther@google.com>
This reverts commit 7fe8659613.
Reason for revert: we decided to take an alternative approach to solve the problem.
Original change's description:
> dump-info: Use relative paths for library canonicalUri...
>
> ...if they are within the working directory
>
> Makes output from dump-info more stable, especially with pkg:build
>
> Change-Id: I3e6c444a0aa7df55c10e1bdff4b59ef035d2acc3
> Reviewed-on: https://dart-review.googlesource.com/53168
> Reviewed-by: Harry Terkelsen <het@google.com>
> Commit-Queue: Kevin Moore <kevmoo@google.com>
TBR=kevmoo@google.com,het@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I701847cf8879599c3d129a83809b8fe1c9d9d172
Reviewed-on: https://dart-review.googlesource.com/54141
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
...if they are within the working directory
Makes output from dump-info more stable, especially with pkg:build
Change-Id: I3e6c444a0aa7df55c10e1bdff4b59ef035d2acc3
Reviewed-on: https://dart-review.googlesource.com/53168
Reviewed-by: Harry Terkelsen <het@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
This removes third_party/pkg/kernel and changes dependencies to
refer to pkg/kernel instead.
Some status files are updated to reflect new test outcomes.
- initial visitor to collecting data about sends (incomplete)
- logic to emit data in a json summary file.
- logic to print summary information on the command-line
- logic to display some of the data in a web UI.
BUG=
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org//1220043005 .
libraries.
For example, running this on the dump-info of angular2 'hello
world' would produce:
path 8807 1.21%
stack_trace 11501 1.59%
intl 14135 1.95%
Loose files 142311 19.62%
angular2 224171 30.90%
Core libs 225120 31.03%
All packages 258614 35.65%
TOTAL 626045 86.30%
Note that the grouping of libraries, say by package, and summary information is
configurable.
R=het@google.com
Review URL: https://codereview.chromium.org//1287543002 .