Commit graph

83886 commits

Author SHA1 Message Date
William Hesse 53a9e2045f Remove size benchmarks for discontinued snapshots
Bug: https://github.com/dart-lang/sdk/issues/46100
Change-Id: I6eefd91ea92c345c62b03ad145ed535abc5e3f26
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233182
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2022-02-16 12:27:41 +00:00
Aske Simon Christensen 6faa5f3bd0 [dart2wasm] Initial commit for the Dart-to-WasmGC compiler.
This is work in progress. Several language features are still
unimplemented or only partially implemented.

Instructions for running the compiler and its output can be found in
pkg/dart2wasm/dart2wasm.md. These procedures are preliminary and
expected to change.

The best version of d8 to use for this version of dart2wasm is 10.0.40,
as explained here: https://dart-review.googlesource.com/c/sdk/+/232097

This commit also adds a dart2wasm-hostasserts-linux-x64-d8 testing
configuration to run the compiler over the test suite.

The history of the prototype that this is based on can be seen here:

https://github.com/askeksa-google/sdk/tree/wasm_prototype

Issue: https://github.com/dart-lang/sdk/issues/32894

Change-Id: I910b6ff239ef9c5f66863e4ca97b39b8202cce85
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175728
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2022-02-16 11:11:14 +00:00
Sergey G. Grekhov 5e4f36eda6 [co19] Test that use FFI turned off on not supported platforms
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-nnbd-win-release-x64-try,vm-kernel-precomp-linux-release-simarm64-try
Change-Id: Iccd080591cc3dda60b5bd2ab9d8f2261445df610
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232880
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2022-02-16 09:41:09 +00:00
Johnni Winther f24c4fa919 [cfe] Add initial support for applying the phase 1 macro results
This adds support for the generating a synthesized augmentation
library for each library in which phase 1 macros were applied.
Current implementation piggybacks on the patch library support. The
intension is that both patches and augmentations are handled through
the same general mechanism. For now, the wording refers to augmentation
libraries as patch libraries where the implementation is shared.

Testing is extended to verify that the generated classes are
included in the resulting AST.

Change-Id: Ie0d4cfdc84b55ca87e0014794f14b38e442f08eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233101
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-02-16 09:19:49 +00:00
Stephen Adams 53b730791a Test for #48322
Change-Id: I878a288ac5932de8c83546df91038dcf54cd9039
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231845
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2022-02-16 01:32:14 +00:00
Liam Appelbe 3a3738c6fb Revert "Reland "[vm] Add analyze_snapshot tool for AOT snapshot inspection""
This reverts commit 8d1eedca64.

Reason for revert: Broke the Fuchsia bot: https://github.com/dart-lang/sdk/issues/47950#issuecomment-1040648129

Original change's description:
> Reland "[vm] Add analyze_snapshot tool for AOT snapshot inspection"
>
> This is a reland of 19e5749308
>
> TEST=runtime/tests/vm/dart/analyze_snapshot_binary_test.dart
>
> Original change's description:
> > [vm] Add analyze_snapshot tool for AOT snapshot inspection
> >
> > Current skeleton to allow for instrumentation snapshots that can be
> > built alongside Dart compilation artifacts and easily referenced for
> > specific versions between Snapshot hash <-> DartSDK <-> Flutter Engine
> >
> > TEST=runtime/tests/vm/dart/analyze_snapshot_binary_test.dart
> >
> > Change-Id: Ie3757a265bbf457506c72fb62a625fea7bedcb68
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221087
> > Reviewed-by: Slava Egorov <vegorov@google.com>
> > Commit-Queue: Slava Egorov <vegorov@google.com>
>
> Change-Id: Ia1ea0071d30818440ae48484ff6c406236af5a4e
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/224526
> Reviewed-by: Slava Egorov <vegorov@google.com>
> Commit-Queue: Slava Egorov <vegorov@google.com>

TBR=vegorov@google.com,cmevans@google.com

