| 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 dc673e69a137b06d102bde2f151a5a8e2c2d067f..8dc8e78e33e17b3745cc76ae9cee4907cd63fd8c 100644
|
| --- a/pkg/analyzer/lib/src/summary/resynthesize.dart
|
| +++ b/pkg/analyzer/lib/src/summary/resynthesize.dart
|
| @@ -1483,6 +1483,11 @@ class _ResynthesizerContext implements ResynthesizerContext {
|
| }
|
|
|
| @override
|
| + bool isInConstCycle(int slot) {
|
| + return _unitResynthesizer.constCycles.contains(slot);
|
| + }
|
| +
|
| + @override
|
| ConstructorElement resolveConstructorRef(
|
| TypeParameterizedElementMixin typeParameterContext, EntityRef entry) {
|
| return _unitResynthesizer._getConstructorForEntry(
|
| @@ -1701,36 +1706,20 @@ class _UnitResynthesizer {
|
| for (UnlinkedVariable serializedVariable in serializedClass.fields) {
|
| buildField(classElement, serializedVariable, memberHolder);
|
| }
|
| - bool constructorFound = false;
|
| for (UnlinkedExecutable serializedExecutable
|
| in serializedClass.executables) {
|
| switch (serializedExecutable.kind) {
|
| - case UnlinkedExecutableKind.constructor:
|
| - constructorFound = true;
|
| - buildConstructor(serializedExecutable, classElement, memberHolder);
|
| - break;
|
| case UnlinkedExecutableKind.getter:
|
| case UnlinkedExecutableKind.setter:
|
| buildClassExecutable(
|
| serializedExecutable, classElement, memberHolder);
|
| break;
|
| + case UnlinkedExecutableKind.constructor:
|
| case UnlinkedExecutableKind.functionOrMethod:
|
| // Resynthesized lazily.
|
| break;
|
| }
|
| }
|
| - if (!serializedClass.isMixinApplication) {
|
| - if (!constructorFound) {
|
| - // Synthesize implicit constructors.
|
| - ConstructorElementImpl constructor = new ConstructorElementImpl('', -1);
|
| - constructor.synthetic = true;
|
| - constructor.returnType = classElement.type;
|
| - constructor.type = new FunctionTypeImpl.elementWithNameAndArgs(
|
| - constructor, null, classElement.type.typeArguments, false);
|
| - memberHolder.addConstructor(constructor);
|
| - }
|
| - classElement.constructors = memberHolder.constructors;
|
| - }
|
| classElement.accessors = memberHolder.accessors;
|
| classElement.fields = memberHolder.fields;
|
| }
|
| @@ -1759,20 +1748,6 @@ class _UnitResynthesizer {
|
| }
|
|
|
| /**
|
| - * Resynthesize a [ConstructorElement] and place it in the given [holder].
|
| - * [classElement] is the element of the class for which this element is a
|
| - * constructor.
|
| - */
|
| - void buildConstructor(UnlinkedExecutable serializedExecutable,
|
| - ClassElementImpl classElement, ElementHolder holder) {
|
| - assert(serializedExecutable.kind == UnlinkedExecutableKind.constructor);
|
| - ConstructorElementImpl constructor =
|
| - new ConstructorElementImpl.forSerialized(
|
| - serializedExecutable, constCycles, classElement);
|
| - holder.addConstructor(constructor);
|
| - }
|
| -
|
| - /**
|
| * Build the documentation for the given [element]. Does nothing if
|
| * [serializedDocumentationComment] is `null`.
|
| */
|
|
|