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

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

Issue 1687963003: Refactor one more use of serializeUnlinkedReference (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 | 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/summarize_elements.dart
diff --git a/pkg/analyzer/lib/src/summary/summarize_elements.dart b/pkg/analyzer/lib/src/summary/summarize_elements.dart
index 355397ab8fe3b91270335fcc1de3b501c8ca498e..d2a5c20c77beeec4922b6eca08790206d83edb20 100644
--- a/pkg/analyzer/lib/src/summary/summarize_elements.dart
+++ b/pkg/analyzer/lib/src/summary/summarize_elements.dart
@@ -553,11 +553,9 @@ class _CompilationUnitSerializer {
String name = redirectedConstructor.name;
int typeId = typeRef.reference;
LinkedReference typeLinkedRef = linkedReferences[typeId];
- unlinkedReferences.add(new UnlinkedReferenceBuilder(
- name: name, prefixReference: typeId));
- int refId = linkedReferences.length;
- linkedReferences.add(new LinkedReferenceBuilder(
- kind: ReferenceKind.constructor, unit: typeLinkedRef.unit));
+ int refId = serializeUnlinkedReference(
+ name, ReferenceKind.constructor,
+ unit: typeLinkedRef.unit, prefixReference: typeId);
b.redirectedConstructor = new EntityRefBuilder(
reference: refId, typeArguments: typeRef.typeArguments);
} else {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698