Change-Id: I1aa0404fa8af9bd31a5c1efbbe7f60d9da2b5b9d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233160
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2022-02-15 18:45:39 +00:00
Paul Berry bf23af8375 Add a language test to check expressions for which implicit call tearoff should occur.
Currently, all the language tests that exercise implicit call tearoff
do so using expressions that are either instance creation expressions
(e.g. `new C()`, where `C` is a class containing a `.call` method) or
simple identifiers.

This test exercises all of the syntactic constructs which are capable
of undergoing implicit call tearoff.

This will help ensure that some upcoming analyzer changes don't break
implicit call tearoff support.

Change-Id: I3e6471a3ba22fb3e3be38f2721db549da631668a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232920
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-02-15 17:57:49 +00:00
Joshua Litt f50a4b4612 [dart2js] Cleanup some TODOs in dart2js' frontend api.
These appear to be no longer necessary.

Change-Id: I8ec8a13394b6e56697de3ccee3a5326b149a137a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233000
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-02-15 17:41:39 +00:00
Paul Berry 904d1af024 Add a language test to check situations where implicit call tearoff does not occur.
I'm not 100% sure we have a spec for precisely when we do implicit
call tearoffs and when we don't, but the CFE and analyzer agree on
this behavior, and I'm about to reorganize some of the analyzer code
that handles it, so I'd like to be sure the behavior is tested.

Change-Id: I1afee375181fde7b3a304aa8b71b23a45a337be0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232784
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-02-15 16:37:50 +00:00
Jake Macdonald e6654814cc Make the serialization mode easily configurable (and required), and some other improvements.
- Support TransferableTypedData in the bootstrap code and IsolatedExecutor.
- Also removed the fake executor and conditional import. Mode will likely be chosen based on factors other than just the availability of `dart:isolate`.
- Run the tests in both serialization modes.

Change-Id: I5c731d192c0d3a8cdc5f7fb900dc07a32f4f4d51
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232981
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2022-02-15 16:16:20 +00:00
Chloe Stefantsova 6c8ad6a723 [cfe] Report errors on declared 'values' member in enums
Part of https://github.com/dart-lang/sdk/issues/47453

Closes https://github.com/dart-lang/sdk/issues/48389
Closes https://github.com/dart-lang/sdk/issues/48387

Change-Id: I8313e3f63122c85c91a9647ddaa53346591d7238
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232841
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2022-02-15 12:22:19 +00:00
Jake Macdonald 97176be3d4 add the local identifier type for parameters, add isStatic field to class members
Change-Id: I15d85fdc4a6b894e6ecda6716f9931e03a8278ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232961
Auto-Submit: Jake Macdonald <jakemac@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-02-15 11:49:50 +00:00
Chris Evans 8d1eedca64 Reland "[vm] Add analyze_snapshot tool for AOT snapshot inspection"
This is a reland of 19e5749308

TEST=runtime/tests/vm/dart/analyze_snapshot_binary_test.dart

Original change's description:
> [vm] Add analyze_snapshot tool for AOT snapshot inspection
>
> Current skeleton to allow for instrumentation snapshots that can be
> built alongside Dart compilation artifacts and easily referenced for
> specific versions between Snapshot hash <-> DartSDK <-> Flutter Engine
>
> TEST=runtime/tests/vm/dart/analyze_snapshot_binary_test.dart
>
> Change-Id: Ie3757a265bbf457506c72fb62a625fea7bedcb68
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221087
> Reviewed-by: Slava Egorov <vegorov@google.com>
> Commit-Queue: Slava Egorov <vegorov@google.com>

Change-Id: Ia1ea0071d30818440ae48484ff6c406236af5a4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/224526
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2022-02-15 10:50:10 +00:00
Aske Simon Christensen 8593f5cd6c Update d8 to 10.0.40
This is a current sweet spot for dart2wasm, since this version is new
enough to support all optional compilation strategies, including
--string-data-segments (as long as it is combined with --nominal-types
and --no-runtime-types) while still supporting the (currently default)
equi-recursive types (which are unsupported from 10.0.41 onward).

