I started doing this the normal way, but the two codes appear to differ
only based on whether the field was final, and I don't think that factor
is important to the nature of the error, so I think a single code is
sufficient.
Change-Id: I693dcfb1a2a4b47a8b82fe4860e7a61c82ca062e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196880
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Fix `application_snapshot`'s depfile to track the sources of the application instead of the compiler. Split compiling the compiler into a separate GN target with its own depfile.
Bug: https://github.com/flutter/flutter/issues/81074
Change-Id: I0fb23ada40a6241ee3dde7f6cfebdd121b9a4224
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/197020
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Previously we used timestamps to detect if a file has been changed.
This works for files that rarely change. However, for a file that is
changed a lot, this doesn't really work reliably due to the low
resolution of timestamps. This is the case for `command.log` that we
use to detect Bazel builds: Bazel writes to it continuously so we
detect a lot of changes, but the last update to the file might end up
having the same timestamp, which means that we might miss the fact
that a build finished.
This commit changes the code to also use the length of the file when
trying to figure out if a file has been changed. A better check would
be to hash the contents, but I'm slightly afraid of the performance
impact for files like `command.log` that we watch, and which can be
both fairly large (multiple megabytes) and change a lot. Even for
other files, if we have a large build that finished, we could have
1000s of file that we'd need to read and hash. So for now I went with
the size of the file instead. I could be convinced otherwise though ;)
Bug: http://b/184120864 and http://b/186200325
Change-Id: I1bf13adab5164c9ec04b59b275f2c83b96d08ea4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/197043
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Michal Terepeta <michalt@google.com>
Change-Id: Iabedb96c5f6837236181706a59b381283f06823a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/197101
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
This removes warnings like these:
```
ld: warning: object file (../../buildtools/mac-x64/clang/bin/../lib/libc++.a(memory.cpp.o)) was built for newer OSX version (10.13) than being linked (10.8)
```
These warnings seem to be harmless but may indicate that our builds are
no longer working below macOS 10.13. On developer machines, these
warnings don't seem to occur. We don't test on versions older than 10.13
so we can't guarantee that the Dart SDK works on those.
https://github.com/dart-lang/sdk/issues/40850
Change-Id: I1b146803605daa9e42d4283722efb39ecd66f0ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/146803
Reviewed-by: Ryan Macnak <rmacnak@google.com>
This avoids analysis crash in VS Code when opening the SDK.
Change-Id: I44f13d9f1c871fe77a023008fc44e42bbfbbe7a3
Bug: https://github.com/dart-lang/sdk/issues/45700
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196670
Auto-Submit: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Change-Id: I543cee3c7a70816526a0fa9ed1bcc7e7d127804c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/197041
Auto-Submit: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2021-04-22 sgrekhov@unipro.ru 993. Wrong annotation tests added
2021-04-22 sgrekhov@unipro.ru 993. Packed tests added
2021-04-21 irina.arkhipets@gmail.com Issue 1081: Missing Issue tags added to the tests.
2021-04-21 sgrekhov@unipro.ru Fixes 1004. Add tests that confirms that tight-looped isolate is not killed with Isolate.beforeNextEvent priority
2021-04-20 sgrekhov@unipro.ru Fixes 1078. Expect an error in case of cyclic initialization
Cq-Include-Trybots: dart/try:analyzer-nnbd-linux-release-try,analyzer-nnbd-mac-release-try,dart2js-nnbd-linux-x64-chrome-try,ddc-nnbd-linux-release-chrome-try,front-end-nnbd-linux-release-x64-try,vm-kernel-nnbd-linux-release-simarm64-try,vm-kernel-nnbd-linux-release-x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try
Change-Id: I04d6af2bcf7fd436082f460d9b91c22f7a1f1255
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/197040
Auto-Submit: Alexander Thomas <athom@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: William Hesse <whesse@google.com>
This reverts commit a23c31bf8d.
Reason for revert: The bootstrapping compilations are a bit confused about whose deps they're writing
Original change's description:
> [build] Don't list Dart sources up front when creating application snapshots.
>
> GN/Ninja will discover them via the depfile created alongside the snapshot.
>
> Bug: https://github.com/flutter/flutter/issues/81074
> Change-Id: I6e0f07214e8ea29e6d23261c71558da06fd2223a
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196982
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Commit-Queue: Ryan Macnak <rmacnak@google.com>
TBR=bkonyi@google.com,rmacnak@google.com,chinmaygarde@google.com
Change-Id: I267b6bac2676a18f57291c8472fab5c2aaa60284
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/flutter/flutter/issues/81074
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/197000
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Calls from C++ to Dart entry points are currently performed by
calling via Function::entry_point() in AOT mode
(with --use_bare_instructions). Such calls no longer use
Code objects, so Code objects can be discarded even if they
belong to a Function which is used as an entry point.
TEST=ci
Issue: https://github.com/dart-lang/sdk/issues/44852
Change-Id: Iaf9dd67392780ef4344fc518865ffbe30648762e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196720
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
The soft-deferred experiment no longer generates working code and is
in the way of some work in progress.
Change-Id: I3f1043b5e289981ab9351247e7b02ee9671f565f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196551
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
This is important for keeping shifts compiling properly on some
platforms: because some shift variants only support constant shift
distances, so an interfering IntConverter inserted by the
representation selection pass causes compilation to fail.
This fixes Meteor benchmark, which is currently crashing the compiler.
TEST=runtime/tests/vm/dart{,_2}/regress_lsl_with_constant.dart
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm64-try
Change-Id: Ie2f316cd917a8ebd8d3d96f394b39eac4d135d95
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196662
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
When --resolve-dwarf-paths is enabled, then paths output to DWARF
information will be resolved to either an absolute or relative path.
If this cannot be done, snapshot creation fails.
File URIs are output as absolute paths.
SDK URIs are output as paths relative to the SDK root.
TEST=vm/dart{,_2}/use_resolve_dwarf_paths_flag_test
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try,vm-kernel-precomp-linux-product-x64-try
Change-Id: I63c694f0f707ef6a3d3faa690e001fefe2b26094
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196491
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
This way, it is appropriately enabled if possible during snapshot
loading if the snapshot was compiled with --code-comments, instead of
forcing the user to remember to run the snapshot loader with
--code-comments to avoid a runtime failure.
TEST=vm/dart{,_2}/use_code_comments_flag_test
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try
Change-Id: Ib3de04ecbd95ee4069c3d31ef3e4dc4b2a3ac94c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196668
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
This instruction operations on the lo/hi parts of D register and not
on S registers - which means we should not be using D->(S, S) projection
helpers because not all D registers have corresponding even/odd S
registers.
vmovd D20[0], ... is a valid ARM instruction, but viewing it as
vmovd S40, ... is incorrect (because there is no such thing as S40).
Fixes https://github.com/dart-lang/sdk/issues/45805
TEST=lib_2/typed_data/float32x4_test on dartkp-linux-debug-simarm-crossword
Change-Id: Ia2fc827e1e629cdf5f2b66502681a080274fd73c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196660
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
When handling a type check to FutureOr in TFA, there is a case
when a ConcreteType is a subtype of Future. In such case, it was
assumed that ConcreteType has only 1 type argument.
This is not true if class extends/implements/mixes-in Future along
with another generic class.
This change adds the logic to query offset of Future type arguments in
the type arguments of a class and also check if the type argument is
known.
TEST=pkg/vm/testcases/transformations/type_flow/transformer/regress_flutter81068.dart
Fixes https://github.com/flutter/flutter/issues/81068
Change-Id: I970e649823bafec433fc21a286498acc0126b331
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196546
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
This reverts commit 80102c981b.
Reason for revert: b/186359854
Original change's description:
> [vm] Switch datastream Write/WriteUnsigned to (S)LEB128.
>
> This reduces the number of variable-length integer encodings in our
> database from 2 to 1, and chooses the more standard one.
>
> TEST=Existing tests, in particular any that involve snapshots.
>
> Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-asan-linux-release-x64-try,vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-msan-linux-release-x64-try,vm-kernel-precomp-ubsan-linux-release-x64-try,vm-kernel-precomp-tsan-linux-release-x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-precomp-nnbd-linux-debug-simarm_x64-try,vm-kernel-precomp-linux-debug-simarm64c-try,vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64c-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-release-x64-try
> Change-Id: Ia700158ac873ad32ac28c1027a669895961bc715
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196321
> Commit-Queue: Tess Strickland <sstrickl@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: Idf32bdd879cf8bb7407f6dae764312140ad6eeb2
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-asan-linux-release-x64-try,vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-msan-linux-release-x64-try,vm-kernel-precomp-ubsan-linux-release-x64-try,vm-kernel-precomp-tsan-linux-release-x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-precomp-nnbd-linux-debug-simarm_x64-try,vm-kernel-precomp-linux-debug-simarm64c-try,vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64c-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196920
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>