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

Unified Diff: pkg/analyzer/tool/summary/idl.dart

Issue 1624853002: Store the result of type inference in summaries. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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/analyzer/tool/summary/idl.dart
diff --git a/pkg/analyzer/tool/summary/idl.dart b/pkg/analyzer/tool/summary/idl.dart
index 588c3b3d3fd2a0e93e4f230e17af17b7f347eb5f..e02b0541d9366d4cccee9369441a8553a4031c3a 100644
--- a/pkg/analyzer/tool/summary/idl.dart
+++ b/pkg/analyzer/tool/summary/idl.dart
@@ -919,6 +919,15 @@ class UnlinkedExecutable {
* Indicates whether the executable is declared using the `external` keyword.
*/
bool isExternal;
+
+ /**
+ * If this executable's return type is inferrable, nonzero slot id
+ * identifying which entry in [LinkedLibrary.types] contains the inferred
+ * return type. If there is no matching entry in [LinkedLibrary.types], then
+ * no return type was inferred for this variable, so its static type is
+ * `dynamic`.
+ */
+ int inferredReturnTypeSlot;
}
/**
@@ -1091,6 +1100,19 @@ class UnlinkedParam {
* declared using `this.` syntax).
*/
bool isInitializingFormal;
+
+ /**
+ * If this parameter's type is inferrable, nonzero slot id identifying which
+ * entry in [LinkedLibrary.types] contains the inferred type. If there is no
+ * matching entry in [LinkedLibrary.types], then no type was inferred for
+ * this variable, so its static type is `dynamic`.
+ *
+ * Note that although strong mode considers initializing formals to be
+ * inferrable, they are not marked as such in the summary; if their type is
+ * not specified, they always inherit the static type of the corresponding
+ * field.
+ */
+ int inferredTypeSlot;
}
/**
@@ -1421,4 +1443,12 @@ class UnlinkedVariable {
* Non-propagable variables have a [propagatedTypeSlot] of zero.
*/
int propagatedTypeSlot;
+
+ /**
+ * If this variable is inferrable, nonzero slot id identifying which entry in
+ * [LinkedLibrary.types] contains the inferred type for this variable. If
+ * there is no matching entry in [LinkedLibrary.types], then no type was
+ * inferred for this variable, so its static type is `dynamic`.
+ */
+ int inferredTypeSlot;
}

Powered by Google App Engine
This is Rietveld 408576698