Commit Graph

82451 Commits

Author SHA1 Message Date
Kevin Moore ada6029976 tools/package_deps: allow "normal" deps as long as there is a path override
Also migrate to null safety, drop unused pedantic dep

Change-Id: Ic3be5af7e7933f2bd757e9dcdda62eb5be99c5bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218085
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2021-10-26 18:26:01 +00:00
Danny Tuppeny 9a873bc23f [analysis_server] Support formatting leading whitespace at the start or ranges in LSP format range
Fixes https://github.com/Dart-Code/Dart-Code/issues/3583.

Change-Id: Id2974b173eb3589ff983316d1cec0ea1e45ecd97
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218141
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-10-26 17:37:21 +00:00
Sam Rawlins 0fe438812b analyzer: Correct const is and is! for null safety
Fixes https://github.com/dart-lang/sdk/issues/46081
Change-Id: I59a52a51739974e318ea32f3eb3b39dedbb5a9fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218084
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-10-26 17:24:31 +00:00
Alexander Markov 53debdc1c3 [vm/aot/tfa] Minor improvements for AOT compilation time
This change contains a few small improvements which reduce
time of type flow analysis (AOT compilation step 2):

* Faster construction of _DirectInvocation objects
* Eager approximation of arguments of operator==
* Eager approximation of arguments of identical

Improves time of AOT compilation step 2 (TFA) on a large
Flutter application 137s -> 124s (-9.4%).

Doesn't affect size of Flutter gallery AOT snapshot.

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

Change-Id: I9da0b0e68d1ee8062d86094fb5cdb9462fb7ea6b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217741
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2021-10-26 17:23:21 +00:00
Sam Rawlins 1c8f56fb13 Implement Generic Function Instantiation via wrapping node
This is a non-breaking change (when analyzing code at language version
2.14 and earlier). If constructor-tearoffs is enabled (language version
2.15), then FunctionReference nodes are inserted, to represent generic
function instantiation. Constant evaluation can then use the
`typeArgumentTypes` to instantiate arbitrary function-typed
expressions.

If constructor-tearoffs is not enabled, generic function instantiation
continues to take place at a SimpleIdentifier, PrefixedIdentifier, or
PropertyAccess only, with constant evaluation using
SimpleIdentifier.tearOffTypeArgumentTypes.

Bug: https://github.com/dart-lang/sdk/issues/46020
Change-Id: Ie370c00c8a2ce7a4791ac9cdb7459a01339a79c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217880
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-10-26 16:57:12 +00:00
Sam Rawlins 383f45ac7e Add DEPRECATED_NEW_IN_COMMENT_REFERENCE diagnostic
This is a new HintCode for code in which comment-references is enabled.

`/// See also [new List].` is marked as deprecated, preferring a direct
reference (or "tear-off") of a constructor, like
`/// See also [List.new].`.

Additionally, a new quick fix supports making the above conversion,
taking into account both unnamed and named constructors.

Bug: https://github.com/dart-lang/sdk/issues/47446
Change-Id: Iec68ef21bd03198ea822979f6f0048cc655023c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217400
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Janice Collins <jcollins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-10-26 16:52:51 +00:00
Konstantin Shcheglov 491eae6e38 Bump pub to 78bc50c7833451c24e531713362e46fd50621ff0
Diff: https://dart.googlesource.com/pub.git/+/489a7a0b91966c7547da4f3761a9810f09caffb6..78bc50c7833451c24e531713362e46fd50621ff0/
Change-Id: I6261346bfc65fc0137214f98c906638b9aada5d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217960
Reviewed-by: Sigurd Meldgaard <sigurdm@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-10-26 16:27:21 +00:00
Konstantin Shcheglov 626c8c5f84 Extract shared method to create new FileState instance.
Change-Id: I78381cc0b2d542ca1f0dbbac6c2388cf8ae74dc9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218081
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-10-26 15:32:51 +00:00
Konstantin Shcheglov 3753238bdf Extract methods to ask/waitFor completion plugins.
Change-Id: Ia251fc64f0b286225dc84a5d86f29f6c804cf3d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218080
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-10-26 15:32:41 +00:00
Michael Thomsen 800366738c Clarify how to to run compiled files
Bug: 47518
Change-Id: Ia0d69e9ab34d41df9da943acc9433b7c5d02afca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217921
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2021-10-26 13:11:41 +00:00
Johnni Winther 1972c11b4e [cfe] Support implicit super call
Closes https://github.com/dart-lang/sdk/issues/47545

