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

Unified Diff: pkg/analyzer/lib/src/summary/resynthesize.dart

Issue 2007323006: Resynthesize return types lazily. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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 | « pkg/analyzer/lib/src/dart/element/element.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/summary/resynthesize.dart
diff --git a/pkg/analyzer/lib/src/summary/resynthesize.dart b/pkg/analyzer/lib/src/summary/resynthesize.dart
index 1630e4d2c808532a542a86173de4c07594768a9e..cabcfb2fc527a431891904319a9f5a1461ba9084 100644
--- a/pkg/analyzer/lib/src/summary/resynthesize.dart
+++ b/pkg/analyzer/lib/src/summary/resynthesize.dart
@@ -1879,7 +1879,6 @@ class _UnitResynthesizer {
currentConstructor.periodOffset = serializedExecutable.periodOffset;
}
constructors[serializedExecutable.name] = currentConstructor;
- currentConstructor.returnType = classElement.type;
buildExecutableCommonParts(currentConstructor, serializedExecutable);
currentConstructor.constantInitializers = serializedExecutable
.constantInitializers
@@ -2107,17 +2106,6 @@ class _UnitResynthesizer {
executableElement.parameters = parameters;
}
}
- if (serializedExecutable.kind == UnlinkedExecutableKind.constructor) {
- // Caller handles setting the return type.
- assert(serializedExecutable.returnType == null);
- } else {
- bool isSetter =
- serializedExecutable.kind == UnlinkedExecutableKind.setter;
- executableElement.returnType = buildLinkedType(
- serializedExecutable.inferredReturnTypeSlot, executableElement) ??
- buildType(serializedExecutable.returnType, executableElement,
- defaultVoid: isSetter && summaryResynthesizer.strongMode);
- }
executableElement.type = new FunctionTypeImpl.elementWithNameAndArgs(
executableElement, null, getCurrentTypeArguments(skipLevels: 1), false);
{
@@ -2467,8 +2455,6 @@ class _UnitResynthesizer {
functionTypeAliasElement.parameters = serializedTypedef.parameters
.map((p) => buildParameter(p, functionTypeAliasElement))
.toList();
- functionTypeAliasElement.returnType =
- buildType(serializedTypedef.returnType, functionTypeAliasElement);
functionTypeAliasElement.type =
new FunctionTypeImpl.forTypedef(functionTypeAliasElement);
unitHolder.addTypeAlias(functionTypeAliasElement);
« no previous file with comments | « pkg/analyzer/lib/src/dart/element/element.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698