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

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

Issue 2667693002: Serialize prefixes directly, without intermediate map. (Closed)
Patch Set: Created 3 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
« 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_ast.dart
diff --git a/pkg/analyzer/lib/src/summary/summarize_ast.dart b/pkg/analyzer/lib/src/summary/summarize_ast.dart
index 35b50295abd693927e915d9805233d5cd340fd50..f423cbf9291096e2e32d6a6ef16179f0fe893812 100644
--- a/pkg/analyzer/lib/src/summary/summarize_ast.dart
+++ b/pkg/analyzer/lib/src/summary/summarize_ast.dart
@@ -266,11 +266,6 @@ class _SummarizeAstVisitor extends RecursiveAstVisitor {
final List<UnlinkedReferenceBuilder> unlinkedReferences =
<UnlinkedReferenceBuilder>[new UnlinkedReferenceBuilder()];
- /**
- * Map associating names used as prefixes in this compilation unit with their
- * associated indices into [UnlinkedUnit.references].
- */
- final Map<String, int> prefixIndices = <String, int>{};
/**
* List of [_Scope]s currently in effect. This is used to resolve type names
@@ -913,8 +908,7 @@ class _SummarizeAstVisitor extends RecursiveAstVisitor {
}
b.reference = serializeReference(null, name);
} else if (identifier is PrefixedIdentifier) {
- int prefixIndex = prefixIndices.putIfAbsent(identifier.prefix.name,
- () => serializeSimpleReference(identifier.prefix.name));
+ int prefixIndex = serializeSimpleReference(identifier.prefix.name);
b.reference =
serializeReference(prefixIndex, identifier.identifier.name);
} 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