[M] Change in dart/sdk[main]: [analyzer] Avoid more _SlowSetRange

0 views
Skip to first unread message

Johnni Winther (Gerrit)

unread,
4:42 AM (14 hours ago) 4:42 AM
to Jens Johansen, dart-...@luci-project-accounts.iam.gserviceaccount.com, dart-analys...@google.com, rev...@dartlang.org
Attention needed from Jens Johansen

Johnni Winther voted and added 7 comments

Votes added by Johnni Winther

Code-Review+1

7 comments

File pkg/analyzer/lib/src/fine/manifest_ast.dart
Line 188, Patchset 4 (Latest): var collectorElementIndexList = collector.elementIndexList;
if (collectorElementIndexList.length != elementIndexList.length) {
return false;
}
for (int i = 0; i < elementIndexList.length; i++) {
if (collectorElementIndexList[i] != elementIndexList[i]) return false;
}
Johnni Winther . unresolved

Maybe add element equals directly on `GrowableUint32List` and use it here.

File pkg/analyzer/lib/src/utilities/growable_type_data.dart
Line 7, Patchset 4 (Latest):Uint32List _emptyUint32List = Uint32List(0);
Johnni Winther . unresolved

Should this be final?

Line 8, Patchset 4 (Latest):Uint8List _emptyUint8List = Uint8List(0);
Johnni Winther . unresolved

Ditto.

Line 10, Patchset 4 (Latest):class GrowableUint32List {
Johnni Winther . unresolved

Add documentation for this, in particular why we are using this and not `List<int>`.

Line 33, Patchset 4 (Latest): Uint32List takeAndReset() {
Johnni Winther . unresolved

Add documentation for this.

Line 56, Patchset 4 (Latest):class GrowableUint8List {
Johnni Winther . unresolved

Add documentation for this, in particular why we are using this and not `List<int>`.

Line 79, Patchset 4 (Latest): Uint8List takeAndReset() {
Johnni Winther . unresolved

Add documentation for this.

Open in Gerrit

Related details

Attention is currently required from:
  • Jens Johansen
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I78d2f61d82a993b8d1d76ab5f13230d8b6507ff4
Gerrit-Change-Number: 508564
Gerrit-PatchSet: 4
Gerrit-Owner: Jens Johansen <je...@google.com>
Gerrit-Reviewer: Jens Johansen <je...@google.com>
Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
Gerrit-Attention: Jens Johansen <je...@google.com>
Gerrit-Comment-Date: Wed, 03 Jun 2026 08:42:03 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages