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

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

Issue 2961313002: Always store GlobalTypeInferenceElementData on the member context (Closed)
Patch Set: Updated cf. comments. Created 3 years, 6 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/inferrer/builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 799d442050ced4f27fc3b7bb800cb4ec7c0cb1f2..b7cc4ad6e7461aac2c371bd0591e6b26c56235f0 100644
--- a/pkg/compiler/lib/src/dump_info.dart
+++ b/pkg/compiler/lib/src/dump_info.dart
@@ -125,10 +125,6 @@ class ElementInfoCollector extends BaseElementVisitor<Info, dynamic> {
_resultOfParameter(ParameterElement e) =>
compiler.globalInference.results.resultOfParameter(e);
- @deprecated
- _resultOfElement(AstElement e) =>
- compiler.globalInference.results.resultOfElement(e);
-
FieldInfo visitFieldElement(FieldElement element, _) {
TypeMask inferredType = _resultOfMember(element).type;
// If a field has an empty inferred type it is never used.
@@ -274,7 +270,14 @@ class ElementInfoCollector extends BaseElementVisitor<Info, dynamic> {
returnType = '${element.type.returnType}';
}
- String inferredReturnType = '${_resultOfElement(element).returnType}';
+ MethodElement method;
+ if (element is LocalFunctionElement) {
+ method = element.callMethod;
+ } else {
+ method = element;
+ }
+
+ String inferredReturnType = '${_resultOfMember(method).returnType}';
String sideEffects = '${closedWorld.getSideEffectsOfElement(element)}';
int inlinedCount = compiler.dumpInfoTask.inlineCount[element];
« no previous file with comments | « no previous file | pkg/compiler/lib/src/inferrer/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698