Commit graph

85268 commits

Author SHA1 Message Date
Devon Carew eec99f4f0b [core libs] add dart:developer, dart:js_util, and dart:wasm to the set of validated libraries
Change-Id: Id54af09f7b7559c5eb751db822aba8cd6b413559
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241160
Reviewed-by: Jonas Termansen <sortie@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-04-25 15:53:32 +00:00
Johnni Winther 6fdaed9eba [cfe] Handle tear-offs of patched constructors
Previously the tear-offs created for the origin constructors were not
replaced with the tear-offs created for the patch constructors - as is
normally done for the constructors themselves. This lead the tear-offs
to refer to unlowered code, breaking dart2js.

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

Change-Id: I1cb09c07bb2ac7fffb81acd31547ee96e7ecdc64
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242284
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-04-25 15:50:47 +00:00
Lasse R.H. Nielsen 0f0f045128 Fix bug in Duration.toString.
The `toString` used the sign of `hours` to get a leading `-`
when the duration is negative. However, a negative duration of
less than one hour would therefore miss out on the sign,
because `-0` is not an integer.
Now handles sign explicitly.

Fixes #48841.

Change-Id: I0ab6d451faf1c76b838fc35a692f07c5b035d2a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241748
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2022-04-25 14:37:42 +00:00
Danny Tuppeny db0d9b1852 [dds] Serve DevTools index page for extension-less requests to support UrlPathStrategy
Change-Id: I780e16b391dda6159c99b4844f6663dad02a98af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239082
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-04-25 14:12:13 +00:00
Parker Lougheed 731ef4f5c9 [dartdev] Adjust dart compile packages flag description for .packages discontinuation
Change-Id: Ie461aa6124308637585f37c26d0f0525236680b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/240903
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-04-25 14:10:54 +00:00
Jens Johansen 70256e540d [CFE] Explicitly initialize to null in outlines too
Currently initializers (in, say, a Constructor) is included in the
outline if it is not null. Null values are explicitly added only when
building the bodies.
This has the unfortunate effect of initializers copied in the outline
phase (e.g. for mixins) not including the null initializer. If, however,
later recompiling (even without changes, and if the split is correct)
suddenly an initializer changes.

This CL fixes the issue by initializing to null in the outline phase.

Change-Id: I1269da25ab893d4610cf2dbb4fbfdbd5697e5323
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242282
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2022-04-25 12:54:53 +00:00
Jens Johansen 430abc54e8 [CFE] Add toText to Reference and CanonicalName
Add `toText` to both Reference and CanonicalName.
Change how CanonicalNames are printed through `text_util.dart` to be
more aligned with how the corresponding node would be printed had
it existed (and the CanonicalName thus normally not been used for
printing).
Add a test for (some definition of) common cases where printing should
be the same wherther done though the node, the reference or the
canonical name.
Fix usage of toStringInternal in the constant evaluator (though only
in use through an experiment) and add a test that showed that the
previous output was bad and the new isn't (at least in this case).

Change-Id: I10cbc1a542c7d8b079e0510bbd5eb5173b2e7563
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242102
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2022-04-25 11:13:44 +00:00
Martin Kustermann b341480a72 [vm] Add TypeLiteral benchmark
This benchmark tests the performance of uninstantiated type literal
usages.

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

TEST=ci

Change-Id: I5eb881a2b8e397997505af41b24240afcbe9d1ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242104
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2022-04-25 08:49:12 +00:00
Brian Wilkerson 45e205b193 Remove EditDomainHandler
Change-Id: I06ecd6519702d9c7efee570ec458b7178a3709f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242340
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-04-25 04:27:32 +00:00
Mark Zhou dfd5109b64 [dart2js] Adding class and classtype dump info tests
Change-Id: Iba41106c2b75a8247123e36b505e0be42ad51fad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242181
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2022-04-24 20:05:20 +00:00
Mark Zhou ee5a62ff4e [dart2js] Adding dump info library tests
Change-Id: I1d9a30838dc08612032051f60344588f84b1d436
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242163
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2022-04-24 19:57:51 +00:00
Konstantin Shcheglov 5c096609a1 Remove AbstractAnalysisTest.
All tests have been migrated to PubPackageAnalysisServerTest.

Change-Id: Id6156e0a45772e1bf0d2acd9ece04639414442f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242241
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-04-24 04:25:50 +00:00
Brian Wilkerson 8d34dc4d21 Remove AnalysisDomainHandler
Change-Id: Ibe1c25bcf3db7f01f730eb95581ae0795320ec74
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242300
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-04-23 23:56:20 +00:00
Ahmed Ashour 3428b449d1 Fix the type of (after-first) named parameter in ArgumentList.
Fixes #48514
Fixes #48310