This allows us to land dart2wasm in its current form and then change
its type system later, when upcoming WasmGC type system changes in V8
have stabilized.

Change-Id: I05af4265815c2d591ae2630c7bb21c5b043796dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232097
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2022-02-15 09:27:50 +00:00
Ben Konyi 7a0f27f241 [ Service ] Added service tests for enhanced enums
Fixes https://github.com/dart-lang/sdk/issues/47870

TEST=pkg/vm_service/test/enhanced_enum_test.dart

Change-Id: Ifa55c894f331452d1d88131d892d6c153dcbe8cf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232225
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-02-15 00:36:10 +00:00
Paul Berry 5d7445e972 Migration: respect built_value @nullable annotations even when there is no codegen
Previously, when the migration tool encountered a built_value
`@nullable` annotation, it removed it, because when the built_value
code generator is consuming a library with null safety enabled, it
relies on the presence of a `?` to determine nullability, rather than
an annotation.  However, there was no logic to actually ensure that
the `?` would actually get introduced, because I thought the code
generated by built_value would always create the conditions necessary
to convince the migration tool to introduce the `?` using its normal
graph traversal algorithm.

It turns out this is not the case: when `@nullable` appears in an
interface class that is used by other built_value classes, but is not
itself a built_value class, the migration tool sometimes doesn't have
enough information to figure out that it needs to add the `?`.

So in this CL, I'm doing what I probably should have done in the first
time: adding the necessary logic to the migration tool to ensure that
the `@nullable` annotation gets translated into a `?` regardless of
whether it is required to by generated code.

Bug: https://buganizer.corp.google.com/issues/217863427
Change-Id: I9efe5241634389981a4c56e764bac91b3350c4fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233003
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-02-15 00:32:50 +00:00
Jaime Wren a2f887ea59 New optional enum input, CompletionCaseMatchingMode, in DAS getSuggestions2 request.
Change-Id: Ibddcd7db4f51266c29a104d2b46e93c29ddf5465
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232422
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2022-02-15 00:15:00 +00:00
Joshua Litt 201557fb1d [dart2js] Remove FrontendStrategy.
This CL cleans up some indirection now that we only support
KernelFrontendStrategy.

Change-Id: Iaee8d41e061cc88957cae00d61111cbd8c076d65
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232963
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-02-14 23:44:10 +00:00
Stephen Adams 1314d66d41 [dart2js] Better dead phi removal
Remove dead phis including back-edges and cycles.

Add a postcondition validation for optimization phases.

Add post-phase validation test for dead-phi removal and dead-code elimination.

Bug: https://github.com/dart-lang/sdk/issues/48397

Change-Id: I178cda52dd165e825b9e2d9ae642c22162cee2e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232782
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2022-02-14 23:30:30 +00:00
Sigmund Cherem 447e802aaa [web]: remove a couple dynamic calls in the sdk
Change-Id: I59d4697e981417a695a08b21f3b350fa6f84f484
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232962
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2022-02-14 21:44:20 +00:00
Devon Carew bd5da72538 [dartdev] tweak the pubspec file generation for 'dart create'
Change-Id: I769ef258b9875aeeb23bc9aeca396bc9594197d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232980
Auto-Submit: Devon Carew <devoncarew@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-02-14 21:23:59 +00:00
Joshua Litt 1e799e1580 [dart2js] Merge CompilerImpl into Compiler.
This indirection is no longer needed.

Change-Id: Ic917ec758dc8a8a648fea9f74ddf75f47b6b9d4d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232485
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-02-14 20:42:50 +00:00
Ryan Macnak 57fb2a05a2 [vm, compiler] Fix clobbered PP for callers of AOT allocation stubs on RV.
In the JIT, this PP is saved and restored in stub's Dart frame. In AOT, Dart frames do not save PP because it is a global register within Dart code. On other architectures, PP is a preserved register in the C ABI.

TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/48333
Bug: https://github.com/dart-lang/sdk/issues/48354
Change-Id: I1b6702805a6fb556a1695197e40a89c364af3f8f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232520
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-02-14 20:33:30 +00:00
Stephen Adams 75d4047276 [dart2js] Dead code eliminator should remove dead phis
The bad codegen reported in #48383 was due to an unused phi confusing
the expression-tree construction algorithm. It was trying to generate

    data = cond ? callWithSideEffects() : null;

but `data` is unused, so somehow we generated only

    cond;

We should not have unused phis at this point so I put a safety check
in the above code to not try to build an unused conditional, and
changed the dead-code eliminator to eliminate dead phis.

Now we get

    if (cond)
      callWithSideEffects();

I compared the output for some large apps and there were about a dozen
changes. All looked like improvements, e.g. not assigning to an unused
variable. There was some code missing that is now present, but luckily
for the large apps, it was all code that did not have real-world side
effects.


Fixed: 48383
Change-Id: Id7b32cfa0cbfb47a4d9eff174ad9ae52da99f6a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232781
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2022-02-14 20:15:30 +00:00
Martin Kustermann 525e7f093f [gardening] Skip part of Isolate.spawnUri() which depends on --enable-assertions in PRODUCT mode
The --enable-assertions flag is not avaiable in PRODUCT mode, so we skip
this negative subtest.

TEST=Fixes dartkp-product on a newly added test for vm/dart{,_2}/spawn_uri_aot_test

Change-Id: Ie7be219b6eb2a2ac53ea5048a844fafeb488ba54
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232941
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2022-02-14 18:37:54 +00:00
Joshua Litt 971772bf6d [dart2js] Cleanup a few minor uses of dynamic.
Change-Id: Ic29689ce30f368bfa21bdd2bd13cca038973fba0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232321
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-02-14 18:33:33 +00:00
Martin Kustermann bbefb29ab2 [gardening] Skip standalone{,_2}/io/http_redirect_test
This test was modified (in [0]) to use `dart:mirrors` which doesn't
work in AOT mode. So we'll skip it (which fixes some unapproved dartkp
failures).

[0] https://dart-review.googlesource.com/c/sdk/+/230600

TEST=ci

Change-Id: I02f6efded23ae2fa16ee72b792632f252202adf5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232900
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2022-02-14 18:14:33 +00:00
Danny Tuppeny 4bd312d1e6 [analysis_server] Improve LSP server error messages for invalid paths/parse failures
Change-Id: I1a72ee62e282991b0071d0135c9a658bc5f7e14e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232861
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-02-14 17:07:48 +00:00
Martin Kustermann 31ac1d26f9 [vm] Make Isolate.spawnUri() work in AOT iff the uri is compatible AOT snapshot
Right now the implementation of `Isolate.spawnUri(<uri>, ...)` in
the standalone embedder is to ignore `<uri>` and make the spawnned
isolate from the same AOT snapshot as the main isolate.

This is very confusing and very incorrect.

Instead `Isolate.spawnUri()` should work if-and-only-if the given
`<uri>` points to a valid and compatible AOT snapshot. If not, it should
throw an appropriate exception.

Fixes https://github.com/dart-lang/sdk/issues/48375
Fixes https://github.com/dart-lang/sdk/issues/48326

TEST=vm/dart{,_2}/spawn_uri_aot_test

Change-Id: I279ace08ac1b9a9eed3ae03ebe5d9e2336c1e5c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232603
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2022-02-14 15:18:33 +00:00
Alexander Thomas 30beab0f43 [infra] Add OWNERS to the Dart SDK
* Add team "groups" in tools/OWNERS_<group name>.
* Add top-level OWNERS as a fallback.
* Add OWNERS for all top-level directories.
* Add OWNERS to all packages.