Change-Id: I7adc75c574fd6d0be17f2f53066d34efd5d54a08
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217922
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-10-26 10:02:54 +00:00
Alexander Thomas c3e3192ddb [co19] Roll co19 to 73545b2bf6c7f8e4eb931bb04d86e38d6485deee
2021-10-25 sgrekhov@unipro.ru dart-lang/co19#1207. More Enhanced enums tests added
2021-10-25 sgrekhov@unipro.ru dart-lang/co19#1207. More Enhanced enums semantics tests added
2021-10-21 sgrekhov@unipro.ru dart-lang/co19#1207. More Enhanced enums semantics tests added
2021-10-20 sgrekhov@unipro.ru dart-lang/co19#1207. Enhanced enums semantics tests fixed and new added
2021-10-20 sgrekhov@unipro.ru dart-lang/co19#1207. Enhanced enums semsntics tests added
2021-10-20 asashour@yahoo.com Fix typo (dart-lang/co19#1227)
2021-10-19 sgrekhov@unipro.ru dart-lang/co19#1207. More enhanced enums tests added
2021-10-19 irina.arkhipets@gmail.com More fix for dart-lang/co19#1094: Missing Issue tag added (47496).
2021-10-19 irina.arkhipets@gmail.com More fix for dart-lang/co19#1094: Test updated.
2021-10-18 sgrekhov@unipro.ru dart-lang/co19#1207. More enhanced enums tests added
2021-10-18 irina.arkhipets@gmail.com More fix for dart-lang/co19#1094: Test updated to expect current dart behavior, Issue tag added.
2021-10-15 sgrekhov@unipro.ru Fixes dart-lang/co19#1225. Remove check for identity of 0/0 and nan
2021-10-15 sgrekhov@unipro.ru dart-lang/co19#1207. More Enhanced Enums tests added
2021-10-14 sgrekhov@unipro.ru dart-lang/co19#1223. Equality of extension tear-offs is not specified
2021-10-14 sgrekhov@unipro.ru Fixes dart-lang/co19#1224. Don't expect not identical tear-offs to be identical

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-precomp-nnbd-linux-release-x64-try
Change-Id: I63a11f54c383ca8d90bbdea97bcf65c9ca9e436d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218120
Reviewed-by: William Hesse <whesse@google.com>
2021-10-26 09:47:34 +00:00
Johnni Winther 25ef052cfc [cfe] Keep non-proper renames distinct in constant evaluation
Closes https://github.com/dart-lang/sdk/issues/47462

Change-Id: I669ca4f97bfbe10900453b1aa78211c52e0ad2e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217720
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-10-26 06:45:00 +00:00
Johnni Winther 114ad79698 [cfe] Ensure separation between StaticGet/StaticTearOff/ConstructorTearOff
Change-Id: I5b8d1103c10fecaf8fdaa69ee62215deb7eebc38
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217641
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-10-26 04:53:00 +00:00
Janice Collins 77521739da Update dartdoc to 4.1.0
Release notes:  https://github.com/dart-lang/dartdoc/releases/tag/v4.1.0

Change-Id: Id0207d7123680be61c388a7d3d2c53357b994c44
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218065
Auto-Submit: Janice Collins <jcollins@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2021-10-25 23:44:00 +00:00
Konstantin Shcheglov 873005502d Deprecate AnalysisResult.path/uri
Change-Id: I0908a49fd8983dbcbdf585c026190ab0fefb45c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218061
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-10-25 22:04:39 +00:00
Konstantin Shcheglov a156ee2f31 Remove CompletionRequest, use DartCompletionRequest only.
Change-Id: I4ecec7c4bc55e6ffacf3023ed8ee62db456bdd4f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218062
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-10-25 22:03:20 +00:00
Nicholas Shahan cc9353ac46 [ddc] Tag classes with names of static members
Temporarily add names of static members so they can be accessed by the
debugger. Eventually, these will be accessible through the symbol data
and should be removed from the compiled Javascript.

This increases the size of the compiled output by ~1% in a large
google3 application.

Names and types of static members were originally removed from the
compiled output in https://dart-review.googlesource.com/c/sdk/+/48455
because they are not needed for runtime correctness.


Change-Id: Idfd827ececec80d903586917676ec027e2a5a9e8
Issue: https://github.com/dart-lang/sdk/issues/40273
Issue: https://github.com/dart-lang/webdev/issues/1430
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217501
Reviewed-by: Anna Gringauze <annagrin@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-10-25 21:53:20 +00:00
Konstantin Shcheglov 76dadeecd9 Remove DartCompletionRequest, use what was Impl instead.
I think we don't expect that users will write plugins that use these
types. So, we can remove the indirection.

Similarly, CompletionRequest is also currently de-facto a Dart
completion request, because it has `ResolvedUnitResult result`. I will
fold it into DartCompletionRequest in a future CL.

Change-Id: I2ea1d443ae18535f8c72f785dd1b91cf8d30ffa7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218021
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-10-25 19:32:46 +00:00
Konstantin Shcheglov 9f00d0c94e Deprecate DriverOptions.mockSdk
Change-Id: I7f28a8ac1fbbc45693b6fe038bf5490440703ccf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218020
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-10-25 18:33:51 +00:00
Konstantin Shcheglov 1aa6fa4776 Refactor Cider FileState.
The general direction is to make pieces of data that are produced
together to be stored together, and so be available together.

_FileStateLocation is created before FileState, so it is separated.

Any FileState has some unlinked state, so we pass _FileStateUnlinked
into the constructor. In Cider we don't refresh files, we discard
them and recreate. So, '_unlinked' is a final field.

Practically FileState works as a wrapper around _FileStateUnlinked.
It could probably have been inlined into FileState. My excuse for
not doing this is that in DAS, at least at the moment, we keep
FileState instances and refresh them with replacing their unlinked
states. So, they should be separate objects.

Change-Id: I9439a4021e6efa9e4375eceb5eecf534eabda168
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217860
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-10-25 17:47:59 +00:00
Konstantin Shcheglov 9eddeaeb3a Make DartCompletionRequestImpl.from() synchronous.
We give it (indirectly) ResolvedUnitResult, so it does not do any
async operation.

Change-Id: I2d29925fd20ea14bd984e6c3c226de466a03fb39
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217824
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-10-25 17:47:00 +00:00
Ryan Macnak 985824de50 [vm] Ask the OS to release the memory for the clustered portion of the snapshot.
This region is mostly unused after loading, but it may be accessed again if
 - Isolate.spawn is invoke with isolate groups disabled
 - A secondary snapshot produced by splitting is loaded
 - An external typed data in the snapshot is accessed (usually a kernel file)
 - Likely other cases

Even if these cases did not exist, the region is often part of a shared library and so unable to be released independently.

madvise(DONT_NEED) on this region will cause the OS to release the memory in this region but keep the address space reservation and mapping. If it is touched again, it will be brought back in from the file. If it is not backed by a file, such as malloc memory, it will be brought back in as zeros and the program will likely fail.

TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/44019
Bug: https://github.com/flutter/flutter/issues/92120
Change-Id: I315a049b0f7d440e181d0a5e87fa6770a2fd4f79
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216580
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-10-25 17:30:50 +00:00
Danny Tuppeny bca554fcf4 [analysis_server] Make LSP semantic tokens consistently use "property" for top levels
+ add a modifier to the "variable" used for import prefixes.

Change-Id: If448c3a481a3471a63b58455acaef4ebcfd1f37c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217981
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-10-25 17:26:20 +00:00
Danny Tuppeny c9b5354100 [analysis_server] Add "annotation" modifier to identifiers used as annotations
Fixes https://github.com/Dart-Code/Dart-Code/issues/3621.

Change-Id: Idf0cfb7f8a0b2a8b4f1ed269f125f6743fa19471
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217940
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-10-25 17:07:40 +00:00
Konstantin Shcheglov 4258e469c2 Make DartCompletionRequestImpl immutable.
Change-Id: I4828bf7b1f3c23eab9c8ca079a88e976013c7109
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217840
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-10-25 16:34:29 +00:00
Kevin Moore 913ca2a5d3 dart:_http: cleanup implementation of crypto
Remove unused members
Add return types to functions
Use Uint32List instead of List<int>

Change-Id: I0772467075978aabfa65c07eb4f457e5c7db2bff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217803
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2021-10-25 16:34:11 +00:00
Konstantin Shcheglov 6a386a6b02 Extract fuzzyFilterSort() from Cider support.
So that we can reuse it for getSuggestions2() request in the future.

Change-Id: I58ef19faedf27e727529bcdc6701a5137cf4ba43
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217823
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-10-25 16:17:59 +00:00
Kevin Moore 5108837e5c dart:_http - no need to ship base64 twice
Change-Id: I0f76f1264e1e067790efc5feabfb97f7cd0f6094
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217801
Auto-Submit: Kevin Moore <kevmoo@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-10-25 16:14:59 +00:00
asiva 5e50884b01 [sdk] - Update README file in sdk.
Change-Id: Iffd366361b9d73ba6e80e41eecccf5e6e3c3a411
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215840
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2021-10-25 16:08:40 +00:00
Konstantin Shcheglov 75e984fe39 Don't pass DartCompletionRequest and SuggestionBuilder where already available.
Change-Id: Ibfc2a59cde6c0bb03d8bfdfe2bbb45641e90c03a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217841
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-10-25 15:35:20 +00:00
Danny Tuppeny fa5f6fc186 [analysis_server] Change LSP semantic tokens to use Property for class fields
Fixes https://github.com/Dart-Code/Dart-Code/issues/3618.

Change-Id: I53b219dde6aeaaf64ac1b1a702b41c838c2b7819
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217920
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-10-25 15:21:19 +00:00
Sigurd Meldgaard ecc6ed1b32 Send resolution analytics from dart pub get/upgrade/...
Also enables batched analytics (up to 20 events will be sent together in
one request if they are all issued before control is returned to the
async queue).

Change-Id: Ic23429d4981bc33a34cb19ffc00affdd09dfe511
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217014
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2021-10-25 12:35:30 +00:00
Sigurd Meldgaard d54cd7cd54 Bump pub to 489a7a0b91966c7547da4f3761a9810f09caffb6
Changes:
```
> git log --format="%C(auto) %h %s" 400f21e..489a7a0
 https://dart.googlesource.com/pub.git/+/489a7a0b Allow the analytics instance to be created later (#3179)

```

Diff: https://dart.googlesource.com/pub.git/+/400f21e9883ce6555b66d3ef82f0b732ba9b9fc8~..489a7a0b91966c7547da4f3761a9810f09caffb6/
Change-Id: I44b791f82d355b3e19d1c0fac926b19ed054e2ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217900
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2021-10-25 09:26:09 +00:00
Paul Berry 5eb9461a03 Change ExpectedError.messageContains to a list.
This will allow tests to verify multiple substrings are present in the
error message without having to include all the intervening text
(which would make the tests brittle).

Change-Id: I8aeaa7edb7b6da0eadf8c12e8c01d7e0805d9b27
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217822
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-10-25 08:47:20 +00:00
Konstantin Shcheglov b61605b5e6 Remove double.CAPITAL constants.
Presubmit: https://fusion2.corp.google.com/presubmit/tap/404922794/OCL:404922794:BASE:405010232:1634915532338:93e197a/targets

Change-Id: Ib29a079678eced84e6d3a4f322c64a548b3668c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217781
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-10-23 18:22:33 +00:00
Konstantin Shcheglov 7e71047c08 Make UnitElementResult to implement FileResult.
Change-Id: I853d65e4ac906710891eed5e586cfb2345f57f11
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217802
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-10-23 17:41:54 +00:00
Konstantin Shcheglov e916841bcc Deprecations and renames for getXyz() in AnalysisDriver.
Presubmit looks green.
https://fusion2.corp.google.com/presubmit/tap/405055453/OCL:405055453:BASE:405057194:1634949541100:f811db8d/targets

Change-Id: I8f7f036003650611760523dd315ba89724a29b0d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217805
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-10-23 17:15:33 +00:00
Konstantin Shcheglov 8e1e3c8f2c Pass DartCompletionRequestImpl to DartCompletionManager.
We sometimes create it outside DartCompletionManager, and then call
and create it inside again.

Change-Id: Ifa5bd958437a5ea4e2bac65e7800183f915a9a07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217800
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-10-23 17:15:03 +00:00
Tim Sneath 5deec88041 Update diagnostics.dart
Sorry -- fixing a grammar nit. I know it's a tiny thing, but it bugs me!

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

GitOrigin-RevId: 5b6ec7c1a521a923f156e21bbcc81348043f45b4
Change-Id: Iea8bd74e20705cada2519b35183556c79eb0d265
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217821
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-10-23 15:38:57 +00:00
Paul Berry ce8ee6cf03 Check the number of arguments when instantiating AnalysisErrors.
Change-Id: I45fa2a560b7368370fae4a7a94d8f52136e92486
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213821
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-10-23 14:13:33 +00:00
Paul Berry 85bac75b0e Ensure that function reference resolution assigns an element and type when the method is inherited.
Change-Id: I2053c625617aa03bcad9ffa920c0ff27823a0a9d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217701
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-10-22 12:57:17 +00:00
Konstantin Shcheglov b3a1e96dba Prepare to publish analyzer 2.7.0 and _fe_analyzer_shared 30.0.0
Change-Id: I49b313dcdef2349b811bc853bd54cc57db78379e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217444
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-10-22 01:05:56 +00:00
pq d9edb9bc29 add double constants
See: https://github.com/dart-lang/linter/pull/3039

Change-Id: If0a2a02591a0a46c0c463ff2e79f35a1209dff35
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217700
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-10-22 00:16:56 +00:00
Devon Carew e20ffbb3ce Revert "Support overlapping deletions in quick fixes"
This reverts commit ff34b81174.

Reason for revert: This causes a failing test when trying to roll the engine into flutter/flutter. See https://github.com/flutter/flutter/issues/92181 for more context.

Original change's description:
> Support overlapping deletions in quick fixes
>
> I believe that the tests cover the added behavior (and some existing
> behavior), but they aren't complete. I'll add more tests over time, but
> for now the test coverage is strictly better than it used to be.
>
> Change-Id: I8dd228cb2b3c477c28e6d20c6da4a549a30d1afb
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217280
> Reviewed-by: Phil Quitslund <pquitslund@google.com>
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>

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

Change-Id: Ib50418544a2fd30c255ffc118b42c45aded3ae1c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217760
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2021-10-22 00:12:46 +00:00
Nicholas Shahan cc1cc4fa6e [ddc] Add pkg/dev_compiler as a dep for compiling SDK
Previously making only a change to pkg/dev_compiler would not
trigger the dart_sdk.js files to be rebuilt.

Change-Id: I9eba1a67269d3cc030901cf155a96f7e9f8dde4f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217520
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-10-21 22:45:16 +00:00
Kenzie Schmoll 6a39b26d07 Unhide the devtools command from dart --help
Change-Id: I853cdcd6cb968fa4c5c7b56a5ad69a27c60e4524
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217743
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Commit-Queue: Kenzie Schmoll <kenzieschmoll@google.com>
2021-10-21 21:43:05 +00:00
Konstantin Shcheglov 175c954637 Update to_source_visitor.dart
There is lost metadata in visitTopLevelVariableDeclaration

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

GitOrigin-RevId: 38e89ffca753998e6547c0d28496a56ce9c9d761
Change-Id: I196923ca0d802bdb6f70f59a6ad5c41679158b5f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217103
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-10-21 20:10:46 +00:00
Tess Strickland 8debbd0725 [vm] Fix writing v8 snapshot profiles for core snapshots.
Fixes a crash when SetObjectTypeAndName is called twice for the
same object id with different types.

Don't add Code objects to the profile for non-Code carrying snapshots,
as references to the Code object are replaced with references to null.

TEST=vm/dart{_2}/v8_snapshot_profile_writer_test

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

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-nnbd-linux-release-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try
Change-Id: Id9abf66509d422551ad5797744265eeb2c2ba2b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217643
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2021-10-21 19:39:15 +00:00
Konstantin Shcheglov 6451799849 API for package:build
Change-Id: I00bb4d6866202d404eee0b8bf6c13b4702cab617
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217561
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-10-21 19:38:35 +00:00