Skip to content

Commit 292fcf7

Browse files
author
Dart CI
committed
Version 2.19.0-376.0.dev
Merge fa6840a into dev
2 parents b22b36c + fa6840a commit 292fcf7

21 files changed

+514
-543
lines changed

DEPS

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ vars = {
107107
"clock_rev": "97026d1657566bb0c9f5a33642712ec350e45084",
108108
"collection_rev": "efd709fc1760a595f8575f4137a1847de1b49d76",
109109
"convert_rev": "4feeb10d2f26d22eab461469da0739a57d001edf",
110-
"crypto_rev": "7cf89d35b3d90786d9f7f75211b3b3cd7e4d173f",
110+
"crypto_rev": "e175a95619ce23bfbd2ab34a4066f86aa0c108db",
111111
"csslib_rev": "ba2eb2d80530eedefadaade338a09c2dd60410f3",
112112

113113
# Note: Updates to dart_style have to be coordinated with the infrastructure
@@ -122,18 +122,18 @@ vars = {
122122
# For more details, see https://github.com/dart-lang/sdk/issues/30164.
123123
"dart_style_rev": "f79a9828ad07e50d6e8352ac154cc16eb4d78d5c", # manually rev'd
124124

125-
"dartdoc_rev": "179ada02c1bf8e0d69c3255c49742c7513e33f6f",
125+
"dartdoc_rev": "4b2e01b6e8c7c4e5e365026c182006b9616ecc28",
126126
"devtools_rev": "23444af89d716818f099974df3e4fffac87fd886",
127127
"ffi_rev": "fb5f2667826c0900e551d19101052f84e35f41bf",
128-
"file_rev": "b2e31cb6ef40b223701dbfa0b907fe58468484d7",
128+
"file_rev": "b768f79dcd104a5feabafab47101c4355b71cd8f",
129129
"fixnum_rev": "e0b17cc1f639c55a9c24947392c64b5a68992535",
130-
"glob_rev": "073007c5d00822a0ddc964c027785d1eb5559d68",
130+
"glob_rev": "7f97bf5be6bfe8c90a92283e4c590dba2a676083",
131131
"html_rev": "0bf601959ac98e6cdf1925a1cdab70bd6a5ddc45",
132132
"http_multi_server_rev": "20bf079c8955d1250a45afb9cb096472a724a551",
133133
"http_parser_rev": "c73967535ce31120e218120f70ef98cc22688c82",
134134
"http_rev": "63390263e230bbd0aa2dae286fd7a64098e09029",
135135
"icu_rev": "81d656878ec611cb0b42d52c82e9dae93920d9ba",
136-
"intl_rev": "dda8ade30e8865843c6650a20a18bbf94387adee",
136+
"intl_rev": "442193ccd19a8e36a07fcc3b3cac0e58c6f9c542",
137137
"jinja2_rev": "2222b31554f03e62600cd7e383376a7c187967a1",
138138
"json_rpc_2_rev": "805e6536dd961d66f6b8cd46d8f3e61774f957c9",
139139
"linter_rev": "f2c55484e8ebda0aec8c2fea637b3bd5b17258ca", # 1.28.0
@@ -153,7 +153,7 @@ vars = {
153153
"pub_rev": "65c7f3e528f3f9978c4330cbd471070f17370f65", # manually rev'd
154154
"pub_semver_rev": "28159b8c5b96fc2709d0904389d7932880f68659",
155155
"root_certificates_rev": "692f6d6488af68e0121317a9c2c9eb393eb0ee50",
156-
"shelf_rev": "592656f9f5af6392509e9ff20a035fd30e5e5099",
156+
"shelf_rev": "5fd2593d47120232054ebcc794f3a028d903f1f8",
157157
"source_map_stack_trace_rev": "8d8078fcc81c8f7936805cd277198493e0b7fc62",
158158
"source_maps_rev": "b031e2cdbef5675ab9a92025202d323a5e7cc526",
159159
"source_span_rev": "d1d47e550b6f77ed9b4907339a8a5e430b9ca314",
@@ -163,18 +163,18 @@ vars = {
163163
"string_scanner_rev": "4a5cbc5c1127151ea507cc9da797b829857607e8",
164164
"sync_http_rev": "f5c1f18f579752112870fa2f1860470d28c6f605",
165165
"term_glyph_rev": "ec7cf7bb51ebb7d55760a1359f6697690dbc06ba",
166-
"test_descriptor_rev": "66f14ce9159f425da000ad105e0b890fe396c2b7",
166+
"test_descriptor_rev": "13dbc20e9d5c354b670353220c3ab95642ae228c",
167167
"test_process_rev": "1774aa7a94ebbc60924a7f7174adb02e84458c25",
168168
"test_reflective_loader_rev": "ef934b7a894d78601ba67d8f6207bd4505690456",
169-
"test_rev": "173a36f2cd4fbf1b2309a87722664d802c74009b",
169+
"test_rev": "f3fb3ab6a6e6068b2daaed95ca13e526238def26",
170170
"typed_data_rev": "6369490ede1c87a4a5758304a606a6e4eee364b9",
171171
"usage_rev": "fee1d9d9c295362f6edebfeebb9f8187711c55ab",
172172
"vector_math_rev": "1eee95b15e5d35cf519514cc253037b19705fb7a",
173173
"watcher_rev": "32591071a83f632478e702f67e29de6e54428ce9",
174174
"web_components_rev": "8f57dac273412a7172c8ade6f361b407e2e4ed02",
175175
"web_socket_channel_rev": "eba15419e51836a67fee18d1b7fd1b875d890bc3",
176176
"WebCore_rev": "bcb10901266c884e7b3740abc597ab95373ab55c",
177-
"webdev_rev": "069b87091b0cd25ae1a5e5927cdf6a475fda5bf7",
177+
"webdev_rev": "47c1c3317da20dc2cfb542aeafcd04a0f1f381f1",
178178
"webdriver_rev": "c28cf51fcd0bd306a11fa7d10743b8fe7434ea71",
179179
"webkit_inspection_protocol_rev": "b825c8f6a12200d619729903207ac826cce278da",
180180
"yaml_edit_rev": "01589b3ce447b03aed991db49f1ec6445ad5476d",

pkg/analysis_server_client/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# 2.0.1
2+
3+
* Updated the readme to reflect that this package is discontinued; see
4+
https://github.com/dart-lang/sdk/issues/50262 for details.
5+
16
# 2.0.0
27

38
* Migrated to null safety.

pkg/analysis_server_client/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,23 @@
33

44
`package:analysis_server_client` is a client wrapper over the Analysis Server.
55

6+
## Update: this package has been discontinued
7+
8+
This package has been discontinued and will not receive further updates.
9+
10+
People who need similar functionality could:
11+
12+
- continue to use the last published version; it should continue to be able to
13+
talk to the analysis server for the foreseeable future
14+
- fork the package and maintain that fork (we don't expect that the analysis
15+
server protocol will evolve significantly)
16+
- see if their use case could instead be satisfied by talking to the analysis
17+
server over the LSP protocol (`dart language-server --protocol=lsp`)
18+
19+
We welcome feedback about this at
20+
[#50262](https://github.com/dart-lang/sdk/issues/50262); that would also be a
21+
good place to discuss alternatives.
22+
623
## Overview
724

825
* Instances of [__Server__](lib/server.dart) manage a connection to an analysis server process,

pkg/analysis_server_client/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: analysis_server_client
2-
version: 2.0.0
2+
version: 2.0.1
33
description:
44
A client wrapper over analysis_server. Instances of the class Server manage a
55
connection to a server process, and facilitate communication to and from the

pkg/compiler/lib/src/inferrer/closure_tracer.dart

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,6 @@ class ClosureTracerVisitor extends TracerVisitor {
107107
}
108108
}
109109

110-
bool _checkIfCurrentUser(MemberEntity element) =>
111-
inferrer.types.getInferredTypeOfMember(element) == currentUser;
112-
113110
bool _checkIfFunctionApply(MemberEntity element) {
114111
return inferrer.closedWorld.commonElements.isFunctionApplyMethod(element);
115112
}
@@ -118,17 +115,23 @@ class ClosureTracerVisitor extends TracerVisitor {
118115
visitDynamicCallSiteTypeInformation(DynamicCallSiteTypeInformation info) {
119116
super.visitDynamicCallSiteTypeInformation(info);
120117
final selector = info.selector!;
118+
final user = currentUser;
121119
if (selector.isCall) {
122-
if (info.arguments!.contains(currentUser)) {
120+
if (info.arguments!.contains(user)) {
123121
if (info.hasClosureCallTargets ||
124122
info.concreteTargets.any((element) => !element.isFunction)) {
125123
bailout('Passed to a closure');
126124
}
127125
if (info.concreteTargets.any(_checkIfFunctionApply)) {
128126
_tagAsFunctionApplyTarget("dynamic call");
129127
}
130-
} else if (info.concreteTargets.any(_checkIfCurrentUser)) {
131-
_registerCallForLaterAnalysis(info);
128+
} else {
129+
if (user is MemberTypeInformation) {
130+
final currentUserMember = user.member;
131+
if (info.concreteTargets.contains(currentUserMember)) {
132+
_registerCallForLaterAnalysis(info);
133+
}
134+
}
132135
}
133136
} else if (selector.isGetter && selector.memberName == Names.call) {
134137
// We are potentially tearing off ourself here

pkg/compiler/lib/src/inferrer/engine.dart

Lines changed: 84 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -316,95 +316,98 @@ class InferrerEngine {
316316
_buildWorkQueue();
317317
metrics.refine1.measure(_refine);
318318

319-
// Try to infer element types of lists and compute their escape information.
320-
types.allocatedLists.values.forEach((ListTypeInformation info) {
321-
analyzeListAndEnqueue(info);
322-
});
323-
324-
// Try to infer element types of sets and compute their escape information.
325-
types.allocatedSets.values.forEach((SetTypeInformation info) {
326-
analyzeSetAndEnqueue(info);
327-
});
319+
metrics.trace.measure(() {
320+
// Try to infer element types of lists and compute their escape information.
321+
types.allocatedLists.values.forEach((ListTypeInformation info) {
322+
analyzeListAndEnqueue(info);
323+
});
328324

329-
// Try to infer the key and value types for maps and compute the values'
330-
// escape information.
331-
types.allocatedMaps.values.forEach((MapTypeInformation info) {
332-
analyzeMapAndEnqueue(info);
333-
});
325+
// Try to infer element types of sets and compute their escape information.
326+
types.allocatedSets.values.forEach((SetTypeInformation info) {
327+
analyzeSetAndEnqueue(info);
328+
});
334329

335-
Set<FunctionEntity> bailedOutOn = Set<FunctionEntity>();
330+
// Try to infer the key and value types for maps and compute the values'
331+
// escape information.
332+
types.allocatedMaps.values.forEach((MapTypeInformation info) {
333+
analyzeMapAndEnqueue(info);
334+
});
336335

337-
// Trace closures to potentially infer argument types.
338-
types.allocatedClosures.forEach((dynamic info) {
339-
void trace(
340-
Iterable<FunctionEntity> elements, ClosureTracerVisitor tracer) {
341-
tracer.run();
342-
if (!tracer.continueAnalyzing) {
343-
elements.forEach((FunctionEntity element) {
344-
inferredDataBuilder.registerMightBePassedToApply(element);
345-
if (debug.VERBOSE) {
346-
print("traced closure $element as ${true} (bail)");
347-
}
336+
Set<FunctionEntity> bailedOutOn = Set<FunctionEntity>();
337+
338+
// Trace closures to potentially infer argument types.
339+
types.allocatedClosures.forEach((dynamic info) {
340+
void trace(
341+
Iterable<FunctionEntity> elements, ClosureTracerVisitor tracer) {
342+
tracer.run();
343+
if (!tracer.continueAnalyzing) {
344+
elements.forEach((FunctionEntity element) {
345+
inferredDataBuilder.registerMightBePassedToApply(element);
346+
if (debug.VERBOSE) {
347+
print("traced closure $element as ${true} (bail)");
348+
}
349+
types.strategy.forEachParameter(element, (Local parameter) {
350+
types
351+
.getInferredTypeOfParameter(parameter)
352+
.giveUp(this, clearInputs: false);
353+
});
354+
});
355+
bailedOutOn.addAll(elements);
356+
return;
357+
}
358+
elements
359+
.where((e) => !bailedOutOn.contains(e))
360+
.forEach((FunctionEntity element) {
348361
types.strategy.forEachParameter(element, (Local parameter) {
349-
types
350-
.getInferredTypeOfParameter(parameter)
351-
.giveUp(this, clearInputs: false);
362+
ParameterTypeInformation info =
363+
types.getInferredTypeOfParameter(parameter);
364+
info.maybeResume();
365+
_workQueue.add(info);
352366
});
367+
if (tracer.tracedType.mightBePassedToFunctionApply) {
368+
inferredDataBuilder.registerMightBePassedToApply(element);
369+
}
370+
if (debug.VERBOSE) {
371+
print("traced closure $element as "
372+
"${inferredDataBuilder.getCurrentlyKnownMightBePassedToApply(element)}");
373+
}
353374
});
354-
bailedOutOn.addAll(elements);
355-
return;
356375
}
357-
elements
358-
.where((e) => !bailedOutOn.contains(e))
359-
.forEach((FunctionEntity element) {
360-
types.strategy.forEachParameter(element, (Local parameter) {
361-
ParameterTypeInformation info =
362-
types.getInferredTypeOfParameter(parameter);
363-
info.maybeResume();
364-
_workQueue.add(info);
365-
});
366-
if (tracer.tracedType.mightBePassedToFunctionApply) {
367-
inferredDataBuilder.registerMightBePassedToApply(element);
368-
}
369-
if (debug.VERBOSE) {
370-
print("traced closure $element as "
371-
"${inferredDataBuilder.getCurrentlyKnownMightBePassedToApply(element)}");
372-
}
373-
});
374-
}
375376

376-
if (info is ClosureTypeInformation) {
377-
Iterable<FunctionEntity> elements = [info.closure];
378-
trace(elements, ClosureTracerVisitor(elements, info, this));
379-
} else if (info is CallSiteTypeInformation) {
380-
final selector = info.selector;
381-
if (info is StaticCallSiteTypeInformation &&
382-
selector != null &&
383-
selector.isCall) {
384-
// This is a constructor call to a class with a call method. So we
385-
// need to trace the call method here.
386-
final calledElement = info.calledElement;
387-
assert(calledElement is ConstructorEntity &&
388-
calledElement.isGenerativeConstructor);
389-
final cls = calledElement.enclosingClass!;
390-
final callMethod = _lookupCallMethod(cls)!;
391-
Iterable<FunctionEntity> elements = [callMethod];
392-
trace(elements, ClosureTracerVisitor(elements, info, this));
393-
} else {
394-
// We only are interested in functions here, as other targets
395-
// of this closure call are not a root to trace but an intermediate
396-
// for some other function.
397-
Iterable<FunctionEntity> elements = List<FunctionEntity>.from(
398-
info.callees.where((e) => e.isFunction));
377+
if (info is ClosureTypeInformation) {
378+
Iterable<FunctionEntity> elements = [info.closure];
399379
trace(elements, ClosureTracerVisitor(elements, info, this));
380+
} else if (info is CallSiteTypeInformation) {
381+
final selector = info.selector;
382+
if (info is StaticCallSiteTypeInformation &&
383+
selector != null &&
384+
selector.isCall) {
385+
// This is a constructor call to a class with a call method. So we
386+
// need to trace the call method here.
387+
final calledElement = info.calledElement;
388+
assert(calledElement is ConstructorEntity &&
389+
calledElement.isGenerativeConstructor);
390+
final cls = calledElement.enclosingClass!;
391+
final callMethod = _lookupCallMethod(cls)!;
392+
Iterable<FunctionEntity> elements = [callMethod];
393+
trace(elements, ClosureTracerVisitor(elements, info, this));
394+
} else {
395+
// We only are interested in functions here, as other targets
396+
// of this closure call are not a root to trace but an intermediate
397+
// for some other function.
398+
Iterable<FunctionEntity> elements = List<FunctionEntity>.from(
399+
info.callees.where((e) => e.isFunction));
400+
trace(elements, ClosureTracerVisitor(elements, info, this));
401+
}
402+
} else if (info is MemberTypeInformation) {
403+
final member = info.member as FunctionEntity;
404+
trace(
405+
[member], StaticTearOffClosureTracerVisitor(member, info, this));
406+
} else if (info is ParameterTypeInformation) {
407+
failedAt(NO_LOCATION_SPANNABLE,
408+
'Unexpected closure allocation info $info');
400409
}
401-
} else if (info is MemberTypeInformation) {
402-
final member = info.member as FunctionEntity;
403-
trace([member], StaticTearOffClosureTracerVisitor(member, info, this));
404-
} else if (info is ParameterTypeInformation) {
405-
failedAt(
406-
NO_LOCATION_SPANNABLE, 'Unexpected closure allocation info $info');
407-
}
410+
});
408411
});
409412

410413
dump?.beforeTracing();
@@ -1137,6 +1140,7 @@ class _InferrerEngineMetrics extends MetricsBase {
11371140
final time = DurationMetric('time');
11381141
final analyze = DurationMetric('time.analyze');
11391142
final refine1 = DurationMetric('time.refine1');
1143+
final trace = DurationMetric('time.trace');
11401144
final refine2 = DurationMetric('time.refine2');
11411145
final elementsInGraph = CountMetric('count.elementsInGraph');
11421146
final allTypesCount = CountMetric('count.allTypes');
@@ -1148,6 +1152,7 @@ class _InferrerEngineMetrics extends MetricsBase {
11481152
secondary = [
11491153
analyze,
11501154
refine1,
1155+
trace,
11511156
refine2,
11521157
elementsInGraph,
11531158
allTypesCount,

pkg/compiler/lib/src/inferrer/node_tracer.dart

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -473,12 +473,11 @@ abstract class TracerVisitor implements TypeInformationVisitor {
473473
bailout('Passed to noSuchMethod');
474474
}
475475

476-
Iterable<TypeInformation> inferredTargetTypes =
477-
info.concreteTargets.map((MemberEntity entity) {
478-
return inferrer.types.getInferredTypeOfMember(entity);
479-
});
480-
if (inferredTargetTypes.any((user) => user == currentUser)) {
481-
addNewEscapeInformation(info);
476+
final user = currentUser;
477+
if (user is MemberTypeInformation) {
478+
if (info.concreteTargets.contains(user.member)) {
479+
addNewEscapeInformation(info);
480+
}
482481
}
483482
}
484483

pkg/compiler/lib/src/inferrer_experimental/closure_tracer.dart

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,6 @@ class ClosureTracerVisitor extends TracerVisitor {
107107
}
108108
}
109109

110-
bool _checkIfCurrentUser(MemberEntity element) =>
111-
inferrer.types.getInferredTypeOfMember(element) == currentUser;
112-
113110
bool _checkIfFunctionApply(MemberEntity element) {
114111
return inferrer.closedWorld.commonElements.isFunctionApplyMethod(element);
115112
}
@@ -118,17 +115,23 @@ class ClosureTracerVisitor extends TracerVisitor {
118115
visitDynamicCallSiteTypeInformation(DynamicCallSiteTypeInformation info) {
119116
super.visitDynamicCallSiteTypeInformation(info);
120117
final selector = info.selector!;
118+
final user = currentUser;
121119
if (selector.isCall) {
122-
if (info.arguments!.contains(currentUser)) {
120+
if (info.arguments!.contains(user)) {
123121
if (info.hasClosureCallTargets ||
124122
info.concreteTargets.any((element) => !element.isFunction)) {
125123
bailout('Passed to a closure');
126124
}
127125
if (info.concreteTargets.any(_checkIfFunctionApply)) {
128126
_tagAsFunctionApplyTarget("dynamic call");
129127
}
130-
} else if (info.concreteTargets.any(_checkIfCurrentUser)) {
131-
_registerCallForLaterAnalysis(info);
128+
} else {
129+
if (user is MemberTypeInformation) {
130+
final currentUserMember = user.member;
131+
if (info.concreteTargets.contains(currentUserMember)) {
132+
_registerCallForLaterAnalysis(info);
133+
}
134+
}
132135
}
133136
} else if (selector.isGetter && selector.memberName == Names.call) {
134137
// We are potentially tearing off ourself here

0 commit comments

Comments
 (0)