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

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

Issue 1707073002: Serialize and resynthesize variable initializers. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fixes for review comments. Created 4 years, 10 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/summary/idl.dart ('k') | pkg/analyzer/lib/src/summary/summarize_ast.dart » ('j') | 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 de642322dd8a2635d85fe92cae590127bb5b6858..7929548678e3444db9ee3160f6740e156208dc87 100644
--- a/pkg/analyzer/lib/src/summary/resynthesize.dart
+++ b/pkg/analyzer/lib/src/summary/resynthesize.dart
@@ -1215,6 +1215,7 @@ class _LibraryResynthesizer {
return new PropertyAccessorElementHandle(
summaryResynthesizer, location);
case ReferenceKind.constructor:
+ case ReferenceKind.function:
case ReferenceKind.propertyAccessor:
case ReferenceKind.method:
case ReferenceKind.length:
@@ -1562,6 +1563,10 @@ class _LibraryResynthesizer {
}
parameterElement.hasImplicitType = serializedParameter.type == null;
}
+ if (serializedParameter.initializer != null) {
+ parameterElement.initializer =
+ buildLocalFunction(serializedParameter.initializer);
+ }
switch (serializedParameter.kind) {
case UnlinkedParamKind.named:
parameterElement.parameterKind = ParameterKind.NAMED;
@@ -1745,6 +1750,9 @@ class _LibraryResynthesizer {
element.const3 = serializedVariable.isConst;
element.final2 = serializedVariable.isFinal;
element.hasImplicitType = serializedVariable.type == null;
+ if (serializedVariable.initializer != null) {
+ element.initializer = buildLocalFunction(serializedVariable.initializer);
+ }
buildDocumentation(element, serializedVariable.documentationComment);
buildAnnotations(element, serializedVariable.annotations);
}
@@ -1926,6 +1934,7 @@ class _LibraryResynthesizer {
element = new FunctionTypeAliasElementHandle(
summaryResynthesizer, location);
break;
+ case ReferenceKind.function:
case ReferenceKind.prefix:
case ReferenceKind.unresolved:
break;
« no previous file with comments | « pkg/analyzer/lib/src/summary/idl.dart ('k') | pkg/analyzer/lib/src/summary/summarize_ast.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698