For additional background information see go/dart-sdk-owners.

TEST=No op until code-owners is enabled.
Bug: b/200915407
Change-Id: I7fe6116cc599c749cd50ca16151d6d6a801d99d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229147
Reviewed-by: Jonas Termansen <sortie@google.com>
2022-02-14 14:06:34 +00:00
Alexander Thomas e05620f51c [co19] Roll co19 to a38d7c5685e64499cfbdbfe6548fbd5b63b57f15
2022-02-14 sgrekhov@unipro.ru dart-lang/co19#1301. Roll failures fixed, issue numbers added

Cq-Include-Trybots: dart/try:analyzer-nnbd-linux-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-debug-x64-try,vm-kernel-nnbd-linux-release-simarm-try,vm-kernel-nnbd-linux-release-simarm64-try,vm-kernel-nnbd-linux-release-x64-try,vm-kernel-nnbd-win-release-x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-precomp-nnbd-linux-release-simarm64-try,vm-kernel-precomp-nnbd-linux-release-x64-try,vm-kernel-precomp-nnbd-mac-release-simarm64-try,vm-kernel-precomp-nnbd-win-release-x64-try
Change-Id: Iaf2c52b135242470e01fa602e8ccb324ef29f957
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232840
Reviewed-by: William Hesse <whesse@google.com>
2022-02-14 12:13:23 +00:00
Alexander Thomas 480c8a86e5 [co19] Roll co19 to 310e789d81336ba2b6141788f200e643aa8f0ef7
2022-02-11 sgrekhov@unipro.ru dart-lang/co19#1260. WeakReference.target test added
2022-02-11 sgrekhov@unipro.ru dart-lang/co19#1260. Test that use ffi moved to a separate directory
2022-02-11 sgrekhov@unipro.ru dart-lang/co19#1260. Optional parameters added to triggerGcWithDelay()
2022-02-10 irina.arkhipets@gmail.com dart-lang/co19#1260: Added tests for Finalizer.attach method.
2022-02-10 sgrekhov@unipro.ru dart-lang/co19#1260. Unnecessary delays removed form WeakReference tests
2022-02-10 sgrekhov@unipro.ru dart-lang/co19#1292. Compile error in Enhanced enums example fixed
2022-02-10 sgrekhov@unipro.ru Fixes dart-lang/co19#1297. User-written 'index' is not allowed
2022-02-10 sgrekhov@unipro.ru Fixes dart-lang/co19#1293. Change expected error location in analyzer
2022-02-09 irina.arkhipets@gmail.com dart-lang/co19#1260: Added tests for Finalizer.
2022-02-09 sgrekhov@unipro.ru dart-lang/co19#1258. Enhanced enums test fixed, issue numbers added
2022-02-09 irina.arkhipets@gmail.com dart-lang/co19#1260: Added tests for Finalizer.
2022-02-08 irina.arkhipets@gmail.com dart-lang/co19#1260: Added tests for Finalizer.
2022-02-08 sgrekhov@unipro.ru dart-lang/co19#1258. Add more tests on user-written 'index' and 'values'
2022-02-08 sgrekhov@unipro.ru dart-lang/co19#1289. More roll failures fixed
2022-02-08 sgrekhov@unipro.ru dart-lang/co19#1289. Roll failures fixed
2022-02-08 sgrekhov@unipro.ru Fixes dart-lang/co19#1290. Constant constructors can't have a body
2022-02-08 irina.arkhipets@gmail.com dart-lang/co19#1260: Updated LanguageFeatures/FinalizationRegistry/Finalizer tests.
2022-02-07 sgrekhov@unipro.ru dart-lang/co19#1258. Update Enhanced Enums test. Now user-written 'values' and 'index' are not allowed
2022-02-07 sgrekhov@unipro.ru Fixes dart-lang/co19#1288. Remove 'index' declaration

