Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(946)

Unified Diff: pkg/compiler/lib/src/dump_info.dart

Issue 2860733002: Remove ClosedWorld.allFunctions (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/compiler/lib/src/dump_info.dart
diff --git a/pkg/compiler/lib/src/dump_info.dart b/pkg/compiler/lib/src/dump_info.dart
index 67696cda0a740ba04ec207c83b086f9d48883995..4171c2614c338cdeb23c8bd9f4ea9f5393ae27ff 100644
--- a/pkg/compiler/lib/src/dump_info.dart
+++ b/pkg/compiler/lib/src/dump_info.dart
@@ -262,6 +262,7 @@ class ElementInfoCollector extends BaseElementVisitor<Info, dynamic> {
isExternal: element.isPatched);
String code = compiler.dumpInfoTask.codeOf(element);
+ String returnType = null;
List<ParameterInfo> parameters = <ParameterInfo>[];
if (element.hasFunctionSignature) {
FunctionSignature signature = element.functionSignature;
@@ -269,15 +270,9 @@ class ElementInfoCollector extends BaseElementVisitor<Info, dynamic> {
parameters.add(new ParameterInfo(parameter.name,
'${_resultOfParameter(parameter).type}', '${parameter.node.type}'));
});
- }
-
- String returnType = null;
- // TODO(sigmund): why all these checks?
- if (element.isInstanceMember &&
- !element.isAbstract &&
- closedWorld.allFunctions.contains(element as MemberElement)) {
returnType = '${element.type.returnType}';
}
Johnni Winther 2017/05/03 13:54:51 This seemed to be an attempt at only pulling the r
+
String inferredReturnType = '${_resultOfElement(element).returnType}';
String sideEffects = '${closedWorld.getSideEffectsOfElement(element)}';
@@ -461,8 +456,8 @@ class DumpInfoTask extends CompilerTask implements InfoReporter {
element,
impact,
new WorldImpactVisitorImpl(visitDynamicUse: (dynamicUse) {
- selections.addAll(closedWorld.allFunctions
- .filter(dynamicUse.selector, dynamicUse.mask)
+ selections.addAll(closedWorld
+ .locateMembers(dynamicUse.selector, dynamicUse.mask)
.map((MemberElement e) => new Selection(e, dynamicUse.mask)));
}, visitStaticUse: (staticUse) {
selections.add(new Selection(staticUse.element, null));
« no previous file with comments | « no previous file | pkg/compiler/lib/src/inferrer/builder.dart » ('j') | pkg/compiler/lib/src/universe/function_set.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698