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

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

Issue 1589573003: Include the export namespace in the prelinked summary. (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/lib/src/summary/public_namespace_computer.dart
diff --git a/pkg/analyzer/lib/src/summary/public_namespace_computer.dart b/pkg/analyzer/lib/src/summary/public_namespace_computer.dart
index e8751b0433b7912766867c3bdbb9f162f2231cf6..a0a474f2cb879f4689b8f16a1259d55e7996ab4b 100644
--- a/pkg/analyzer/lib/src/summary/public_namespace_computer.dart
+++ b/pkg/analyzer/lib/src/summary/public_namespace_computer.dart
@@ -85,7 +85,11 @@ class _PublicNamespaceVisitor extends RecursiveAstVisitor {
if (node.isSetter) {
name += '=';
}
- addNameIfPublic(name, PrelinkedReferenceKind.other,
+ addNameIfPublic(
+ name,
+ node.isGetter || node.isSetter
+ ? PrelinkedReferenceKind.topLevelPropertyAccessor
+ : PrelinkedReferenceKind.topLevelFunction,
node.functionExpression.typeParameters?.typeParameters?.length ?? 0);
}
@@ -103,9 +107,10 @@ class _PublicNamespaceVisitor extends RecursiveAstVisitor {
@override
visitVariableDeclaration(VariableDeclaration node) {
String name = node.name.name;
- addNameIfPublic(name, PrelinkedReferenceKind.other, 0);
+ addNameIfPublic(name, PrelinkedReferenceKind.topLevelPropertyAccessor, 0);
if (!node.isFinal && !node.isConst) {
- addNameIfPublic('$name=', PrelinkedReferenceKind.other, 0);
+ addNameIfPublic(
+ '$name=', PrelinkedReferenceKind.topLevelPropertyAccessor, 0);
}
}
}

Powered by Google App Engine
This is Rietveld 408576698