Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit abecc4b

Browse files
author
Dart CI
committed
Version 2.15.0-43.0.dev
Merge commit 'b977476ca044d23807c7342245158ea335124bdf' into 'dev'
2 parents 2b84af1 + b977476 commit abecc4b

12 files changed

+4947
-66
lines changed

pkg/_fe_analyzer_shared/lib/src/parser/parser_impl.dart

Lines changed: 50 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -668,8 +668,9 @@ class Parser {
668668
listener.handleImportPrefix(/* deferredKeyword = */ null, asKeyword);
669669
} else {
670670
listener.handleImportPrefix(
671-
/* deferredKeyword = */ null,
672-
/* asKeyword = */ null);
671+
/* deferredKeyword = */ null,
672+
/* asKeyword = */ null,
673+
);
673674
}
674675
return token;
675676
}
@@ -1447,9 +1448,10 @@ class Parser {
14471448
}
14481449
// Parse the (potential) new type.
14491450
TypeInfo typeInfoAlternative = computeType(
1450-
token,
1451-
/* required = */ false,
1452-
/* inDeclaration = */ true);
1451+
token,
1452+
/* required = */ false,
1453+
/* inDeclaration = */ true,
1454+
);
14531455
token = typeInfoAlternative.skipType(token);
14541456
next = token.next!;
14551457

@@ -2115,8 +2117,9 @@ class Parser {
21152117
} else {
21162118
listener.handleNoType(token);
21172119
listener.handleClassExtends(
2118-
/* extendsKeyword = */ null,
2119-
/* typeCount = */ 1);
2120+
/* extendsKeyword = */ null,
2121+
/* typeCount = */ 1,
2122+
);
21202123
}
21212124
return token;
21222125
}
@@ -2524,9 +2527,10 @@ class Parser {
25242527
}
25252528
// Parse the (potential) new type.
25262529
TypeInfo typeInfoAlternative = computeType(
2527-
token,
2528-
/* required = */ false,
2529-
/* inDeclaration = */ true);
2530+
token,
2531+
/* required = */ false,
2532+
/* inDeclaration = */ true,
2533+
);
25302534
token = typeInfoAlternative.skipType(token);
25312535
next = token.next!;
25322536

@@ -2643,9 +2647,10 @@ class Parser {
26432647
indicatesMethodOrField(next.next!.next!)) {
26442648
// Recovery: Use the reserved keyword despite that not being legal.
26452649
typeInfo = computeType(
2646-
token,
2647-
/*required = */ true,
2648-
/* inDeclaration = */ true);
2650+
token,
2651+
/* required = */ true,
2652+
/* inDeclaration = */ true,
2653+
);
26492654
token = typeInfo.skipType(token);
26502655
next = token.next!;
26512656
nameIsRecovered = true;
@@ -3610,9 +3615,10 @@ class Parser {
36103615

36113616
Token beforeType = token;
36123617
TypeInfo typeInfo = computeType(
3613-
token,
3614-
/*required = */ false,
3615-
/* inDeclaration = */ true);
3618+
token,
3619+
/* required = */ false,
3620+
/* inDeclaration = */ true,
3621+
);
36163622
token = typeInfo.skipType(token);
36173623
next = token.next!;
36183624

@@ -3757,9 +3763,10 @@ class Parser {
37573763
indicatesMethodOrField(next2.next!)) {
37583764
// Recovery: Use the reserved keyword despite that not being legal.
37593765
typeInfo = computeType(
3760-
token,
3761-
/*required = */ true,
3762-
/* inDeclaration = */ true);
3766+
token,
3767+
/* required = */ true,
3768+
/* inDeclaration = */ true,
3769+
);
37633770
token = typeInfo.skipType(token);
37643771
next = token.next!;
37653772
nameIsRecovered = true;
@@ -3962,8 +3969,11 @@ class Parser {
39623969
reportRecoverableError(bodyStart, codes.messageRedirectionInNonFactory);
39633970
token = parseRedirectingFactoryBody(token);
39643971
} else {
3965-
token = parseFunctionBody(token, /* ofFunctionExpression = */ false,
3966-
(staticToken == null || externalToken != null) && inPlainSync);
3972+
token = parseFunctionBody(
3973+
token,
3974+
/* ofFunctionExpression = */ false,
3975+
(staticToken == null || externalToken != null) && inPlainSync,
3976+
);
39673977
}
39683978
asyncState = savedAsyncModifier;
39693979