Change-Id: I6cab8052a91a51a4c44470e5be81b78ef68e56cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242281
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-04-23 16:06:52 +00:00
Ahmed Ashour 1bdec73db6 Fix completion of static members from super classes
Fixes #48873

Change-Id: Ife058f8b26e375da0e5f1768be86b7a0d3db15fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242280
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-04-23 16:03:12 +00:00
Ahmed Ashour 1f27a7dca9 Add fix for MUST_CALL_SUPER
Fixes #33985

Change-Id: I5ff66bc01dde162979a21ebe8374398c2ffea783
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/240846
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-04-23 04:57:51 +00:00
Sam Rawlins c94b26e5b1 Add comments to completion_metrics.
Change-Id: I0836afe9d94998bbc6fac3358cba40372cabc418
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242240
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-04-23 04:21:10 +00:00
Stephen Adams db5d9ffc16 [dart2js] Migrate common.dart
`diagnostic_listener.dart` is the last unmigrated import of
`common.dart`, which is imported in ~100 files.

`compiler_api.dart` is split to move the `compile` method with
unmigrated dependencies to another file to allow `compiler_api.dart` to
become migrated. Luckily there is only one reference to `compile`.

We no longer allow null `SourceSpan`s and use `SourceSpan.unknown()`
instead.

Added `SpannableWithEntity` as a migrated interface that `HInstruction`
can implement to break the dependency on a large unmigrated ssa library.

Change-Id: I0a5ff6e6c36a34ff55d98f634c671bb8f1fb9e1c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242161
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2022-04-23 03:13:59 +00:00
Jackson Gardner 6466bac7cd Add support for importing shared memory as per wasm threading proposal.
Change-Id: I077b8d3a60f543c3e54cd3e6d024260adcb8ed83
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241420
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Jackson Gardner <jacksongardner@google.com>
2022-04-22 22:40:29 +00:00
Sigmund Cherem e5f4b85066 [dart2js] Fix deferred load URI when baseUrl has a single path segment
This fixes https://github.com/dart-lang/sdk/issues/48848

When the base URI is just a filename, then base was empty, and we accidentally
added a / in the first position.  This made the deferred URI absolute by
mistake.

Change-Id: I4d6a773f6ef8bfefbbf61417bfe7c005aa5e63ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241990
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2022-04-22 21:33:10 +00:00
Mark Zhou 3216e8ccb6 [dart2js] Adding external member test for dump info
Change-Id: I3f1541771a016d88e123252918bc648302887918
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241992
Auto-Submit: Mark Zhou <markzipan@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2022-04-22 21:14:09 +00:00
Konstantin Shcheglov cf36021633 Migrate AnalysisHoverBazelTest to BazelWorkspaceAnalysisServerTest.
Change-Id: Ibafbeb27d6b494c2139a298dd3e3cab74c7c1e4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241994
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-04-22 21:07:29 +00:00
Jake Macdonald 9846fe2621 Add FunctionTypeParameter and Parameter classes
Bug: https://github.com/dart-lang/language/issues/2208
Change-Id: I2a9bed6cc243eef2bfa313f7280d1d60c51a7b36
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242140
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2022-04-22 19:20:19 +00:00
Brian Wilkerson 8e6f810ef5 Convert remaining edit domain methods to handlers
Change-Id: I079182eb707d616e972d710242dc82e50f359184
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241991
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-04-22 17:15:59 +00:00
itsjustkevin 99397b2501 Add cherry-pick template to sdk repo.
Github allows templates to be built in a yaml format.

The current template is built in a query string outside of source control and difficult to update.  The updated format provides validation enforcing issue structure and providing ease of creating automations.

Change-Id: Ic9c8b7f13dc67f440cdc827495821ebf162454bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242121
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Kevin Chisholm <kevinjchisholm@google.com>
2022-04-22 17:04:29 +00:00
Nate Bosch 25f379aa59 Update to the latest package:test
R=jakemac@google.com

Change-Id: Icb1e169863ec25f7a88f51ab36ba4253fafb3b1c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241986
Auto-Submit: Nate Bosch <nbosch@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2022-04-22 16:47:32 +00:00
Devon Carew aa63ef8f4f [deps] remove the package:pedantic dep
Change-Id: Icacaa97ccd1b1919a97c50bec431c54137c08b07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241984
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-04-22 16:44:30 +00:00
Nate Bosch 6d88de709c Update to the latest package:async
R=kevmoo@google.com

Change-Id: Ie55c71f7b66f22b74b52c0453bf28e3002ee6140
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241683
Auto-Submit: Nate Bosch <nbosch@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2022-04-22 16:39:30 +00:00
Alexander Aprelev f7b6b70fdc [vm] Update bot list in tools/git_cl_try.sh
TEST=manually

