Skip to content

Commit b3857af

Browse files
mralephCommit Queue
authored andcommitted
Bump core to 58b0a108b4d1310465e8482d6629357891df1cb1
Changes: ``` > git log --format="%C(auto) %h %s" 5c3e2c3..58b0a10 https://dart.googlesource.com/core.git/+/58b0a108 Make it possible to add default subcommand (925) https://dart.googlesource.com/core.git/+/e43ff949 feat(collection): Replace quickSort with pdqsort for performance and robustness (922) https://dart.googlesource.com/core.git/+/f2efaaf3 Bump actions/checkout from 5.0.0 to 6.0.0 in the github-actions group (924) https://dart.googlesource.com/core.git/+/33b52327 Add `separated`, `separatedList` and `separate` to iterables and lists. (919) https://dart.googlesource.com/core.git/+/20ed9668 Add use_null_aware_elements to recommended (923) https://dart.googlesource.com/core.git/+/e6c3810c [crypto] remove the -wip to release new version (921) https://dart.googlesource.com/core.git/+/f7a786ac Bump actions/stale from 10.0.0 to 10.1.0 in the github-actions group (920) https://dart.googlesource.com/core.git/+/018e1dc7 fix(crypto): update conditional import for js interop library (915) https://dart.googlesource.com/core.git/+/9fefb52b Make Int64 default constructor non-const in native mode (916) https://dart.googlesource.com/core.git/+/f00841de Bump the github-actions group with 2 updates (914) https://dart.googlesource.com/core.git/+/7fee9c06 Fix `Int64.operator ==` (911) https://dart.googlesource.com/core.git/+/a4dc8738 Implement `Int64` as a wrapper for `int` when targeting native and Wasm (905) https://dart.googlesource.com/core.git/+/1aa58ef5 [fixnum] update the min. required dart sdk (907) https://dart.googlesource.com/core.git/+/60f2b5d3 Run fixnum tests with dart2wasm (906) ``` Diff: https://dart.googlesource.com/core.git/+/5c3e2c38df268be2347f3aad30ced0147dd012bb..58b0a108b4d1310465e8482d6629357891df1cb1/ Change-Id: Ibde49f27d1d26b8fc1aad3fd7df3efd924796b33 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/467361 Reviewed-by: Martin Kustermann <kustermann@google.com> Commit-Queue: Slava Egorov <vegorov@google.com>
1 parent 83acb15 commit b3857af

File tree

8 files changed

+32
-43
lines changed

8 files changed

+32
-43
lines changed