@@ -4112,19 +4122,21 @@ class Parser {
41124122
reportRecoverableError(next, codes.messageExternalFactoryWithBody);
41134123
}
41144124
token = parseFunctionBody(
4115-
token,
4116-
/* ofFunctionExpression = */ false,
4117-
/* allowAbstract = */ true);
4125+
token,
4126+
/* ofFunctionExpression = */ false,
4127+
/* allowAbstract = */ true,
4128+
);
41184129
} else {
41194130
if (varFinalOrConst != null && !optional('native', next)) {
41204131
if (optional('const', varFinalOrConst)) {
41214132
listener.handleConstFactory(varFinalOrConst);
41224133
}
41234134
}
41244135
token = parseFunctionBody(
4125-
token,
4126-
/* ofFunctionExpression = */ false,
4127-
/* allowAbstract = */ false);
4136+
token,
4137+
/* ofFunctionExpression = */ false,
4138+
/* allowAbstract = */ false,
4139+
);
41284140
}
41294141
switch (kind) {
41304142
case DeclarationKind.Class:
@@ -4418,9 +4430,7 @@ class Parser {
44184430
begin = next = token.next!;
44194431
// Fall through to parse the block.
44204432
} else {
4421-
token = ensureBlock(
4422-
token,
4423-
codes.templateExpectedFunctionBody,
4433+
token = ensureBlock(token, codes.templateExpectedFunctionBody,
44244434
/* missingBlockName = */ null);
44254435
listener.handleInvalidFunctionBody(token);
44264436
return token.endGroup!;
@@ -5528,10 +5538,11 @@ class Parser {
55285538
if (optional('[]', token)) {
55295539
token = rewriteSquareBrackets(beforeToken).next!;
55305540
listener.handleLiteralList(
5531-
/* count = */ 0,
5532-
token,
5533-
constKeyword,
5534-
token.next!);
5541+
/* count = */ 0,
5542+
token,
5543+
constKeyword,
5544+
token.next!,
5545+
);
55355546
return token.next!;
55365547
}
55375548
bool old = mayParseFunctionExpressions;
@@ -6584,10 +6595,11 @@ class Parser {
65846595
listener.beginLocalFunctionDeclaration(start.next!);
65856596
token = typeInfo.parseType(beforeType, this);
65866597
return parseNamedFunctionRest(
6587-
token,
6588-
start.next!,
6589-
beforeFormals,
6590-
/* isFunctionExpression = */ false);
6598+
token,
6599+
start.next!,
6600+
beforeFormals,
6601+
/* isFunctionExpression = */ false,
6602+
);
65916603
}
65926604
}
65936605

pkg/_fe_analyzer_shared/lib/src/parser/quote.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ String unescape(String string, Quote quote, Object location,
181181
String unescapeCodeUnits(List<int> codeUnits, bool isRaw, Object location,
182182
UnescapeErrorListener listener) {
183183
// Can't use Uint8List or Uint16List here, the code units may be larger.
184-
List<int> result = new List<int>.filled(codeUnits.length, 0);
184+
List<int> result = new List<int>.filled(codeUnits.length, /* fill = */ 0);
185185
int resultOffset = 0;
186186

187187
for (int i = 0; i < codeUnits.length; i++) {

pkg/_fe_analyzer_shared/lib/src/parser/stack_listener.dart

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,8 @@ abstract class Stack {
526526
}
527527

528528
class StackImpl implements Stack {
529-
List<Object?> array = new List<Object?>.filled(/* length = */ 8, null);
529+
List<Object?> array =
530+
new List<Object?>.filled(/* length = */ 8, /* fill = */ null);
530531
int arrayLength = 0;
531532

532533
bool get isNotEmpty => arrayLength > 0;
@@ -610,14 +611,16 @@ class StackImpl implements Stack {
610611

611612
List<Object?> get values {
612613
final int length = arrayLength;
613-
final List<Object?> list = new List<Object?>.filled(length, null);
614+
final List<Object?> list =
615+
new List<Object?>.filled(length, /* fill = */ null);
614616
list.setRange(/* start = */ 0, length, array);
615617
return list;
616618
}
617619

618620
void _grow() {
619621
final int length = array.length;
620-
final List<Object?> newArray = new List<Object?>.filled(length * 2, null);
622+
final List<Object?> newArray =
623+
new List<Object?>.filled(length * 2, /* fill = */ null);
621624
newArray.setRange(/* start = */ 0, length, array, /* skipCount = */ 0);
622625
array = newArray;
623626
}
@@ -692,7 +695,8 @@ class FixedNullableList<T> {
692695

693696
List<T?>? pop(Stack stack, int count, [NullValue? nullValue]) {
694697
if (count == 0) return null;
695-
return stack.popList(count, new List<T?>.filled(count, null), nullValue);
698+
return stack.popList(
699+
count, new List<T?>.filled(count, /* fill = */ null), nullValue);
696700
}
697701

698702
List<T>? popNonNullable(Stack stack, int count, T dummyValue) {
@@ -704,8 +708,8 @@ class FixedNullableList<T> {
704708
List<T?>? popPadded(Stack stack, int count, int padding,
705709
[NullValue? nullValue]) {
706710
if (count + padding == 0) return null;
707-
return stack.popList(
708-
count, new List<T?>.filled(count + padding, null), nullValue);
711+
return stack.popList(count,
712+
new List<T?>.filled(count + padding, /* fill = */ null), nullValue);
709713
}
710714

711715
List<T>? popPaddedNonNullable(

pkg/_fe_analyzer_shared/lib/src/scanner/keyword_state.dart

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@ abstract class KeywordState {
2525
.toList(growable: false);
2626
strings.sort((a, b) => a.compareTo(b));
2727
_KEYWORD_STATE = computeKeywordStateTable(
28-
/* start = */ 0,
29-
strings,
30-
/* offset = */ 0,
31-
strings.length);
28+
/* start = */ 0,
29+
strings,
30+
/* offset = */ 0,
31+
strings.length,
32+
);
3233
}
3334
return _KEYWORD_STATE!;
3435
}
@@ -38,7 +39,7 @@ abstract class KeywordState {
3839
bool isLowercase = true;
3940

4041
List<KeywordState?> table =
41-
new List<KeywordState?>.filled($z - $A + 1, null);
42+
new List<KeywordState?>.filled($z - $A + 1, /* fill = */ null);
4243
assert(length != 0);
4344
int chunk = 0;
4445
int chunkStart = -1;

pkg/_fe_analyzer_shared/lib/src/scanner/string_canonicalizer.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class StringCanonicalizer {
3434
int _count = 0;
3535

3636
/// The table itself.
37-
List<Node?> _nodes = new List<Node?>.filled(INITIAL_SIZE, null);
37+
List<Node?> _nodes = new List<Node?>.filled(INITIAL_SIZE, /* fill = */ null);
3838

3939
static String decode(List<int> data, int start, int end, bool asciiOnly) {
4040
String s;
@@ -64,7 +64,7 @@ class StringCanonicalizer {
6464

6565
rehash() {
6666
int newSize = _size * 2;
67-
List<Node?> newNodes = new List<Node?>.filled(newSize, null);
67+
List<Node?> newNodes = new List<Node?>.filled(newSize, /* fill = */ null);
6868
for (int i = 0; i < _size; i++) {
6969
Node? t = _nodes[i];
7070
while (t != null) {
@@ -117,7 +117,7 @@ class StringCanonicalizer {
117117

118118
clear() {
119119
_size = INITIAL_SIZE;
120-
_nodes = new List<Node?>.filled(_size, null);
120+
_nodes = new List<Node?>.filled(_size, /* fill = */ null);
121121
_count = 0;
122122
}
123123
}
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
void test(int abstract) {}
2+
void test(int as) {}
3+
void test(int assert) {}
4+
void test(int async) {}
5+
void test(int await) {}
6+
void test(int break) {}
7+
void test(int case) {}
8+
void test(int catch) {}
9+
void test(int class) {}
10+
void test(int const) {}
11+
void test(int continue) {}
12+
void test(int covariant) {}
13+
void test(int default) {}
14+
void test(int deferred) {}
15+
void test(int do) {}
16+
void test(int dynamic) {}
17+
void test(int else) {}
18+
void test(int enum) {}
19+
void test(int export) {}
20+
void test(int extends) {}
21+
void test(int extension) {}
22+
void test(int external) {}
23+
void test(int factory) {}
24+
void test(int false) {}
25+
void test(int final) {}
26+
void test(int finally) {}
27+
void test(int for) {}
28+
void test(int Function) {}
29+
void test(int get) {}
30+
void test(int hide) {}
31+
void test(int if) {}
32+
void test(int implements) {}
33+
void test(int import) {}
34+
void test(int in) {}
35+
void test(int inout) {}
36+
void test(int interface) {}
37+
void test(int is) {}
38+
void test(int late) {}
39+
void test(int library) {}
40+
void test(int mixin) {}
41+
void test(int native) {}
42+
void test(int new) {}
43+
void test(int null) {}
44+
void test(int of) {}
45+
void test(int on) {}
46+
void test(int operator) {}
47+
void test(int out) {}
48+
void test(int part) {}
49+
void test(int patch) {}
50+
void test(int required) {}
51+
void test(int rethrow) {}
52+
void test(int return) {}
53+
void test(int set) {}
54+
void test(int show) {}
55+
void test(int source) {}
56+
void test(int static) {}
57+
void test(int super) {}
58+
void test(int switch) {}
59+
void test(int sync) {}
60+
void test(int this) {}
61+
void test(int throw) {}
62+
void test(int true) {}
63+
void test(int try) {}
64+
void test(int typedef) {}
65+
void test(int var) {}
66+
void test(int void) {}
67+
void test(int while) {}
68+
void test(int with) {}
69+
void test(int yield) {}

0 commit comments

Comments
 (0)