Change-Id: I527a81ccf4f3be55e2611c63a4de568f81ab560d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242061
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2022-04-22 15:35:20 +00:00
Martin Kustermann ca4ad74b53 [vm] Attempt to avoid timeouts / flakiness of vm/dart_2/isolates/reload_many_isolates_live_and_die_test
Closes https://github.com/dart-lang/sdk/issues/48847

TEST=Addresses flakiness, timeouts of the mentioned test.

Change-Id: I91472c903e1f9f595c35217ac4c7e5613044fabb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242107
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2022-04-22 15:23:29 +00:00
Martin Kustermann 2fd661d4fa [vm] Fix assertion in ICData::AssertInvariantsAreSatisfied()
The ICData::AssertInvariantsAreSatisfied() method will grab a snapshot
of the ICData's entrie()s backing store array and does verifications
on it.

Though the place when we check for the last entry (which is a back-ref)
we re-load the entries() array which could be updated at this point.

This causes us to possibly fail an assertion which checks that for empty
ic data arrays it should be a cached empty array.

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

TEST=Should fix flaky assertion hit.

Change-Id: I45cf57bd13a7c2e49c395eb25a2f6789c5140bf9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242109
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2022-04-22 15:14:29 +00:00
Clement Skau 44a4cfc2d7 [vm][ffi] Add function name to FFI Trampolines.
This change will append the name of the associated function
to the name of FFI trampolines.
Previously the name of all FFI trampolines was "FfiTrampoline",
which made them difficult to keep track of when there was
more than one trampoline (i.e. more than one FFI function).

TEST=Existing
Change-Id: I7b5efa25dc9064d5615309331e2cfeaa01e4c9f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242100
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2022-04-22 09:48:39 +00:00
Jens Johansen a5a7b4c801 [CFE] Make strong/weak suite fuzzing work with parts
This CL follows up on
https://dart-review.googlesource.com/c/sdk/+/239668
where parts was left non-working.