DEPS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ vars = {
132132
# 'tools/rev_sdk_deps.dart' will rev pkg dependencies to their latest; put an
133133
# EOL comment after a dependency to instead pin at the current revision.
134134
"ai_rev": "4eb2446144a8af374e08da8d3c743dcce129f87f",
135-
"core_rev": "5c3e2c38df268be2347f3aad30ced0147dd012bb", # b/444274553
135+
"core_rev": "58b0a108b4d1310465e8482d6629357891df1cb1", # b/444274553
136136
"dartdoc_rev": "6d1aa6f5045c33d3723aba05e3e0dc1403b763c0",
137137
"ecosystem_rev": "eac66d93142907b39f2271647c111f36ff3365b9",
138138
"flute_rev": "b84119fba67016a80c3eb80765762bcc4d0d0b8d",

pkg/analyzer/lib/src/dart/ast/ast.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26169,8 +26169,7 @@ base mixin _AnnotatedNodeMixin on AstNodeImpl implements AnnotatedNode {
2616926169
@override
2617026170
List<AstNode> get sortedCommentAndAnnotations {
2617126171
var comment = _documentationComment;
26172-
return <AstNode>[if (comment != null) comment, ..._metadata]
26173-
..sort(AstNode.LEXICAL_ORDER);
26172+
return <AstNode>[?comment, ..._metadata]..sort(AstNode.LEXICAL_ORDER);
2617426173
}
2617526174

2617626175
@override

pkg/analyzer/lib/src/generated/error_verifier.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1731,7 +1731,7 @@ class ErrorVerifier extends RecursiveAstVisitor<void>
17311731
);
17321732
_checkForClassUsedAsMixin(withClause);
17331733
_checkForSealedSupertypeOutsideOfLibrary([
1734-
if (superclass != null) superclass,
1734+
?superclass,
17351735
...?withClause?.mixinTypes,
17361736
...?implementsClause?.interfaces,
17371737
]);

pkg/analyzer/test/src/dart/analysis/result_printer.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1585,7 +1585,7 @@ class LibraryManifestPrinter extends ManifestPrinter {
15851585
element.libraryUri,
15861586
element.kind.name,
15871587
element.topLevelName,
1588-
if (element.memberName case var memberName?) memberName,
1588+
?element.memberName,
15891589
];
15901590
var idStr = idProvider.manifestId(element.id);
15911591
sink.writeln('(${parts.join(', ')}) $idStr');

pkg/analyzer_cli/lib/src/error_formatter.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ class JsonErrorFormatter extends ErrorFormatter {
449449
if (error.correctionMessage != null)
450450
'correctionMessage': error.correctionMessage,
451451
if (contextMessages.isNotEmpty) 'contextMessages': contextMessages,
452-
if (url != null) 'documentation': url,
452+
'documentation': ?url,
453453
});
454454
}
455455
}

