Do not create phis for length since it confuses bounds checker and
results in ugly code for for-in Array expansion.
Change-Id: I75160d38a8ad924b5a3f72fa4dd3d9f0d04e88b1
Reviewed-on: https://dart-review.googlesource.com/22303
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
This involves a few main pieces:
- Add code to the GN scripts to generate DDC's patched SDK and then
compile it to summaries and JS in the build output directory.
- Add support to the underlying DDC build scripts to support controlling
which files are built where.
- Update test.dart to use the DDC SDK from the build directory.
- Update create_sdk to use the built SDK instead of the checked in one.
- Fix various internal DDC tools to build their own copy of the SDK
(since they can't easily find the one in the build directory because
it's path if config-specific) and use those.
- Delete the checked DDC SDK JS and summaries.
I think I got everything working. The built Dart SDK looks fine -- it's
identical to one built using the old build scripts.
The various tools and DDC's little test runner I *think* work, but there
may be a bug or two in there. I tried the various things I could and it
seems like they work but it's hard to tell since they may be kind of
broken right now anyway.
Bug:
Change-Id: Iea77915a5c1cc8450f60ebfbdf8c725c7ea2f32c
Reviewed-on: https://dart-review.googlesource.com/18144
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
We never need to add assignability checks when doing top level
inference; putting the check inside checkAssignability avoids the need
to remember to put it at every call site.
In order to keep type inference consistent between top level and local
type inference, I've modified the handling of assignments so that the
computations performed by checkAssignability do not influence the
inferred types. For example, when performing type inference on `a =
b`, we used to consider the resulting expression to have the type of
`a` if a downcast was required, otherwise the type of `b`. Now we
always consider the type of the assignment to be the type of `b`.
This is consistent with the informal spec of type inference. This
change introduces some mal-typed kernel nodes in error recovery
situations, which I will fix in a future CL--see issue #31417.
Change-Id: I02e8dff54e2184e6f059d1339e51edf42c4cd058
Reviewed-on: https://dart-review.googlesource.com/22260
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
At this point KernelDriver is used only by Analyzer, so I don't include
anyone from the FrontEnd team. We will merge to get the same performance
benefits of the latest IKG approach, but later.
Only just enought integration is done - we can store and apply
types in the local variable declaration.
Everything is in disarray, I will follow up with improvements.
R=brianwilkerson@google.com, paulberry@google.com
Bug:
Change-Id: Ie3434e26233b84fb019c50a7cc834a08d0dadbed
Reviewed-on: https://dart-review.googlesource.com/22202
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This brings IKG recompilation time from 20-30 ms range to 5-10 ms range,
i.e. 3-4 times faster.
Of course performance of the system in general starts depending now
on how how many libraries we need to send to VM, and how fast the client
of IKG can serialize the returned libraries.
1. Leaf library.
Compilation: 10 ms
Returned libraries: 8
Serialization time: 1 ms.
2. A deep library.
Compilation: 10 ms
Returned libraries: 222
Serialization time: 60 ms.
R=paulberry@google.com, sigmund@google.com
Bug:
Change-Id: I5eab99c0bd7916d605696696d5e570c5fa6f1978
Reviewed-on: https://dart-review.googlesource.com/21900
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
This behavior isn't useful since AppJIT snapshots.
Update non-pointer field initizations to be in declaration order.
./out/ReleaseX64/run_vm_tests StandaloneSnapshotSize
266553 -> 264163 (-0.89%)
Change-Id: Id5d85f73e22042be0c7a51420a6c1a9ad1cc0839
Reviewed-on: https://dart-review.googlesource.com/19880
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
This just makes the name more appropriate since now that the default incremental
generator is not using kernel-driver altogether.
Change-Id: Ic7357dbb4eaad482f20249dd13ba3a49a39322d3
Reviewed-on: https://dart-review.googlesource.com/22160
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
A test introduced in https://dart-review.googlesource.com/c/sdk/+/21080
still did not have the correct expectations for the VM precompiler.
The test was marked as crashing except on arm and simarm64, but it does not
crash on x64 except in debug mode. (I'm not actually sure that it crashes
in all the other configurations that we say it crashes in, but it definitely
does not crash in x64 release or product modes.)
Bug:
Change-Id: I25a8f3cf6cb91cf128cd715d1aaeca2e87d26be4
Reviewed-on: https://dart-review.googlesource.com/22080
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
The changes in this CL include:
* handle interface targets also on this dispatch (which happens due
to mixins)
* preserve class members if interface targets refer to them
* remove references to shaken elements in `Library.additionalExports`
* support handling of typedefs
Change-Id: Id8df6fbf5c3428ae9c9f8b11ee9bf80c35a7a091
Reviewed-on: https://dart-review.googlesource.com/21640
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
This change to the status files should enable running all combinations of
compilers from {dartdevc, dartdevk} and runtimes from {none, chrome}.
Bug:
Change-Id: I88827496c4bff7ed556cc555ce3a1932f0e829b7
Reviewed-on: https://dart-review.googlesource.com/21642
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Running a test via pkg/testing where the command line starts with "--"
would throw a RangeError (it's asking for a range from 0 to -1).
Having the "--" somewhere in the middle of the arguments list would not
throw, but instead "eat" an argument.
Bug:
Change-Id: Ie13052a378746c17b343dff7704002a6929088bf
Reviewed-on: https://dart-review.googlesource.com/21920
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
This CL adds a cleanup method to pkg/testing.
This logically allows one to have a "finally" step in a chain to perform
cleanup even upon step failure.
Bug:
Change-Id: I934e97354d733df32f186ebfe370d0307515bebb
Reviewed-on: https://dart-review.googlesource.com/21980
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>