| Index: pkg/analyzer/lib/src/summary/format.dart
|
| diff --git a/pkg/analyzer/lib/src/summary/format.dart b/pkg/analyzer/lib/src/summary/format.dart
|
| index 550787177ade55bafd1ab7b1063b1f641b024e3c..ebb3cf19a1d6199bcbb885d25e2ffd8d22b1e7c9 100644
|
| --- a/pkg/analyzer/lib/src/summary/format.dart
|
| +++ b/pkg/analyzer/lib/src/summary/format.dart
|
| @@ -3585,6 +3585,7 @@ class UnlinkedParamBuilder extends Object with _UnlinkedParamMixin implements id
|
| List<UnlinkedConstBuilder> _annotations;
|
| UnlinkedConstBuilder _defaultValue;
|
| int _inferredTypeSlot;
|
| + UnlinkedExecutableBuilder _initializer;
|
| bool _isFunctionTyped;
|
| bool _isInitializingFormal;
|
| idl.UnlinkedParamKind _kind;
|
| @@ -3640,6 +3641,18 @@ class UnlinkedParamBuilder extends Object with _UnlinkedParamMixin implements id
|
| }
|
|
|
| @override
|
| + UnlinkedExecutableBuilder get initializer => _initializer;
|
| +
|
| + /**
|
| + * The synthetic initializer function of the parameter. Absent if the variable
|
| + * does not have an initializer.
|
| + */
|
| + void set initializer(UnlinkedExecutableBuilder _value) {
|
| + assert(!_finished);
|
| + _initializer = _value;
|
| + }
|
| +
|
| + @override
|
| bool get isFunctionTyped => _isFunctionTyped ??= false;
|
|
|
| /**
|
| @@ -3744,10 +3757,11 @@ class UnlinkedParamBuilder extends Object with _UnlinkedParamMixin implements id
|
| _visibleOffset = _value;
|
| }
|
|
|
| - UnlinkedParamBuilder({List<UnlinkedConstBuilder> annotations, UnlinkedConstBuilder defaultValue, int inferredTypeSlot, bool isFunctionTyped, bool isInitializingFormal, idl.UnlinkedParamKind kind, String name, int nameOffset, List<UnlinkedParamBuilder> parameters, EntityRefBuilder type, int visibleLength, int visibleOffset})
|
| + UnlinkedParamBuilder({List<UnlinkedConstBuilder> annotations, UnlinkedConstBuilder defaultValue, int inferredTypeSlot, UnlinkedExecutableBuilder initializer, bool isFunctionTyped, bool isInitializingFormal, idl.UnlinkedParamKind kind, String name, int nameOffset, List<UnlinkedParamBuilder> parameters, EntityRefBuilder type, int visibleLength, int visibleOffset})
|
| : _annotations = annotations,
|
| _defaultValue = defaultValue,
|
| _inferredTypeSlot = inferredTypeSlot,
|
| + _initializer = initializer,
|
| _isFunctionTyped = isFunctionTyped,
|
| _isInitializingFormal = isInitializingFormal,
|
| _kind = kind,
|
| @@ -3763,6 +3777,7 @@ class UnlinkedParamBuilder extends Object with _UnlinkedParamMixin implements id
|
| _finished = true;
|
| fb.Offset offset_annotations;
|
| fb.Offset offset_defaultValue;
|
| + fb.Offset offset_initializer;
|
| fb.Offset offset_name;
|
| fb.Offset offset_parameters;
|
| fb.Offset offset_type;
|
| @@ -3772,6 +3787,9 @@ class UnlinkedParamBuilder extends Object with _UnlinkedParamMixin implements id
|
| if (_defaultValue != null) {
|
| offset_defaultValue = _defaultValue.finish(fbBuilder);
|
| }
|
| + if (_initializer != null) {
|
| + offset_initializer = _initializer.finish(fbBuilder);
|
| + }
|
| if (_name != null) {
|
| offset_name = fbBuilder.writeString(_name);
|
| }
|
| @@ -3783,7 +3801,7 @@ class UnlinkedParamBuilder extends Object with _UnlinkedParamMixin implements id
|
| }
|
| fbBuilder.startTable();
|
| if (offset_annotations != null) {
|
| - fbBuilder.addOffset(9, offset_annotations);
|
| + fbBuilder.addOffset(10, offset_annotations);
|
| }
|
| if (offset_defaultValue != null) {
|
| fbBuilder.addOffset(7, offset_defaultValue);
|
| @@ -3791,6 +3809,9 @@ class UnlinkedParamBuilder extends Object with _UnlinkedParamMixin implements id
|
| if (_inferredTypeSlot != null && _inferredTypeSlot != 0) {
|
| fbBuilder.addUint32(2, _inferredTypeSlot);
|
| }
|
| + if (offset_initializer != null) {
|
| + fbBuilder.addOffset(8, offset_initializer);
|
| + }
|
| if (_isFunctionTyped == true) {
|
| fbBuilder.addBool(5, true);
|
| }
|
| @@ -3807,16 +3828,16 @@ class UnlinkedParamBuilder extends Object with _UnlinkedParamMixin implements id
|
| fbBuilder.addUint32(1, _nameOffset);
|
| }
|
| if (offset_parameters != null) {
|
| - fbBuilder.addOffset(8, offset_parameters);
|
| + fbBuilder.addOffset(9, offset_parameters);
|
| }
|
| if (offset_type != null) {
|
| fbBuilder.addOffset(3, offset_type);
|
| }
|
| if (_visibleLength != null && _visibleLength != 0) {
|
| - fbBuilder.addUint32(10, _visibleLength);
|
| + fbBuilder.addUint32(11, _visibleLength);
|
| }
|
| if (_visibleOffset != null && _visibleOffset != 0) {
|
| - fbBuilder.addUint32(11, _visibleOffset);
|
| + fbBuilder.addUint32(12, _visibleOffset);
|
| }
|
| return fbBuilder.endTable();
|
| }
|
| @@ -3837,6 +3858,7 @@ class _UnlinkedParamImpl extends Object with _UnlinkedParamMixin implements idl.
|
| List<idl.UnlinkedConst> _annotations;
|
| idl.UnlinkedConst _defaultValue;
|
| int _inferredTypeSlot;
|
| + idl.UnlinkedExecutable _initializer;
|
| bool _isFunctionTyped;
|
| bool _isInitializingFormal;
|
| idl.UnlinkedParamKind _kind;
|
| @@ -3849,7 +3871,7 @@ class _UnlinkedParamImpl extends Object with _UnlinkedParamMixin implements idl.
|
|
|
| @override
|
| List<idl.UnlinkedConst> get annotations {
|
| - _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConstReader()).vTableGet(_bp, 9, const <idl.UnlinkedConst>[]);
|
| + _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConstReader()).vTableGet(_bp, 10, const <idl.UnlinkedConst>[]);
|
| return _annotations;
|
| }
|
|
|
| @@ -3866,6 +3888,12 @@ class _UnlinkedParamImpl extends Object with _UnlinkedParamMixin implements idl.
|
| }
|
|
|
| @override
|
| + idl.UnlinkedExecutable get initializer {
|
| + _initializer ??= const _UnlinkedExecutableReader().vTableGet(_bp, 8, null);
|
| + return _initializer;
|
| + }
|
| +
|
| + @override
|
| bool get isFunctionTyped {
|
| _isFunctionTyped ??= const fb.BoolReader().vTableGet(_bp, 5, false);
|
| return _isFunctionTyped;
|
| @@ -3897,7 +3925,7 @@ class _UnlinkedParamImpl extends Object with _UnlinkedParamMixin implements idl.
|
|
|
| @override
|
| List<idl.UnlinkedParam> get parameters {
|
| - _parameters ??= const fb.ListReader<idl.UnlinkedParam>(const _UnlinkedParamReader()).vTableGet(_bp, 8, const <idl.UnlinkedParam>[]);
|
| + _parameters ??= const fb.ListReader<idl.UnlinkedParam>(const _UnlinkedParamReader()).vTableGet(_bp, 9, const <idl.UnlinkedParam>[]);
|
| return _parameters;
|
| }
|
|
|
| @@ -3909,13 +3937,13 @@ class _UnlinkedParamImpl extends Object with _UnlinkedParamMixin implements idl.
|
|
|
| @override
|
| int get visibleLength {
|
| - _visibleLength ??= const fb.Uint32Reader().vTableGet(_bp, 10, 0);
|
| + _visibleLength ??= const fb.Uint32Reader().vTableGet(_bp, 11, 0);
|
| return _visibleLength;
|
| }
|
|
|
| @override
|
| int get visibleOffset {
|
| - _visibleOffset ??= const fb.Uint32Reader().vTableGet(_bp, 11, 0);
|
| + _visibleOffset ??= const fb.Uint32Reader().vTableGet(_bp, 12, 0);
|
| return _visibleOffset;
|
| }
|
| }
|
| @@ -3926,6 +3954,7 @@ abstract class _UnlinkedParamMixin implements idl.UnlinkedParam {
|
| "annotations": annotations,
|
| "defaultValue": defaultValue,
|
| "inferredTypeSlot": inferredTypeSlot,
|
| + "initializer": initializer,
|
| "isFunctionTyped": isFunctionTyped,
|
| "isInitializingFormal": isInitializingFormal,
|
| "kind": kind,
|
| @@ -5267,6 +5296,7 @@ class UnlinkedVariableBuilder extends Object with _UnlinkedVariableMixin impleme
|
| UnlinkedConstBuilder _constExpr;
|
| UnlinkedDocumentationCommentBuilder _documentationComment;
|
| int _inferredTypeSlot;
|
| + UnlinkedExecutableBuilder _initializer;
|
| bool _isConst;
|
| bool _isFinal;
|
| bool _isStatic;
|
| @@ -5329,6 +5359,18 @@ class UnlinkedVariableBuilder extends Object with _UnlinkedVariableMixin impleme
|
| }
|
|
|
| @override
|
| + UnlinkedExecutableBuilder get initializer => _initializer;
|
| +
|
| + /**
|
| + * The synthetic initializer function of the variable. Absent if the variable
|
| + * does not have an initializer.
|
| + */
|
| + void set initializer(UnlinkedExecutableBuilder _value) {
|
| + assert(!_finished);
|
| + _initializer = _value;
|
| + }
|
| +
|
| + @override
|
| bool get isConst => _isConst ??= false;
|
|
|
| /**
|
| @@ -5440,11 +5482,12 @@ class UnlinkedVariableBuilder extends Object with _UnlinkedVariableMixin impleme
|
| _visibleOffset = _value;
|
| }
|
|
|
| - UnlinkedVariableBuilder({List<UnlinkedConstBuilder> annotations, UnlinkedConstBuilder constExpr, UnlinkedDocumentationCommentBuilder documentationComment, int inferredTypeSlot, bool isConst, bool isFinal, bool isStatic, String name, int nameOffset, int propagatedTypeSlot, EntityRefBuilder type, int visibleLength, int visibleOffset})
|
| + UnlinkedVariableBuilder({List<UnlinkedConstBuilder> annotations, UnlinkedConstBuilder constExpr, UnlinkedDocumentationCommentBuilder documentationComment, int inferredTypeSlot, UnlinkedExecutableBuilder initializer, bool isConst, bool isFinal, bool isStatic, String name, int nameOffset, int propagatedTypeSlot, EntityRefBuilder type, int visibleLength, int visibleOffset})
|
| : _annotations = annotations,
|
| _constExpr = constExpr,
|
| _documentationComment = documentationComment,
|
| _inferredTypeSlot = inferredTypeSlot,
|
| + _initializer = initializer,
|
| _isConst = isConst,
|
| _isFinal = isFinal,
|
| _isStatic = isStatic,
|
| @@ -5461,6 +5504,7 @@ class UnlinkedVariableBuilder extends Object with _UnlinkedVariableMixin impleme
|
| fb.Offset offset_annotations;
|
| fb.Offset offset_constExpr;
|
| fb.Offset offset_documentationComment;
|
| + fb.Offset offset_initializer;
|
| fb.Offset offset_name;
|
| fb.Offset offset_type;
|
| if (!(_annotations == null || _annotations.isEmpty)) {
|
| @@ -5472,6 +5516,9 @@ class UnlinkedVariableBuilder extends Object with _UnlinkedVariableMixin impleme
|
| if (_documentationComment != null) {
|
| offset_documentationComment = _documentationComment.finish(fbBuilder);
|
| }
|
| + if (_initializer != null) {
|
| + offset_initializer = _initializer.finish(fbBuilder);
|
| + }
|
| if (_name != null) {
|
| offset_name = fbBuilder.writeString(_name);
|
| }
|
| @@ -5480,16 +5527,19 @@ class UnlinkedVariableBuilder extends Object with _UnlinkedVariableMixin impleme
|
| }
|
| fbBuilder.startTable();
|
| if (offset_annotations != null) {
|
| - fbBuilder.addOffset(8, offset_annotations);
|
| + fbBuilder.addOffset(9, offset_annotations);
|
| }
|
| if (offset_constExpr != null) {
|
| fbBuilder.addOffset(5, offset_constExpr);
|
| }
|
| if (offset_documentationComment != null) {
|
| - fbBuilder.addOffset(10, offset_documentationComment);
|
| + fbBuilder.addOffset(11, offset_documentationComment);
|
| }
|
| if (_inferredTypeSlot != null && _inferredTypeSlot != 0) {
|
| - fbBuilder.addUint32(9, _inferredTypeSlot);
|
| + fbBuilder.addUint32(10, _inferredTypeSlot);
|
| + }
|
| + if (offset_initializer != null) {
|
| + fbBuilder.addOffset(8, offset_initializer);
|
| }
|
| if (_isConst == true) {
|
| fbBuilder.addBool(6, true);
|
| @@ -5513,10 +5563,10 @@ class UnlinkedVariableBuilder extends Object with _UnlinkedVariableMixin impleme
|
| fbBuilder.addOffset(3, offset_type);
|
| }
|
| if (_visibleLength != null && _visibleLength != 0) {
|
| - fbBuilder.addUint32(11, _visibleLength);
|
| + fbBuilder.addUint32(12, _visibleLength);
|
| }
|
| if (_visibleOffset != null && _visibleOffset != 0) {
|
| - fbBuilder.addUint32(12, _visibleOffset);
|
| + fbBuilder.addUint32(13, _visibleOffset);
|
| }
|
| return fbBuilder.endTable();
|
| }
|
| @@ -5538,6 +5588,7 @@ class _UnlinkedVariableImpl extends Object with _UnlinkedVariableMixin implement
|
| idl.UnlinkedConst _constExpr;
|
| idl.UnlinkedDocumentationComment _documentationComment;
|
| int _inferredTypeSlot;
|
| + idl.UnlinkedExecutable _initializer;
|
| bool _isConst;
|
| bool _isFinal;
|
| bool _isStatic;
|
| @@ -5550,7 +5601,7 @@ class _UnlinkedVariableImpl extends Object with _UnlinkedVariableMixin implement
|
|
|
| @override
|
| List<idl.UnlinkedConst> get annotations {
|
| - _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConstReader()).vTableGet(_bp, 8, const <idl.UnlinkedConst>[]);
|
| + _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConstReader()).vTableGet(_bp, 9, const <idl.UnlinkedConst>[]);
|
| return _annotations;
|
| }
|
|
|
| @@ -5562,17 +5613,23 @@ class _UnlinkedVariableImpl extends Object with _UnlinkedVariableMixin implement
|
|
|
| @override
|
| idl.UnlinkedDocumentationComment get documentationComment {
|
| - _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTableGet(_bp, 10, null);
|
| + _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTableGet(_bp, 11, null);
|
| return _documentationComment;
|
| }
|
|
|
| @override
|
| int get inferredTypeSlot {
|
| - _inferredTypeSlot ??= const fb.Uint32Reader().vTableGet(_bp, 9, 0);
|
| + _inferredTypeSlot ??= const fb.Uint32Reader().vTableGet(_bp, 10, 0);
|
| return _inferredTypeSlot;
|
| }
|
|
|
| @override
|
| + idl.UnlinkedExecutable get initializer {
|
| + _initializer ??= const _UnlinkedExecutableReader().vTableGet(_bp, 8, null);
|
| + return _initializer;
|
| + }
|
| +
|
| + @override
|
| bool get isConst {
|
| _isConst ??= const fb.BoolReader().vTableGet(_bp, 6, false);
|
| return _isConst;
|
| @@ -5616,13 +5673,13 @@ class _UnlinkedVariableImpl extends Object with _UnlinkedVariableMixin implement
|
|
|
| @override
|
| int get visibleLength {
|
| - _visibleLength ??= const fb.Uint32Reader().vTableGet(_bp, 11, 0);
|
| + _visibleLength ??= const fb.Uint32Reader().vTableGet(_bp, 12, 0);
|
| return _visibleLength;
|
| }
|
|
|
| @override
|
| int get visibleOffset {
|
| - _visibleOffset ??= const fb.Uint32Reader().vTableGet(_bp, 12, 0);
|
| + _visibleOffset ??= const fb.Uint32Reader().vTableGet(_bp, 13, 0);
|
| return _visibleOffset;
|
| }
|
| }
|
| @@ -5634,6 +5691,7 @@ abstract class _UnlinkedVariableMixin implements idl.UnlinkedVariable {
|
| "constExpr": constExpr,
|
| "documentationComment": documentationComment,
|
| "inferredTypeSlot": inferredTypeSlot,
|
| + "initializer": initializer,
|
| "isConst": isConst,
|
| "isFinal": isFinal,
|
| "isStatic": isStatic,
|
|
|