pkg/analyzer_utilities/lib/tool/api.dart

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -168,14 +168,14 @@ class ApiDescription {
168168
}
169169
}
170170
if (optionalParams.isNotEmpty) {
171-
params.add(optionalParams.separate(prefix: '[', suffix: ']'));
171+
params.add(optionalParams._separated(prefix: '[', suffix: ']'));
172172
}
173173
if (namedParams.isNotEmpty) {
174174
params.add(
175175
namedParams.entries
176176
.sortedBy((e) => e.key)
177177
.map((e) => [...e.value, ' ${e.key}'])
178-
.separate(prefix: '{', suffix: '}'),
178+
._separated(prefix: '{', suffix: '}'),
179179
);
180180
}
181181
return <Object?>[
@@ -184,9 +184,9 @@ class ApiDescription {
184184
if (typeParameters.isNotEmpty)
185185
...typeParameters
186186
.map(_describeTypeParameter)
187-
.separate(prefix: '<', suffix: '>'),
187+
._separated(prefix: '<', suffix: '>'),
188188
'(',
189-
...params.separate(),
189+
...params._separated(),
190190
')',
191191
suffix,
192192
];
@@ -197,7 +197,7 @@ class ApiDescription {
197197
if (typeArguments.isNotEmpty)
198198
...typeArguments
199199
.map(_describeType)
200-
.separate(prefix: '<', suffix: '>'),
200+
._separated(prefix: '<', suffix: '>'),
201201
suffix,
202202
];
203203
case RecordType(:var positionalFields, :var namedFields):
@@ -217,8 +217,8 @@ class ApiDescription {
217217
namedFields
218218
.sortedBy((f) => f.name)
219219
.map((f) => [..._describeType(f.type), ' ', f.name])
220-
.separate(prefix: '{', suffix: '}'),
221-
].separate(prefix: '(', suffix: ')'),
220+
._separated(prefix: '{', suffix: '}'),
221+
]._separated(prefix: '(', suffix: ')'),
222222
suffix,
223223
];
224224
case TypeParameterType(:var element):
@@ -262,7 +262,7 @@ class ApiDescription {
262262
description.addAll(
263263
typeParameters
264264
.map(_describeTypeParameter)
265-
.separate(prefix: '<', suffix: '>'),
265+
._separated(prefix: '<', suffix: '>'),
266266
);
267267
}
268268
description.addAll([' for ', ..._describeType(aliasedType)]);
@@ -286,7 +286,7 @@ class ApiDescription {
286286
instanceDescription.addAll(
287287
typeParameters
288288
.map(_describeTypeParameter)
289-
.separate(prefix: '<', suffix: '>'),
289+
._separated(prefix: '<', suffix: '>'),
290290
);
291291
}
292292
if (element is! EnumElement && supertype != null) {
@@ -300,12 +300,14 @@ class ApiDescription {
300300
instanceDescription.addAll(
301301
element.superclassConstraints
302302
.map(_describeType)
303-
.separate(prefix: ' on '),
303+
._separated(prefix: ' on '),
304304
);
305305
}
306306
if (interfaces.isNotEmpty) {
307307
instanceDescription.addAll(
308-
interfaces.map(_describeType).separate(prefix: ' implements '),
308+
interfaces
309+
.map(_describeType)
310+
._separated(prefix: ' implements '),
309311
);
310312
}
311313
parentheticals.add(instanceDescription);
@@ -414,7 +416,7 @@ class ApiDescription {
414416
}
415417

416418
if (parentheticals.isNotEmpty) {
417-
node.text.addAll(parentheticals.separate(prefix: ' (', suffix: ')'));
419+
node.text.addAll(parentheticals._separated(prefix: ' (', suffix: ')'));
418420
}
419421
if (node.childNodes.isNotEmpty) {
420422
node.text.add(':');
@@ -629,7 +631,7 @@ class UriSortKey implements Comparable<UriSortKey> {
629631
extension on Iterable<Iterable<Object?>> {
630632
/// Forms a list containing [prefix], followed by the elements of `this`
631633
/// (separated by [separator]), followed by [suffix].
632-
List<Object?> separate({
634+
List<Object?> _separated({
633635
String separator = ', ',
634636
String prefix = '',
635637
String suffix = '',

pkg/dev_compiler/lib/src/kernel/compiler.dart

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1538,13 +1538,13 @@ class ProgramCompiler extends ComputeOnceConstantVisitor<js_ast.Expression>
15381538
_usesMixinNew(mixin.classNode)
15391539
? _runtimeCall('mixinNew')
15401540
: _constructorName(''),
1541-
[if (mixinRti != null) mixinRti],
1541+
[?mixinRti],
15421542
]);
15431543
}
15441544

15451545
var name = ctor.name.text;
15461546
var ctorBody = [
1547-
if (mixinCtor != null) mixinCtor,
1547+
?mixinCtor,
15481548
if (name != '' || hasUnnamedSuper)
15491549
_emitSuperConstructorCall(
15501550
ctor,
@@ -2279,10 +2279,7 @@ class ProgramCompiler extends ComputeOnceConstantVisitor<js_ast.Expression>
22792279
var initializer = js.statement('#.#.call(this, #);', [
22802280
className,
22812281
_constructorName(init.target.name.text),
2282-
[
2283-
if (rtiParam != null) rtiParam,
2284-
..._emitArgumentList(init.arguments, types: false),
2285-
],
2282+
[?rtiParam, ..._emitArgumentList(init.arguments, types: false)],
22862283
]);
22872284
jsInitializers.add(initializer);
22882285
}
@@ -2311,10 +2308,7 @@ class ProgramCompiler extends ComputeOnceConstantVisitor<js_ast.Expression>
23112308
var rti = _requiresRtiForInstantiation(ctor.enclosingClass)
23122309
? js_ast.LiteralNull()
23132310
: null;
2314-
args = [
2315-
if (rti != null) rti,
2316-
..._emitArgumentList(superInit.arguments, types: true),
2317-
];
2311+
args = [?rti, ..._emitArgumentList(superInit.arguments, types: true)];
23182312

23192313
_currentTypeEnvironment = savedTypeEnvironment;
23202314
}
@@ -7444,7 +7438,7 @@ class ProgramCompiler extends ComputeOnceConstantVisitor<js_ast.Expression>
74447438
)
74457439
: null;
74467440
var result = js_ast.New(_emitConstructorName(node.constructedType, ctor), [
7447-
if (rti != null) rti,
7441+
?rti,
74487442
..._emitArgumentList(args, types: false, target: ctor),
74497443
]);
74507444
return node.isConst ? _canonicalizeConstObject(result) : result;
@@ -7513,7 +7507,7 @@ class ProgramCompiler extends ComputeOnceConstantVisitor<js_ast.Expression>
75137507
? _emitType(type, emitJSInteropGenericClassTypeParametersAsAny: false)
75147508
: null;
75157509
var result = js_ast.Call(_emitConstructorName(type, ctor), [
7516-
if (rti != null) rti,
7510+
?rti,
75177511
..._emitArgumentList(args, types: false),
75187512
]);
75197513
return node.isConst ? _canonicalizeConstObject(result) : result;

pkg/dev_compiler/lib/src/kernel/compiler_new.dart

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1853,13 +1853,13 @@ class LibraryCompiler extends ComputeOnceConstantVisitor<js_ast.Expression>
18531853
_usesMixinNew(mixin.classNode)
18541854
? _runtimeCall('mixinNew')
18551855
: _constructorName(''),
1856-
[if (mixinRti != null) mixinRti],
1856+
[?mixinRti],
18571857
]);
18581858
}
18591859

18601860
var name = ctor.name.text;
18611861
var ctorBody = [
1862-
if (mixinCtor != null) mixinCtor,
1862+
?mixinCtor,
18631863
if (name != '' || hasUnnamedSuper)
18641864
_emitSuperConstructorCall(
18651865
ctor,
@@ -2583,10 +2583,7 @@ class LibraryCompiler extends ComputeOnceConstantVisitor<js_ast.Expression>
25832583
var initializer = js.statement('#.#.call(this, #);', [
25842584
className,
25852585
_constructorName(init.target.name.text),
2586-
[
2587-
if (rtiParam != null) rtiParam,
2588-
..._emitArgumentList(init.arguments, types: false),
2589-
],
2586+
[?rtiParam, ..._emitArgumentList(init.arguments, types: false)],
25902587
]);
25912588
jsInitializers.add(initializer);
25922589
}
@@ -2615,10 +2612,7 @@ class LibraryCompiler extends ComputeOnceConstantVisitor<js_ast.Expression>
26152612
var rti = _requiresRtiForInstantiation(ctor.enclosingClass)
26162613
? js_ast.LiteralNull()
26172614
: null;
2618-
args = [
2619-
if (rti != null) rti,
2620-
..._emitArgumentList(superInit.arguments, types: true),
2621-
];
2615+
args = [?rti, ..._emitArgumentList(superInit.arguments, types: true)];
26222616

26232617
_currentTypeEnvironment = savedTypeEnvironment;
26242618
}
@@ -8312,7 +8306,7 @@ class LibraryCompiler extends ComputeOnceConstantVisitor<js_ast.Expression>
83128306
)
83138307
: null;
83148308
var result = js_ast.New(_emitConstructorName(node.constructedType, ctor), [
8315-
if (rti != null) rti,
8309+
?rti,
83168310
..._emitArgumentList(args, types: false, target: ctor),
83178311
]);
83188312
return node.isConst ? _canonicalizeConstObject(result) : result;
@@ -8381,7 +8375,7 @@ class LibraryCompiler extends ComputeOnceConstantVisitor<js_ast.Expression>
83818375
? _emitType(type, emitJSInteropGenericClassTypeParametersAsAny: false)
83828376
: null;
83838377
var result = js_ast.Call(_emitConstructorName(type, ctor), [
8384-
if (rti != null) rti,
8378+
?rti,
83858379
..._emitArgumentList(args, types: false),
83868380
]);
83878381
return node.isConst ? _canonicalizeConstObject(result) : result;

0 commit comments

Comments
 (0)