Cq-Include-Trybots: dart/try:analyzer-nnbd-linux-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-debug-x64-try,vm-kernel-nnbd-linux-release-simarm-try,vm-kernel-nnbd-linux-release-simarm64-try,vm-kernel-nnbd-linux-release-x64-try,vm-kernel-nnbd-win-release-x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-precomp-nnbd-linux-release-simarm64-try,vm-kernel-precomp-nnbd-linux-release-x64-try,vm-kernel-precomp-nnbd-mac-release-simarm64-try,vm-kernel-precomp-nnbd-win-release-x64-try
Change-Id: I67d2028c58733088b5e46ea83092af1fa41c3c53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232600
Reviewed-by: William Hesse <whesse@google.com>
2022-02-14 12:13:23 +00:00
Johnni Winther 74a355c544 [cfe] Use buildAugmentationLibrary on phase 1 results
This CL add support for identifier resolution to use the
MacroExecutor.buildAugmentationLibrary for generating the code.

The CL updates the ResolvedIdentifier to have a nullable [uri] in
order to support built in identifiers, such as `void`.

Change-Id: I9436ea77c06cf5618f1977f4c9ac0490ff059587
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232623
Reviewed-by: Jake Macdonald <jakemac@google.com>
Auto-Submit: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-02-14 11:31:25 +00:00
Lasse R.H. Nielsen 0408bc6c18 Deprecate AbstractClassInstantiationError.
The class is no longer used in Dart 2.0 where instantiating an abstract
class became a compile-time error.

The class is now also exported from `dart:mirrors`. Since `dart:mirrors`
throws this error when trying to call a constructor mirror from an
abstract class, it needs to keep having an error to throw.
For backwards compatibility, we'll keep using the same class,
but restrict it to `dart:mirrors` and remove it from `dart:core`
when possible.

Q.v. #30771

Bug: https://darbug.com/30771
Change-Id: I2eef6ff8b1509b00b0567cc1951ae9972c87c3fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232605
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2022-02-14 11:13:14 +00:00
Aske Simon Christensen 3dbb3595c8 [vm,dart2wasm] Move hash factory code to enable sharing of patch files
By moving the hash map/set factories into their own file, the
collection_patch and compact_hash patch files can be shared between the
VM and dart2wasm.

This builds on the preparations from the creation of the file in
https://dart-review.googlesource.com/c/sdk/+/229905 and listing it in
the Flutter file lists in https://github.com/flutter/engine/pull/31133.

Reland of: https://dart-review.googlesource.com/c/sdk/+/231947
Change-Id: I1baa03ae951ce4f96f9ef31c1a2e79f14f9a3e90
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232401
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2022-02-14 09:25:25 +00:00
Konstantin Shcheglov 85cdbe31ca Report all available libraries in exceptions.
There are two kinds: which we just built, and from readers.
With this change we will cover also just built libraries.

Change-Id: I67fa8ec5eeb00e539b4bd648d35b547dea8b4a7e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232686
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-12 01:49:21 +00:00
Konstantin Shcheglov a646c11592 Add failing test for 'v<int>.^'.
Change-Id: Ib2587e8c5b845cc65d029750ede23c6d4f9206c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232685
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-12 01:49:08 +00:00
Jake Macdonald 49d7f5056f Add a byteData serializer/deserializer implementation
With the optimizations suggested this does now equal or outperform the JSON serializer in all scenarios, the latest numbers from the benchmark are as follows:

Isolate.spawn + SerializationMode.jsonClient: 0:00:00.041666
Isolate.spawnUri + SerializationMode.jsonClient: 0:00:00.069551
Separate process + SerializationMode.jsonClient: 0:00:00.177171
Isolate.spawn + SerializationMode.byteDataClient: 0:00:00.040990
Isolate.spawnUri + SerializationMode.byteDataClient: 0:00:00.059319
Separate process + SerializationMode.byteDataClient: 0:00:00.080008