Now part files are ignored (i.e. we don't try to split it and add
imports/exports where it isn't supported), and the part declaration(s)
is(/are) kept only in the "main" file.

Change-Id: I63fa8ac8fcf173234a8162297f1c5eb1d94b00da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241961
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2022-04-22 05:39:49 +00:00
Jens Johansen 84d75cbd53 [CFE] Fix issues with parts and experimental invalidation
From a high level, the experimental invalidation works by comparing the
before and after version of a changed file, checking if the (textual)
outline has changed. If it hasn't it can go ahead with the experimental
invalidation, only recompiling the changed file/library.

Turns out, though, that if a *part* is changed in a
textual-outline-changing-way it is *not* detected, i.e. one can (in a
part) make a change that isn't compatible with (safe) experimental
invalidation, yet experimental invalidation will still be in effect.
A similar issue exists if a mixin is declared in a part file.

This CL fixes the issue.

Change-Id: I150184885164229e6a9e0a6fa86f7c330b3bc3f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241969
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2022-04-22 05:37:39 +00:00
Sigmund Cherem 02cf9ea69c [modular_test]: migrate modular_test to null safety
Change-Id: I516d05469dd2c2bf57e4ec079fc1007ccf4b4783
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/240653
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2022-04-22 03:13:19 +00:00
Konstantin Shcheglov 73935c1d83 Report MACRO_EXECUTION_EXCEPTION.
Change-Id: Ia4c9b897467ce276c2030cbf242146aa95410189
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241988
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-04-22 01:10:28 +00:00
Ryan Macnak 633803df35 [benchmarks] Use the RunTimeRaw metric for Startup.
It makes more sense for Golem to display the benchmark results as a time than as a rate.

Change-Id: Iba262c98e9dc0d07983107966fa9b8d479e1b529
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242064
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-04-21 23:05:38 +00:00
Clement Skau b514b74dee [format] Remove multiline comment that gcc errors on.
TEST=comment only change

Bug: https://github.com/dart-lang/sdk/issues/48855
Change-Id: I39ea0593d2e660803b2e6520f51c2a1c9aaaaec7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241967
Auto-Submit: Clement Skau <cskau@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-04-21 22:30:59 +00:00
Konstantin Shcheglov c8bd0c67e8 Fix a couple syntactic errors in ArgumentsTextMacro.
Change-Id: I7a7468a6535ed03460ffa96d2a5e4acad686c95e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241985
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-04-21 21:18:43 +00:00
Mayank Patke e085928061 [dart2js] Cleanup some unused paramters in the locals handler.
Change-Id: Ic4fd58ab0c9b3b64a0911b5ae058e05ce311e3b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241880
Reviewed-by: Joshua Litt <joshualitt@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2022-04-21 21:10:58 +00:00
Mayank Patke 091559359e Reland "[dart2js] Lower late field checks during SSA."
This reverts commit 45c1e51bb3.

Reason for revert: Reland

Original change's description:
> Revert "[dart2js] Lower late field checks during SSA."
>
> This reverts commit 7187b2efe9.
>
> Reason for revert: Broke flutter roll
>
> Original change's description:
> > [dart2js] Lower late field checks during SSA.
> >
> > Change-Id: I80e7a30c6f2a461e46b4f52ebf7eb7a13fbc6227
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/240501
> > Reviewed-by: Stephen Adams <sra@google.com>
> > Commit-Queue: Mayank Patke <fishythefish@google.com>
>
> TBR=sra@google.com,fishythefish@google.com
>
> Change-Id: Idf4eff95425db4d770137d589d4bb5484fc6e187
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241806
> Reviewed-by: Mayank Patke <fishythefish@google.com>
> Reviewed-by: Nate Biggs <natebiggs@google.com>
> Commit-Queue: Mayank Patke <fishythefish@google.com>


Change-Id: Iccba8947a5778f5310e194d814b398dc46465fbb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241807
Reviewed-by: Mayank Patke <fishythefish@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2022-04-21 21:10:58 +00:00
Mayank Patke ec49b532c5 [dart2js] Improve narrowing of late fields.
Checks for late sentinels now behave like null checks and refine the
local on each branch.

Change-Id: I71fdcf50529c52ef82e2cff81425a34174e5c366
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/225320
Reviewed-by: Stephen Adams <sra@google.com>
2022-04-21 21:10:58 +00:00
Sam Rawlins 7e95dc1335 completion_metrics: add a 'prefix-length' option
This option allows the completion position to be an offset from the
start of each token, and plays well in each overlay mode. For the
original content:

```dart
void main() {
  foo();
}
```

In OVERLAY_NONE mode, completing on `main`, with `--prefix-length=2`,
we complete at:

```dart
void main() {
       ^
  foo();
}
```

In OVERLAY_REMOVE_TOKEN mode, completing on `main`, with
`--prefix-length=2`, we complete at:

```dart
void ma() {
       ^
  foo();
}

In OVERLAY_REMOVE_REST_OF_FILE mode, completing on `main`, with
`--prefix-length=2`, we complete at:

```dart
void ma
       ^
```

Change-Id: Id2493777cb38f147f7a2c401a9e53e17561516bc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241982
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2022-04-21 21:05:01 +00:00
Sam Rawlins f986ec4ed8 Change 'slowest requests' flag to not group by group; instead use p90
Previously, the 'slowest requests' flag would only track and print the
slowest 5 requests for each category. But this ends up printing many
requests which are not slow at all, and are perfectly reasonable. It is
more interesting to print the slowest results, those in the 90th
percentile.

The limit is set to 100. This is to set a limit on serialization in the
map/reduce system, and a limit on printing to stdout.

Change-Id: I31fde906e227ea195ec25d8c9c2d92569ceb72b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241865
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2022-04-21 20:59:18 +00:00
Konstantin Shcheglov b12e5e16de Builder / executor for macros in AnalysisContextCollectionImpl by default.
Change-Id: Ie5455bbdd3f55f78f6acf54a617365da0467926d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241866
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-04-21 20:56:59 +00:00
Ryan Macnak 0c762283a4 [vm, compiler] Remove dead kKeepCalleePP.
Dead since cf1de7d46c.

TEST=ci
Change-Id: I6dd42a62a8bfc8ff71bae8f1e33930c1bacfe103
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242040
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-04-21 20:30:58 +00:00
Sam Rawlins c32fe13239 Fix help for completion_metrics
As it is, it is broken if you pass `--help`.

Also, this adds line wrapping for option help text.

Change-Id: Ia1e096eba46b1f4db804f9c1ed771d4e67816ae8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242020
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-04-21 20:14:29 +00:00
Konstantin Shcheglov a5cc4b50cb Issue 48832. Watch only resource included into ContextRoot.
This does not solve all the problems, but might be enough for a
specific problem of analyzing a single file.

Bug: https://github.com/dart-lang/sdk/issues/48832
Change-Id: I02bfbf19fdbd6e8b848efdb76c355363bf2b86eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241983
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-04-21 19:57:28 +00:00
Konstantin Shcheglov 70e9d3f63e Use implementation (full content) based signatures for results that might be affected by macros.
Change-Id: I5106930ac904a99e674cba7e3ed1ecd29b104d1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241861
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-04-21 19:48:13 +00:00
itsjustkevin d31c848c8a Angular Test Fix: Angular test failing due to attempts to utilize the length method on null. Add a null check.
Change-Id: I8d2560ce696865fec7719bc75d868f9e1b01ffcb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242001
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Kevin Chisholm <kevinjchisholm@google.com>
2022-04-21 18:22:51 +00:00