Commit graph

82913 commits

Author SHA1 Message Date
Johnni Winther f10a70ebda [cfe] Migrate (more) CFE tests (part 3)
Change-Id: I3079cc05a342743c95a143b5ec9dfc32e4f1c0de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220321
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-11-16 10:37:22 +00:00
Johnni Winther 597ae56fc0 [cfe] Migrate (more) CFE tests (part 2)
Change-Id: I1a0115a512943239e3665209ca082a140b94ab6b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220320
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-11-16 10:15:11 +00:00
Johnni Winther f7815b26da [cfe] Migrate (more) CFE tests
Change-Id: Id460b605bef0cff33c35771f0c2701818d687e0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220201
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-11-16 10:00:14 +00:00
Nate Bosch 8154fff6c0 Update to the latest package:stream_channel
Change-Id: I8e2c41d480249b02f9645abda58469557091fc85
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220281
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2021-11-16 02:25:11 +00:00
Sam Rawlins 2ee6eb28d0 analyzer: Remove unused addExtensions method from sdk
Change-Id: I3b78827ad939c55f87a294cc225440ef86b610ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220128
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-11-16 00:20:41 +00:00
Konstantin Shcheglov ffcc3e667e Reuse relative URI resolution logic.
Change-Id: Ic27b0870bde9842bf9bd60498b5410e7beb570af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220224
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-11-16 00:15:01 +00:00
Stephen Adams 405734f18b [dart2js] lazyFinal can use a variable for the result.
Returning the value is faster than reading the holder slot on V8.
Some benchmarks which read a lazy final in a tight loop are up to
40% faster.
JSC and SM unchanged.

Change-Id: I72afa456160469e4ccfe6ab80f8a53694133d794
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220132
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2021-11-15 22:25:31 +00:00
Brian Wilkerson 7bc9ca5ee9 Allow import fixes to run after other fixes
Change-Id: I820332ac17b7e2d9d981271ce2c6f544dc2b2080
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220041
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-11-15 19:20:01 +00:00
Ryan Macnak 9b89231e1e [vm] Broadcast the low-memory interrupt to only one member of each isolate group.
When this mechanism was first added, each isolate had its own heap that needed to GC on low memory. Now that isolates share a heap with other members of the group, broadcasting to each isolate does redundant work in groups that have more than one isolate.

TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/47672
Change-Id: I3b71c19a2362f5a3274238e590bbf73e37aa2b4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220064
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-11-15 17:35:43 +00:00
Konstantin Shcheglov ad5da2976b Add optional 'timeout' field to 'completion.getSuggestions2'.
The intended use is in benchmarking, to specify a long timeout, so that
the first time, when we warm up, we do necessary one time work,
which would usually run out of budget the first few times. So, the
requests that we do measure are more stable.

Change-Id: I22e870b84dcd6f2ac201c5ec57081c39c6529ea1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220129
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-11-15 16:48:42 +00:00
Danny Tuppeny 51df1855ff [dds] Add DAP support for 'hotReload' custom request that calls reloadSources
Change-Id: I413cd9ce8f72e97d14a3fb7762f98833a5991a1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219793
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-11-15 15:42:02 +00:00
Jonas Finnemann Jensen 98cf9b3af9 Clean _PSNode always represent a scalar value
Change-Id: Ia70a58fa7dc17e0bcb0bf1bebe1c7c2799225a01
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219704
Auto-Submit: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Jonas Jensen <jonasfj@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2021-11-15 12:43:19 +00:00
Alexander Thomas 30556e10c2 [sdk] Update checked-in SDKs to 2.15.0-268.8.beta
Change-Id: Ib38ef13a8ae87fc5bc487983126684ab4251e037
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220011
Auto-Submit: Alexander Thomas <athom@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2021-11-15 12:19:30 +00:00
Johnni Winther d576e46f7a [cfe] Update status for semi-fuzz failures
Change-Id: I73308d8cd5d357e30dc9f0d9e8cf51a2e193bce8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219705
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-11-15 09:05:44 +00:00
Ben Butterworth 33dfe014ee Fix ZoneBinaryCallback documentation
There was a small mistake in the documentation, because it was copy-pasted from `ZoneUnaryCallback` and not fixed.