Change-Id: If5431513c7487d8b7af350381e794cbd61c1be42
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232027
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2022-02-11 23:35:27 +00:00
Konstantin Shcheglov ea4f04f56d Support completion in enum constant argument list.
Change-Id: Id483d6ea3715e567f1d2cc9a2051f615b750a8a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232684
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-11 23:07:25 +00:00
Konstantin Shcheglov 582bf2f230 Completion for constructors in enum constants.
Change-Id: I3a68db8045d249f7459ec0dbf0fbd9c203fccade
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232683
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-11 21:41:37 +00:00
Konstantin Shcheglov 65d7aa3b49 Add OK tests, getter index for MIXIN_APPLICATION_NO_CONCRETE_SUPER_INVOKED_MEMBER.
Change-Id: I34039f61aefc6662cd3b4359024878ed3eca776c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232681
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-11 21:04:07 +00:00
Joshua Litt da66e1f39a [dart2js] Make info_visitor_test cleanup created test data.
Change-Id: I8f70c5d751b670bde2d2b6f3fcc2c163722edac8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232661
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-02-11 19:41:26 +00:00
Konstantin Shcheglov b62949ea1d Semantic highlighting for enums.
Change-Id: Ib3e4aceec56b6bdd28b38a317c4c3981db87b7d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232680
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-11 18:50:57 +00:00
Martin Kustermann 32876877ae [gardening] Remove standalone{,_2}/io/process_run_test from iso-stress builder
The test is flakily failing with low propabililty due to a race on
executing a copy of `process_test` and having this file opened for
writing mode (so it seems).

This issue is not related to isolates and we'll therefore remove it from
the "iso-stress" builder.

TEST=Removes flakiness from "iso-stress" builder.

Closes https://github.com/dart-lang/sdk/issues/48193

Change-Id: I1f817aed9b014b8cdd7a646f35003d40d4712d0a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232624
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2022-02-11 18:29:47 +00:00
Konstantin Shcheglov 8b67b90016 A few tests for completion in class body and similar.
Change-Id: Id8749e4c45d26a5e56de31ce0d8b117db60150a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232486
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-11 18:04:57 +00:00
Joshua Litt 95a924d289 [dart2js] Delete ImpactStrategy.
This strategy is no longer necessary with the single frontend, and
inlining all the logic makes the code much easier to follow.

Change-Id: I73995aa6249b52a932dbfb2d459c2d6633a620d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232029
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-02-11 17:45:07 +00:00
Konstantin Shcheglov d5269652d8 Remove 'index' from enum classes.
Change-Id: I7632aced8cde06c449e694c028d0e7fb2d3312df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232426
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-11 17:35:17 +00:00
Leaf Petersen 4dbd35f04d Reland "Simplify json parser and eliminate dynamic calls."
This is a reland of e77ea8a17b.  I've
undone the change to the name of the platformScript setter, restoring
the previous behavior of accepting anything and casting.

TEST=Existing tests.

Change-Id: I7e36935ef3784035769527dc5624191f38faaa40
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232487
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Leaf Petersen <leafp@google.com>
2022-02-11 16:06:37 +00:00
Martin Kustermann 37acae7e29 [gardening] Remove standalone/io/http_redirect_test from iso-stress builder
This test was modified (in [0]) to use `dart:mirrors` which doesn't
work in AOT mode. Only tests that work in AOT are considered for
the iso-stress builder.

[0] https://dart-review.googlesource.com/c/sdk/+/230600

TEST=Fixes "iso-stress" builder failure to compile.

Change-Id: I354784a33550d816332611747c4d41b53d44b2a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232621
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2022-02-11 15:19:07 +00:00
Chloe Stefantsova a10e11d863 [cfe] Update .expect files after simultaneous CLs landing
Change-Id: I6a37585de9e32d797e3e209fe96c17d97db1d8cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232604
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2022-02-11 14:30:07 +00:00