This speeds up update_expectations.dart by avoid to restart
the expectation testing for each suite.
Change-Id: If0a4562f92f106c1c04bd22a81eb28e52591c4b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/343220
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
llvm-nm for Linux and macOS needs to be for the right operating system
if the local checkout contains clang toolchains for other operating
systems.
Change-Id: I8de702474a6fa14f06b48e3e60756b3f414272f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342940
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Previously the fields `bound` and `defaultType` of
`NominalTypeVariable` weren't computed from dill for the restored type
variables. That approach required to manually restore them in several
placses, making the process error prone. This CL contains changes that
compute `bound` and `defaultType` every time a `NominalTypeVariable`
is restored from dill.
Change-Id: Id25b405296769b2eb67dba8e7b41bf9e624d7365
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342841
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Different versions of macOS seem to be using a different error message,
which the test didn't reflect.
Closes https://github.com/dart-lang/sdk/issues/54424
TEST=tests/ffi/dylib_open_test.dart
Cq-Include-Trybots: luci.dart.try:vm-mac-release-arm64-try,vm-mac-release-x64-try,vm-linux-release-x64-try,vm-win-release-x64-try
Change-Id: I6e7a20bce9defd1550abbd0e8eb7487b5f833257
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342901
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
The migration to the new test format ended up duplicating
`EmptyStruct` leading to many unrelated errors.
This CL removes all the duplicates. And accepts the current analyzer
and frontend semantics as is.
TEST=tests/ffi/vmspecific_static_checks_test.dart
Change-Id: I4f8ad08a892804d6a6a4335807fde324578e900a
Cq-Include-Trybots: luci.dart.try:analyzer-linux-release-try,analyzer-mac-release-try,analyzer-win-release-try,front-end-linux-release-x64-try,front-end-nnbd-linux-release-x64-try,front-end-nnbd-mac-release-x64-try,front-end-nnbd-win-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342900
Reviewed-by: Alexander Markov <alexmarkov@google.com>
This fixes snippets in the documentation for error codes related to
native fields by adding the `Int` type to the mock SDK and adding
missing `external` or `final` modifiers.
Closes https://github.com/dart-lang/sdk/issues/54416
TEST=pkg/analyzer/test/verify_diagnostics_test.dart
Cq-Include-Trybots: luci.dart.try:analyzer-mac-release-try
Change-Id: Ia07ae8d200c22742797596ff1f4f78c75649f28c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342941
Reviewed-by: Marya Belanger <mbelanger@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
When compiling a `while` in an `async` function, we need to allocate the
context for the `while` *before* compiling the `while` condition,
because any variables introduced in `while` condition will be stored in
the `while` context, rather than the parent context.
Instead of fixing where we allocate `while` context, we could update
`CaptureFinder` to add variables in the condition to the parent context,
and update `for` code generator, as it currently allocates `for` context
before the conditions.
I don't know if that has any advantages, for now it should be OK to
update `while` code generator.
`for` code generator allocates the context before the conditions and
does not have this issue.
Fixes#54406.
Change-Id: I3c6bb7558a352d78c8f8a46a56d9bd3af68841a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342760
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
This reverts commit 1f109d10ec.
Reason for revert: This interferes (weirdly) with which expectation files are being generated.
Original change's description:
> [cfe] Run suite in together in update_expectations.dart
>
> This speeds up update_expectations.dart by avoid to restart
> the expectation testing for each suite.
>
> Change-Id: Idaeb1cff3ac861b6d4781a4166442a102c754c71
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342586
> Commit-Queue: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Jens Johansen <jensj@google.com>
Change-Id: I807ab0dab9e7349bb09350a788f59d2ae7156804
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342840
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Use `FormatMessageA` to allocate an English description of an error code.
Previously, only the error code itself was shown.
Closes https://github.com/dart-lang/sdk/issues/52790
TEST=tests/ffi/dylib_open_test.dart
Cq-Include-Trybots: luci.dart.try:vm-win-debug-x64-try,vm-win-debug-x64c-try,vm-aot-win-debug-x64c-try,vm-aot-asan-linux-release-x64-try,vm-asan-linux-release-x64-try
Change-Id: Iccae6c763fb16d4bb999b9c260fcfea9c5de276b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/328420
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
This is done via the new json communication channel, which initially
also added support for sending "scriptUri" and "offset".
The js version of expression compilation still needs updating.
Flutter etc will also still have to be updated.
Change-Id: I428bda68aaa13aa947b57e87f7a5bfb28802cf95
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341921
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
This adds an option to compile expressions (vm ones and javascript ones)
by communicating via json. This allows for future expansion without
destroying the communication channel.
For now the old versions will continue to exist, again to not destroy
alreadyy used communication channels.
Flutter etc. should be updated to use this new json communication,
but it can wait until plumbing in passing offset and scriptUri anyway.
Change-Id: Ifbff752527fea35e09a73e0bb210072d8ab81cdc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342340
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
This speeds up update_expectations.dart by avoid to restart
the expectation testing for each suite.
Change-Id: Idaeb1cff3ac861b6d4781a4166442a102c754c71
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342586
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
It's not clear that we need two; I kept the one with the better
`toString`.
R=jakemac@google.com
Change-Id: I80934c0f1b05b0c486105654b03b628e7acf439b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341920
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Morgan :) <davidmorgan@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Auto-Submit: Morgan :) <davidmorgan@google.com>
This adds a new rule to exhaustiveness handling of the as-pattern. The
new rule checks whether the cast type is fully contained in the space
of the subpattern. If so, we can assume that the whole context type has
been matched because there is no value that passes the as-test that
would be rejected by the subpattern.
Closes#51986Closes#54125
Change-Id: I0dc7fb072395aa3bc9f0b143afb320966f9d64c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/338760
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
After the previous two rules were removed, this is the only rule that
uses this logic, and there is no need to overcomplicate the rule.
Change-Id: I49f5b989da02e1be404ee76809b3d0a0602b5f36
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342200
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
A recent change added an architecture subfolder to the distribution
of d8 binaries (see
https://dart-review.googlesource.com/c/sdk/+/336200). In the process
a lookup for the 'arch' was added in most uses of d8 in the repo,
but the changed missed the one in ddb (probably because this has no
test coverage).
Change-Id: I2a7639fb19f8fa0131fc636f31b233aef701e8c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342660
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
This is a reland of commit 0a393f1b69
The problem was that the checks for whether or not dartaotruntime
existed were always returning false on Windows because the ".exe" suffix
wasn't being taken into account. Patchset 2 addresses this.
Original change's description:
> [ DDS ] Fix DDS AOT snapshot build rules
>
> dds_aot.dart.snapshot was not being generated for runtime build targets,
> and dds.dart.snapshot was being built regardless of whether or not we
> were building for an IA32 target.
>
> This change also adds a check for IA32 in 'dart run' so the "Could not
> find dds_aot.dart.snapshot. Have you built the full Dart SDK?" message
> isn't printed when we fall back to using dds.dart.snapshot.
>
> This change also reverts 2cc08595a6, which
> failed to fix the issue it was attempting to fix.
>
> TEST=pkg/vm_service tests
>
> Change-Id: Ic990082c25b0d022093ad66600332dfb2878709f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341760
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Commit-Queue: Ben Konyi <bkonyi@google.com>
TEST=pkg-win-release-try, pkg-win-release-arm64-try, and pkg/vm_service
tests
Change-Id: Ieab41edcb6bffca3be6bf628e357871f28949323
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342640
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
This adds reporting of errors on initializing formals and
function formal parameters in primary constructors of
extension types. These are not supported by the current grammar.
Change-Id: I9e09ea599b9a455398a20c34b79c375fd884423d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342583
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>