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

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

Issue 1670403002: Resynthesize top-level function references. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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 | « no previous file | pkg/analyzer/test/src/summary/resynthesize_test.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 94f50cd7ab0f36fb614f4cdee57862eaacb97c4a..7075945a53e42d525b27c6102acdb6ed9c5c22e2 100644
--- a/pkg/analyzer/lib/src/summary/resynthesize.dart
+++ b/pkg/analyzer/lib/src/summary/resynthesize.dart
@@ -1602,36 +1602,38 @@ class _LibraryResynthesizer {
case ReferenceKind.classOrEnum:
element = new ClassElementHandle(summaryResynthesizer, location);
break;
- case ReferenceKind.typedef:
- element = new FunctionTypeAliasElementHandle(
- summaryResynthesizer, location);
- break;
- case ReferenceKind.topLevelPropertyAccessor:
- element = new PropertyAccessorElementHandle(
- summaryResynthesizer, location);
- break;
case ReferenceKind.constructor:
assert(location.components.length == 4);
element =
new ConstructorElementHandle(summaryResynthesizer, location);
numTypeParameters = enclosingInfo.numTypeParameters;
break;
+ case ReferenceKind.length:
+ element = _buildStringLengthPropertyAccessorElement();
+ break;
+ case ReferenceKind.method:
+ assert(location.components.length == 4);
+ element = new MethodElementHandle(summaryResynthesizer, location);
+ break;
case ReferenceKind.propertyAccessor:
assert(location.components.length == 4);
element = new PropertyAccessorElementHandle(
summaryResynthesizer, location);
break;
- case ReferenceKind.method:
- assert(location.components.length == 4);
- element = new MethodElementHandle(summaryResynthesizer, location);
+ case ReferenceKind.topLevelFunction:
+ assert(location.components.length == 3);
+ element = new FunctionElementHandle(summaryResynthesizer, location);
break;
- case ReferenceKind.length:
- element = _buildStringLengthPropertyAccessorElement();
+ case ReferenceKind.topLevelPropertyAccessor:
+ element = new PropertyAccessorElementHandle(
+ summaryResynthesizer, location);
+ break;
+ case ReferenceKind.typedef:
+ element = new FunctionTypeAliasElementHandle(
+ summaryResynthesizer, location);
break;
- default:
- // This is an element that doesn't (yet) need to be referred to
- // directly, so don't bother populating an element for it.
- // TODO(paulberry): add support for more kinds, as needed.
+ case ReferenceKind.prefix:
+ case ReferenceKind.unresolved:
break;
}
}
« no previous file with comments | « no previous file | pkg/analyzer/test/src/summary/resynthesize_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698