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

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

Issue 1762663002: Add support for ConstructorElementImpl.isCycleFree to summaries. (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 | « pkg/analyzer/lib/src/summary/idl.dart ('k') | pkg/analyzer/lib/src/summary/summarize_ast.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 214861a7a3821c53366f1d77111ad5f2bcc357c2..2d1cc2eb38959fb0e4429c04616c737c3e785701 100644
--- a/pkg/analyzer/lib/src/summary/resynthesize.dart
+++ b/pkg/analyzer/lib/src/summary/resynthesize.dart
@@ -845,6 +845,12 @@ class _LibraryResynthesizer {
Map<int, EntityRef> linkedTypeMap;
/**
+ * Set of slot ids corresponding to const constructors that are part of
+ * cycles.
+ */
+ Set<int> constCycles;
+
+ /**
* The [CompilationUnitElementImpl] for the compilation unit currently being
* resynthesized.
*/
@@ -1076,6 +1082,8 @@ class _LibraryResynthesizer {
assert(serializedExecutable.kind == UnlinkedExecutableKind.constructor);
currentConstructor = new ConstructorElementImpl(
serializedExecutable.name, serializedExecutable.nameOffset);
+ currentConstructor.isCycleFree = serializedExecutable.isConst &&
+ !constCycles.contains(serializedExecutable.constCycleSlot);
if (serializedExecutable.name.isEmpty) {
currentConstructor.nameEnd =
serializedExecutable.nameOffset + classType.name.length;
@@ -1961,6 +1969,7 @@ class _LibraryResynthesizer {
linkedUnit = null;
unlinkedUnit = null;
linkedTypeMap = null;
+ constCycles = null;
referenceInfos = null;
currentCompilationUnit = null;
}
@@ -2211,6 +2220,7 @@ class _LibraryResynthesizer {
for (EntityRef t in linkedUnit.types) {
linkedTypeMap[t.slot] = t;
}
+ constCycles = linkedUnit.constCycles.toSet();
populateReferenceInfos();
unitHolder = new ElementHolder();
}
« no previous file with comments | « pkg/analyzer/lib/src/summary/idl.dart ('k') | pkg/analyzer/lib/src/summary/summarize_ast.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698