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

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

Issue 1944733002: Support references to static getters in the summary linker. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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/summarize_elements.dart
diff --git a/pkg/analyzer/lib/src/summary/summarize_elements.dart b/pkg/analyzer/lib/src/summary/summarize_elements.dart
index e0e5c952c918df0e39c891d1675eedb7165a84ff..b8828ecb3051aec04325fb32c5ea22e934149293 100644
--- a/pkg/analyzer/lib/src/summary/summarize_elements.dart
+++ b/pkg/analyzer/lib/src/summary/summarize_elements.dart
@@ -609,6 +609,7 @@ class _CompilationUnitSerializer {
List<UnlinkedPublicNameBuilder> bs = <UnlinkedPublicNameBuilder>[];
for (FieldElement field in cls.fields) {
if (field.isStatic && field.isConst && field.isPublic) {
+ // TODO(paulberry): include non-consts
// TODO(paulberry): should numTypeParameters include class params?
bs.add(new UnlinkedPublicNameBuilder(
name: field.name,
@@ -625,6 +626,17 @@ class _CompilationUnitSerializer {
numTypeParameters: method.typeParameters.length));
}
}
+ for (PropertyAccessorElement accessor in cls.accessors) {
+ if (accessor.isStatic &&
+ accessor.isGetter &&
+ accessor.isPublic &&
+ !accessor.isSynthetic) {
+ // TODO(paulberry): combine with field code above.
+ // TODO(paulberry): should numTypeParameters include class params?
+ bs.add(new UnlinkedPublicNameBuilder(
+ name: accessor.name, kind: ReferenceKind.propertyAccessor));
+ }
+ }
for (ConstructorElement constructor in cls.constructors) {
if (constructor.isPublic && constructor.name.isNotEmpty) {
// TODO(paulberry): should numTypeParameters include class params?
« no previous file with comments | « pkg/analyzer/lib/src/summary/public_namespace_computer.dart ('k') | pkg/analyzer/test/src/summary/resynthesize_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698