Closes https://github.com/dart-lang/sdk/pull/47693
https://github.com/dart-lang/sdk/pull/47693

GitOrigin-RevId: 49599cdf2e89d7861378e56a71f69f4e0c47b53b
Change-Id: I621e71cc316798b88ad14f048b75f4fefc427441
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220136
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2021-11-14 23:56:04 +00:00
Alexander Aprelev c4a07a88f9 [vm/isolates] Ensure spawnUri'ed isolates keep their own origin_id.
Fixes https://github.com/dart-lang/sdk/issues/47674

TEST=send_object_to_spawn_uri_isolate_test.dart

Change-Id: I96d81df5edbac3054220348be8654250246cad8b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220066
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2021-11-13 02:36:52 +00:00
Ben Konyi 6ae9f31081 Revert "Reland "[ VM / Service ] Add setIsolatePauseMode RPC""
This reverts commit 5de4830a4e.

Reason for revert: Unable to roll into google3

Original change's description:
> Reland "[ VM / Service ] Add setIsolatePauseMode RPC"
>
> This reverts commit d21897b88d.
>
> Reason for revert: Reland before fixing failures in google3 (requires copybara update of package:vm_service which requires this change to have already been landed in the SDK).
>
> Original change's description:
> > Revert "[ VM / Service ] Add setIsolatePauseMode RPC"
> >
> > This reverts commit cad8a34d83.
> >
> > Reason for revert: broke the g3 cbuild, see cbuild logs
> > (Error: The method 'setIsolatePauseMode' isn't defined for the class 'VmServiceInterface')
> >
> > Original change's description:
> > > [ VM / Service ] Add setIsolatePauseMode RPC
> > >
> > > Allows for service clients to set pause behaviors on a per-isolate
> > > basis at runtime. setIsolatePauseMode is a more general version of
> > > setExceptionPauseMode and setExceptionPauseMode has been marked as deprecated.
> > >
> > > TEST=pause_on_exceptions_*_test.dart,should_pause_on_exit_test.dart
> > >
> > > Change-Id: I09d80aa2123791dd74d02441c162c19cc0486955
> > > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219580
> > > Commit-Queue: Ben Konyi <bkonyi@google.com>
> > > Reviewed-by: Siva Annamalai <asiva@google.com>
> >
> > TBR=bkonyi@google.com,rmacnak@google.com,asiva@google.com
> >
> > Change-Id: Ic326c54e0fd682e382bd70e36d87467d4148c990
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220067
> > Reviewed-by: Siva Annamalai <asiva@google.com>
> > Commit-Queue: Siva Annamalai <asiva@google.com>
>
> # Not skipping CQ checks because this is a reland.
>
> Change-Id: I0e25654e1991b7246cd413454ef45594d36f4bde
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220127
> Reviewed-by: Siva Annamalai <asiva@google.com>

TBR=bkonyi@google.com,rmacnak@google.com,asiva@google.com

Change-Id: I9f1a2e81c99bfb90ddf0b4298bcb6c60e7e69dd3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220130
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-11-13 00:01:53 +00:00
Konstantin Shcheglov 0b395d26be Update resolution of arguments for named_arguments_anywhere.
Change-Id: I50fb95eba6c9345f452cdf7e38fa9c61c2b371ad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220123
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-11-12 23:27:32 +00:00
Ben Konyi 5de4830a4e Reland "[ VM / Service ] Add setIsolatePauseMode RPC"
This reverts commit d21897b88d.

Reason for revert: Reland before fixing failures in google3 (requires copybara update of package:vm_service which requires this change to have already been landed in the SDK).

Original change's description:
> Revert "[ VM / Service ] Add setIsolatePauseMode RPC"
>
> This reverts commit cad8a34d83.
>
> Reason for revert: broke the g3 cbuild, see cbuild logs
> (Error: The method 'setIsolatePauseMode' isn't defined for the class 'VmServiceInterface')
>
> Original change's description:
> > [ VM / Service ] Add setIsolatePauseMode RPC
> >
> > Allows for service clients to set pause behaviors on a per-isolate
> > basis at runtime. setIsolatePauseMode is a more general version of
> > setExceptionPauseMode and setExceptionPauseMode has been marked as deprecated.
> >
> > TEST=pause_on_exceptions_*_test.dart,should_pause_on_exit_test.dart
> >
> > Change-Id: I09d80aa2123791dd74d02441c162c19cc0486955
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219580
> > Commit-Queue: Ben Konyi <bkonyi@google.com>
> > Reviewed-by: Siva Annamalai <asiva@google.com>
>
> TBR=bkonyi@google.com,rmacnak@google.com,asiva@google.com
>
> Change-Id: Ic326c54e0fd682e382bd70e36d87467d4148c990
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220067
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Commit-Queue: Siva Annamalai <asiva@google.com>

# Not skipping CQ checks because this is a reland.

Change-Id: I0e25654e1991b7246cd413454ef45594d36f4bde
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220127
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-11-12 23:24:08 +00:00
Kevin Moore 39d930305c pkg:dart_internal update changelog
Change-Id: I5442cfc77720b6d6628f1e3540433f9e1300f58d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220122
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2021-11-12 19:50:10 +00:00
Danny Tuppeny 37bdd74758 [analysis_server] Add support for more common Flutter color formats for LSP textDocument/colorPresentation
Change-Id: I6b9bba312a4f0c7c6a2cee2f8eeb74b8dabb3cc6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220007
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-11-12 19:26:42 +00:00
Nicholas Shahan ecdcde3a83 [ddc] Ensure mixin class is emitted before use
Moves the class definition to appear before uses in compiled
code.

Change-Id: I00558040a510c7bc8668794b82fa3bd67dde64e9
Fixes: https://github.com/dart-lang/sdk/issues/47645
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220071
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-11-12 19:21:52 +00:00
Danny Tuppeny 3238b2c09c [analysis_server] Add LSP support for documentColor/colorPresentation
Fixes https://github.com/dart-lang/sdk/issues/44682.
Fixes https://github.com/Dart-Code/Dart-Code/issues/3240.

Change-Id: I5ccb24247e6cf8e0078699ec7527c0ccd0c0fa74
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219701
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-11-12 17:51:02 +00:00
Alexander Thomas 9131467317 Bump dart_internal to support Dart 2.16
Change-Id: Ia4e933fbc7bdcacc340545438355e16830525569
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220012
Auto-Submit: Alexander Thomas <athom@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2021-11-12 17:13:13 +00:00
Jonas Finnemann Jensen 9f84331d1a Analyzer support for parsing short-form hosted-dependencies.
Starting Dart 2.15 a short-form for specifying hosted-dependencies
in `pubspec.yaml` has been introduced. This change enables the
analyzer to understand these dependencies.

Change-Id: Ie07fe741ab641013c5c55efb9e008cfa55764c23
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219703
Auto-Submit: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Jonas Jensen <jonasfj@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2021-11-12 16:55:03 +00:00
Keerti Parthasarathy 26558d2ac0 Add time logging to find references
Change-Id: I841b024f516f18f165001ca9103c9ebcb98bf8ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220068
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-11-12 05:09:02 +00:00
Riley Porter 11dc2f4ff6 [dart:html] Update Element.dataset documentation
Updates which characters are allowed in the dataset name based on
external documentation, and removes restriction on not allowing the
name to start with `xml`. These restrictions are not enforced in the
name parsing in `_DataAttributeMap`. Note, there is an additional
restriction in our docs which is inconsistent with external behavior
disallowing capital letters.

Change-Id: I4143503b17673be2e038df8647fef7c9ac09e9ba
Bug: https://github.com/dart-lang/sdk/issues/43295
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219180
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Riley Porter <rileyporter@google.com>
2021-11-12 01:00:41 +00:00
Paul Berry e610dd47d9 Migration: handle the multiple variable declarations in one line.
When the source code contains a declaration like `var x = ..., y =
...;`, and the variables need to be given different explicit types,
there's no easy way to do so because replacing the `var` with a type
causes the same type to be applied to *all* variables in the
declaration.

In an ideal world, the migration tool would split the declaration up
into several declarations and give each one the proper type.  But
doing so would require a lot of coding effort, and the problem is
extremely rare in practice (as witnessed by the fact that the issue
hasn't been reported until now).  So we opt for the much simpler fix
of introducing an `as` cast to the initializer of each variable whose
type needs to be changed.  This is less ideal (since the `as`
expressions bypass compile-time type safety), but considering how
rarely this problem crops up it seems like a worthwhile tradeoff.

Since the `as` expressions that are introduced are not downcasts, they
will show up near the top of the list of changes in the migration
tool's UI, so hopefully this will encourage the user to manually split
up the declaration into multiple lines and replace the casts with
explicit types.

Fixes #47669.

Bug: https://github.com/dart-lang/sdk/issues/47669
Change-Id: Idd7620cb5bb682c5fe235a4b088b94cd2208ebbd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220060
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-11-12 00:41:01 +00:00
Siva Annamalai d21897b88d Revert "[ VM / Service ] Add setIsolatePauseMode RPC"
This reverts commit cad8a34d83.

Reason for revert: broke the g3 cbuild, see cbuild logs
(Error: The method 'setIsolatePauseMode' isn't defined for the class 'VmServiceInterface')

Original change's description:
> [ VM / Service ] Add setIsolatePauseMode RPC
>
> Allows for service clients to set pause behaviors on a per-isolate
> basis at runtime. setIsolatePauseMode is a more general version of
> setExceptionPauseMode and setExceptionPauseMode has been marked as deprecated.
>
> TEST=pause_on_exceptions_*_test.dart,should_pause_on_exit_test.dart
>
> Change-Id: I09d80aa2123791dd74d02441c162c19cc0486955
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219580
> Commit-Queue: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>

TBR=bkonyi@google.com,rmacnak@google.com,asiva@google.com

Change-Id: Ic326c54e0fd682e382bd70e36d87467d4148c990
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220067
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2021-11-11 23:32:42 +00:00
Konstantin Shcheglov d5086e4ca9 Check that --flutter-repository is absolute and normalized, rename shorter.
Change-Id: I737dd5ea5ba83124b308f979bff50ed15cefcdf8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220063
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-11-11 21:59:01 +00:00
Danny Tuppeny 2001b00c07 [analysis_server] Add ColorComputer for locating color references in user code
Change-Id: I166f87135a9b15821e5f65cfea33b8a15fa7aa03
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219101
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-11-11 21:50:41 +00:00
Konstantin Shcheglov 2f325ab1ff Tweaks for FfiVerifier.
Change-Id: Ic75582d17a06dbf81e84d15cf2959326ef32855f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220061
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-11-11 21:21:21 +00:00
Ben Konyi cad8a34d83 [ VM / Service ] Add setIsolatePauseMode RPC
Allows for service clients to set pause behaviors on a per-isolate
basis at runtime. setIsolatePauseMode is a more general version of
setExceptionPauseMode and setExceptionPauseMode has been marked as deprecated.

TEST=pause_on_exceptions_*_test.dart,should_pause_on_exit_test.dart

Change-Id: I09d80aa2123791dd74d02441c162c19cc0486955
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219580
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-11-11 20:05:51 +00:00
Paul Berry 2b9645318c Migration: better handle a variable declaration statement with multiple variables.
This fix addresses the case where a variable declaration statement
declares multiple variables with different types; previously, we were
applying the type of the first variable to all the variables, leading
to possible crashes.

There are still some other issues with variable declaration statements
that declare multiple variables; I'll address them in follow-up CLs.

Bug: https://github.com/dart-lang/sdk/issues/47669
Change-Id: Iba82ef5ccc0b22382f30bf5a6ed391f4874f7443
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220042
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-11-11 19:18:21 +00:00
Danny Tuppeny 8809779d80 [dds] Handle "Service Disappeared" errors from DDS/VM Service during shutdown
Change-Id: I1ddc59c56778461d5f42b210422eb24ba2f6da7b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220005
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-11-11 18:03:41 +00:00
Alexander Markov 1f3e5ed007 [vm/aot/tfa] Approximate invocations of large methods
In order to avoid spending too much time analyzing multiple
invocations of huge methods with different combinations of
argument types, the following heuristic is added to type
flow analysis:

- if size of a method summary >= N operations, and
- number of invocations for this method >= M, then
create and use an approximate invocation with raw argument types
for all subsequent invocations (so that we would have to analyze
at most M+1 invocations per huge method).

Constants N = 300 and M = 10 are selected so that size of
Flutter gallery AOT snapshot is not affected, and at the same
time compilation time of example involving huge auto-generated
methods from issue https://github.com/dart-lang/sdk/issues/47546 is
not regressed very much (<10s).

TEST=ci
Issue https://github.com/dart-lang/sdk/issues/47546

Change-Id: I6a452872b13bd32928585fce4431ec1176833e6c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219749
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2021-11-11 17:48:51 +00:00
Ryan Macnak b8c156dc91 [vm, gc] Allow initial concurrent marking to proceed even if workers are slow to start up.
This makes the ConcurrentMark task safe to be run by an embedder-provided task runner that doesn't guarantee immediate execution.

Cf. 7aa8716f6d

TEST=ci
Change-Id: I39200bc1c7fa9da458a36ff1b61d3e28c46738ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219844
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-11-11 17:48:41 +00:00
Konstantin Shcheglov 66b2a57e68 Track referencingFiles directly.
Change-Id: Ide29636fc2444bdfd1eb16bd7c1d9e49c61e961c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219942
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-11-11 16:39:02 +00:00
Konstantin Shcheglov 009020db39 Report INVALID_ANNOTATION for not constant variable, resolve arguments.
Change-Id: Ie6109d253d825527c545d9129dca3b3a6896ca9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219921
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-11-11 16:38:01 +00:00
Danny Tuppeny c12ef90b23 [dds] Add a link to Flutter DAP docs in Dart DAP docs
Change-Id: Ia42bff783c7242893d545a7ada6ee24e6888a07a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219785
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-11-11 15:47:29 +00:00
Michael Thomsen 5075cb7a50 Revert "Initial 'dart doc' developer command"
This reverts commit 916a43a1c8.

Reason for revert: command fails in built SDK, see https://github.com/dart-lang/sdk/issues/47677

Original change's description:
> Initial 'dart doc' developer command
>
> Initial 'dart doc' command for the unified 'dart' developer tool,
> over time replacing the exiting 'bin/dartdoc' tool.
>
> Change-Id: Ib5639f9329bf5ed86375c97c5e485471934c56ff
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217980
> Commit-Queue: Michael Thomsen <mit@google.com>
> Reviewed-by: Ben Konyi <bkonyi@google.com>

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I5eb04c68cb80b1e2b95642e9e7904ad86c603315
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220006
Reviewed-by: Michael Thomsen <mit@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2021-11-11 15:39:43 +00:00
Alexander Thomas 684b63d951 [co19] Roll co19 to 39c5bbc03bf5c5c0a3f9341abe811871eababfaf
2021-11-11 sgrekhov@unipro.ru dart-lang/co19#1231. More Super parameters tests added
2021-11-10 irina.arkhipets@gmail.com More fix for dart-lang/co19#1094: Missing Issue tags added to LibTest/io tests, minor change for LibTest/core/RangeError/CheckNotNegative_A01_t02
2021-11-10 sgrekhov@unipro.ru dart-lang/co19#1231. More Super parameters tests added
2021-11-09 irina.arkhipets@gmail.com More fix for dart-lang/co19#1094: co19_2 LibTest/collection/DoubleLinkedQueue tests corrected according to the Issue 27920 evaluation and current behavior.
2021-11-09 sgrekhov@unipro.ru dart-lang/co19#1231. More Super parameters tests added
2021-11-08 sgrekhov@unipro.ru dart-lang/co19#1231. Super parameters type inference tests added
2021-11-02 bquinlan@google.com Fix tests on Mac OS X. (dart-lang/co19#1233)
2021-11-03 sgrekhov@unipro.ru dart-lang/co19#1231. More Super parameters tests added
2021-11-02 irina.arkhipets@gmail.com More fix for dart-lang/co19#1094: Missing Issue tags added to LibTest/async tests.
2021-11-02 irina.arkhipets@gmail.com More fix for dart-lang/co19#1094: LanguageFeatures/nnbd tests updated according to the recent dart behaviour, missing Issdue tags added.
2021-11-02 irina.arkhipets@gmail.com More fix for dart-lang/co19#1109: Test LibraryFeatures/nnbd/Least-greatest-closure/typedef/typedef_dynamic_t22 removed according to the issue evaluation, static exception is thrown.
2021-11-02 irina.arkhipets@gmail.com More fix for dart-lang/co19#1094: Test expectation updated for LanguageFeatures/Set-literals/constant_set_literals_A01_t01 test.
2021-11-02 sgrekhov@unipro.ru Fixes dart-lang/co19#1232. Expect FileStat.type to return underlying object for non-Windows OS's
2021-11-01 sgrekhov@unipro.ru dart-lang/co19#1231. More super parameters tests added
2021-10-29 sgrekhov@unipro.ru dart-lang/co19#1231. The first bunch of super parameters tests added
2021-10-28 sgrekhov@unipro.ru Fixes dart-lang/co19#1228. More named arguments anywhere constructors tests added
2021-10-27 sgrekhov@unipro.ru dart-lang/co19#1228. More named arguments anywhere tests added
2021-10-26 sgrekhov@unipro.ru dart-lang/co19#1228. Named arguments anywhere tests 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-release-x64-try,vm-kernel-nnbd-mac-release-x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try
Change-Id: Ie70e28bc259aa9bacc3512866e92a2768e456271
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220003
Reviewed-by: William Hesse <whesse@google.com>
2021-11-11 14:41:38 +00:00
Zach Anderson 5f771eaa96 Revert "Update to the latest pub_semver"
This reverts commit ac78f99883.

Reason for revert: https://github.com/flutter/flutter/issues/93206#issuecomment-966308258

Original change's description:
> Update to the latest pub_semver
>
> Fixes a bug where version strings with arbitrary characters are accepted as
> digit separators.
>
> Change-Id: I273f242155e421d994d324fce339e2f9889bc1fe
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219920
> Auto-Submit: Nate Bosch <nbosch@google.com>
> Commit-Queue: Nate Bosch <nbosch@google.com>
> Commit-Queue: Kevin Moore <kevmoo@google.com>
> Reviewed-by: Kevin Moore <kevmoo@google.com>

TBR=kevmoo@google.com,nbosch@google.com

Change-Id: Ibfe0ca317265492af2ea8193e4dd9bc6c4d443b4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220040
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2021-11-11 14:38:56 +00:00
Alexander Thomas 5df9402a33 [co19] Roll co19_2 to 86f01ade433fbb4eec3a7f93f5e1e4fed9a84fb3
2021-11-09 irina.arkhipets@gmail.com More fix for dart-lang/co19#1094: co19_2 LibTest/collection/DoubleLinkedQueue tests corrected according to the Issue 27920 evaluation and current behavior.
2021-11-03 irina.arkhipets@gmail.com More fix for dart-lang/co19#1094: co19_2 LibTest tests update: - collection/LinkedHashSet, convert/JSOnCodec, core/Duration, core/Uri, core/UriData: updated according to master changes - collection/ListBase, core/StackOverflowError: missing Issue tag added - core/DataTime, core/RegExp: error diagnostic improved - core/double: additional checks for JS runs added
2021-11-03 irina.arkhipets@gmail.com More fix for dart-lang/co19#1094: Two LanguageFeatures/Constant-update-2018 tests updated according to the Dart 2.9 behavior.
2021-11-02 irina.arkhipets@gmail.com More fix for dart-lang/co19#1094: LibTest/async tests updated according to the recent changes in master.
2021-11-02 irina.arkhipets@gmail.com More fix for dart-lang/co19#1094: LibTest/async/Future/then_A05_t03 updated according to the recent changes in master.
2021-11-02 irina.arkhipets@gmail.com More fix for dart-lang/co19#1094: Missing Issue tags added to LanguageFeatures/SimpleBounds tests, LanguageFeatures/Super-mixins/mixin_member_to6 updated to run correctly with dart2js.
2021-11-02 irina.arkhipets@gmail.com More fix for dart-lang/co19#1094: LanguageFeatures/Extension-methods tests updated according to the recent changes in master.
2021-11-02 irina.arkhipets@gmail.com More fix for dart-lang/co19#1094: Two LanguageFeatures/Constant-update-2018 tests updated according to the changes in master.

Change-Id: I4caf7a5603e836e96121341a2b4846982eb6a5bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220004
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2021-11-11 14:31:44 +00:00
Vyacheslav Egorov 6401220bc1 [vm] Include compiler state in crash reports.
This changes Profiler::DumpStackTrace to include information available
in the CompilerState attached to the thread into the crash report.

This includes the name of the function being compiled, compilation mode,
current phase, flow graph, instruction being compiled.

TEST=manually by causing compiler to crash

Change-Id: I310629f032a86781e30f0a5e218d21df7d27528e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220001
Auto-Submit: Slava Egorov <vegorov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
2021-11-11 14:30:52 +00:00
Lasse R.H. Nielsen e1428ba911 Remove references to constructor-tearoff experiment.
TEST=Modifying existing tests.

Change-Id: I22fa11a5f2efc4bd6d1d54a656106f40bbfeafb3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220002
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2021-11-11 14:04:43 +00:00
Lasse R.H. Nielsen f029e837d2 Update CHANGELOG/@Since of feature that didn't make 2.15.
Change-Id: Iee1ee36e3de040da2d2508938ba00a7faa1950c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219980
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2021-11-11 09:42:21 +00:00
Lasse R.H. Nielsen 2360783808 Expire experiments released in earlier stable versions.
Remove messages referring to expired `non-nullable` experiment.
Remove occurrences of --enable-experiment with expired experiments.

TEST=Flags were expired. If existing tests still run, it's a success.

Change-Id: Id66d78eb0a3191ec5e31375faf0effd9ea7b768f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219789
Auto-Submit: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2021-11-11 08:28:31 +00:00
asiva bbff4d9589 [VM/Runtime] - Add Dart C API function to toggle timeline categories.
Add Dart C API Function Dart_EnableTimelineCategory that enables
toggling of timeline categories at runtime.

https://github.com/dart-lang/sdk/issues/47601

TEST=Dart C API tests added

Change-Id: Ib38c8ab0a8d43c9180e9cb9ade107f8bad5f5e63
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219943
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2021-11-11 01:25:04 +00:00
Liam Appelbe 00cb9514cf [vm] Fix coverage for assert statements
Use RecordCoverageInstr to properly track coverage for assert
statements.

Fixes: https://github.com/dart-lang/sdk/issues/47017
Change-Id: Ic9c35afe3f0ba1eaa581953d4961ca57f5f6a64d
TEST=Added unit test
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219907
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2021-11-11 00:09:44 +00:00