This reverts commit 08f59e5de3.
There are no changes to take 3 except fixing merge conflicts.
Change-Id: I45d5a16274c80f469827c19f4e4f4ca724e85a67
Cq-Include-Trybots: luci.dart.try:vm-kernel-win-release-x64-try,vm-kernel-optcounter-threshold-linux-release-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-win-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/68363
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
which was blocking the Dart SDK roll.
Revert "Take 3 for "[vm/kernel/precomp] Remove procedures from entry points files.""
This reverts commit 567109df7f.
Revert "[vm/precomp] Extend @pragma entry-points to classes."
This reverts commit 232698047c.
Change-Id: Ib63d1afb8a1c978be7ddf282af0e7d5547111cc3
Reviewed-on: https://dart-review.googlesource.com/67300
Reviewed-by: Alexander Markov <alexmarkov@google.com>
I've updated the transformer test. The Windows build error appears to have been spurious.
Take 2 is in patchset 1.
Cq-Include-Trybots: luci.dart.try:vm-kernel-win-release-x64-try,vm-kernel-optcounter-threshold-linux-release-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-win-release-x64-try
Change-Id: I6ef8f70aaf4664e0411e776463e88c2a1068dbcc
Reviewed-on: https://dart-review.googlesource.com/65902
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
This reverts commit a437b4b469.
Reason for revert: Build on Windows appears broken.
Original change's description:
> Re-land "[vm/kernel/precomp] Remove procedures from entry points files."
>
> The original revision is in Patchset 1.
>
> Due to idiosyncrasies of the legacy VM parser, we need to put the @pragma definition
> on both the original and patched definition. Hopefully we can remove these extra definitions
> once Dart 1 AOT is fully obsolete.
>
> Cq-Include-Trybots: luci.dart.try: vm-kernel-optcounter-threshold-linux-release-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-win-release-x64-try
> Change-Id: I2515dee2bbf14cece5e75450b1951d45f1250959
> Reviewed-on: https://dart-review.googlesource.com/65545
> Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
> Reviewed-by: Alexander Markov <alexmarkov@google.com>
> Commit-Queue: Samir Jindel <sjindel@google.com>
TBR=lrn@google.com,alexmarkov@google.com,sjindel@google.com
Change-Id: I783dcd6f00d1f31907d90651ffbf80a6af1fb98d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Cq-Include-Trybots: luci.dart.try: vm-kernel-optcounter-threshold-linux-release-x64-try, vm-kernel-precomp-linux-debug-x64-try, vm-kernel-precomp-linux-release-simarm-try, vm-kernel-precomp-linux-release-simarm64-try, vm-kernel-precomp-linux-release-x64-try, vm-kernel-precomp-win-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/65960
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
The original revision is in Patchset 1.
Due to idiosyncrasies of the legacy VM parser, we need to put the @pragma definition
on both the original and patched definition. Hopefully we can remove these extra definitions
once Dart 1 AOT is fully obsolete.
Cq-Include-Trybots: luci.dart.try: vm-kernel-optcounter-threshold-linux-release-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-win-release-x64-try
Change-Id: I2515dee2bbf14cece5e75450b1951d45f1250959
Reviewed-on: https://dart-review.googlesource.com/65545
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
GrowableArrayMarker was a class that implemented int and was used to
enable implementation of default List factory constructor in pure Dart:
factory List([int length = GROWABLE_ARRAY_MARKER]) {
return identical(length, GROWABLE_ARRAY_MARKER) ? new _GrowableList<E>(0)
: new _List<E>(length);
}
Its existence complicated all kinds of things in the VM and it is finally
time to remove it.
Instead we build List factory body directly in IL.
This CL also provides inlining rule for `new List(n)` case.
Change-Id: I870751658a4ac17fce649c9ac70395ff88a5436c
Reviewed-on: https://dart-review.googlesource.com/57262
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
I collected statistics for the sizes and capacities of growable arrays which are promoted to old-space or survive an old-space gc when running dart2js and Fasta. For these applications, the vast majority of arrays stay empty. More than half of the total object size of promoted backing arrays is backing for empty growable arrays.
Furthermore, since the overhead for an array is 3 words (header, type parameters and length), and object sizes are rounded up to an even number of words, we waste one word for all even-sized arrays.
This CL changes the growth strategy so that empty growable arrays are created with a shared, zero-sized array as backing, avoiding the allocation of a backing array if no elements are added. When the array needs to grow, it starts out at 3 and grows to double size plus one each time: 7, 15, 31, ...
A few places in the VM code need to handle these shared, zero-sized arrays specially. In particular, the Array::MakeArray function needs to allocate a new, empty array if its result is to be returned to Dart code.
Benchmarks suggest that the change improves memory usage by a few percent overall and does not significantly affect run time.
BUG=
R=erikcorry@google.com
Review-Url: https://codereview.chromium.org/2949803002 .
Fix observatory tests broken by running dartfmt due to line and column changes.
Temporarily reverted formatting for evaluate_activation_test.dart as dartfmt doesn't yet handle multitests.
BUG=
R=johnmccutchan@google.com
Review-Url: https://codereview.chromium.org/2759973004 .
I've omitted files where the formatter output is significantly uglier
than the original code and I'll send those files in a separate CL
with options for how to make the code look reasonable while still
taking advantage of the formatter.
BUG=
R=johnmccutchan@google.com
Review-Url: https://codereview.chromium.org/2751423005 .
The analyzer has a stricter patch parser than the VM. Patch files
cannot change signatures of patched members. Specifically, they cannot
change:
- the return type
- a parameter's name
- a parameter to an initializing formal
- an optional parameter's default value
BUG=
R=asiva@google.com
Review-Url: https://codereview.chromium.org/2612043002 .
This should help least-upper-bound computations to not think of EfficientLength
as completely separate from Iterable even though they are always used together.
It doesn't solve all problems with the least-upper-bound computation,
but at least some of the more often occuring ones.
R=floitsch@google.com
Review URL: https://codereview.chromium.org/2467113003 .
Allow members of patch classes to be annotated with @patch. The VM
ignores the annotation. I simply replaces the original method
if the name matches, or reports an error if field names match.
Adding a bit is_patched to members to do more checking remains a
TODO. There are currently no unused bits available, and I don’t want
to increase the size of Function objects for this.
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org/2230383003 .
Annotate patch classes and top-level patch functions with @patch
instead of the pseudo-keyword patch. This allows the analyzer
to read patch files, and matches the syntax that dart2js uses.
The deprecated syntax is still supported, but a warning is printed when detected.
BUG=
Review URL: https://codereview.chromium.org/2220883004 .
It's still not a good solution for detecting an Iterable with an efficient
length. It's not inherited by, e.g., a DelegatingIterable wrapper or similar
generic Iterable transformers.
Keep this as an internal optimization for quickly detecting the most common
efficient-length Iterable classes (List, Set, Queue, Map.keys/values), but
don't make it public.
A *real* solution would be adding a hasEfficientLength getter to Iterable, or
adding an efficientLength getter that may return null if it's not efficient.
This would something that a wrapper can attach to.
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//1154263003