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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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-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>
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>
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>
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>
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>