See b/235079681 (analyzer is slow with many part file).
1. Pre-compute UsedLocalElements.merge() before calling '_computeHints()' on each part files.
2. Optimize HashSet insertion:
Remove implementation of ParameterMember.hashCode.
This implementation was not linked to a corresponding '.==' override.
So, while not wrong, it did cause many collisions not resulting in equality.
Change-Id: I060d62e9e81a7d9b2183306106a16c27a5cbeffe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250520
Commit-Queue: Emmanuel Pellereau <emmanuelp@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Will make it easier to reuse the normalization when compiling
with the new runtime type representation.
Change-Id: Ie767a2b676950205b0b50eadac305c29914433f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247420
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Bug: b/237755665
Cq-Include-Trybots: luci.dart.try:analyzer-linux-release-try,analyzer-mac-release-try,analyzer-win-release-try
Change-Id: Ia48331d6fd6bf00df9dbe1b895e157a0957064f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249608
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
`VariableDeclaration.name` could be null when the variable
was synthetically introduced by the compiler. In this case the
expression compiler can ignore the variable because it's value
doesn't reflect the value of a variable in the original dart
source code.
Add a regression test for the expression compiler that
ensures code that introduces a synthetic variable will not
cause a crash when you stop at a breakpoint.
Fixes: https://github.com/dart-lang/sdk/issues/49373
Change-Id: Ifc5f72ab4e5733ead17a20889c222bcc46921f6b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250343
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Anna Gringauze <annagrin@google.com>
This change moves the `variableType` method from the class
`TypeOperations` to a new class, `VariableOperations`, which in turn
allows removing the type parameter `Variable` parameter from
`TypeOperations`. A new class, `Operations`, is introduced to serve
the role served previously by `TypeOperations` for flow analysis
clients (i.e. it is the base class that clients should extend).
This paves the way for a future CL that will remove the type parameter
`Variable` from other classes inside flow analysis.
Bug: https://github.com/dart-lang/language/issues/2020
Change-Id: Ic45d07a0f873b692fda4b6f807c1130ac592b010
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250108
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
All subclasses of Command must override indexedCopy.
A @subClassMustOverride annotation could have caught this problem.
Bug: https://github.com/dart-lang/sdk/issues/30175
Change-Id: I836cf58ae2233e3b2a5c7a494461e570aad5ffb9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250300
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Adds a replacement visitor for Constant types using null as a
sentinel value for whether a subnode has changed or not (except
in the case of TreeNodes in order to match existing Visitor
semantics).
Change-Id: Iaaab1b1c608af07f36ece08071b3d703884cd91b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248944
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Index cache maps should be copied instead of used directly. And the set of indices (DataSourceIndices.caches) needs to be copied as well since we alter it when reading each shard.
Change-Id: If7a640ead07a54e3cb6003eee89c44db8f449812
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250202
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
I've found these changes helpful as part of developing the new "field
promotion" feature. These changes have no effect unless the
`FlowAnalysisDebug` class is used.
Bug: https://github.com/dart-lang/language/issues/2020
Change-Id: I7badadc14bf901e77b8c166920aedf902093d7e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250220
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This allows the _fe_analyzer_shared package to make use of the new
"super parameters" feature.
Change-Id: Iebea526cd91563a0ba603796d2df8af633adfaae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250180
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
This is in preparation for supporting `augment super` access of
augmented members.
Change-Id: Ib306ef59faa7c9ad735304545aa414f6b21e2596
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249862
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Includes skipping duplicated installation code.
For more info, see #49348
Change-Id: I34833df32156d9fe090b579b665dd9cb93860f8b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250020
Commit-Queue: Mark Zhou <markzipan@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>