| 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 c1262d61a0a219a2df9a53e9c8259ff7ec6a8670..92cd9464de5e7dea198930bb9415af13d6851d85 100644
|
| --- a/pkg/analyzer/lib/src/summary/format.dart
|
| +++ b/pkg/analyzer/lib/src/summary/format.dart
|
| @@ -1156,32 +1156,32 @@ abstract class _AnalysisDriverUnitIndexMixin implements idl.AnalysisDriverUnitIn
|
| }
|
|
|
| class AnalysisDriverUnlinkedUnitBuilder extends Object with _AnalysisDriverUnlinkedUnitMixin implements idl.AnalysisDriverUnlinkedUnit {
|
| - UnlinkedUnitBuilder _unit;
|
| List<String> _referencedNames;
|
| + UnlinkedUnitBuilder _unit;
|
|
|
| @override
|
| - UnlinkedUnitBuilder get unit => _unit;
|
| + List<String> get referencedNames => _referencedNames ??= <String>[];
|
|
|
| /**
|
| - * Unlinked information for the unit.
|
| + * List of external names referenced by the unit.
|
| */
|
| - void set unit(UnlinkedUnitBuilder value) {
|
| - this._unit = value;
|
| + void set referencedNames(List<String> value) {
|
| + this._referencedNames = value;
|
| }
|
|
|
| @override
|
| - List<String> get referencedNames => _referencedNames ??= <String>[];
|
| + UnlinkedUnitBuilder get unit => _unit;
|
|
|
| /**
|
| - * List of external names referenced by the unit.
|
| + * Unlinked information for the unit.
|
| */
|
| - void set referencedNames(List<String> value) {
|
| - this._referencedNames = value;
|
| + void set unit(UnlinkedUnitBuilder value) {
|
| + this._unit = value;
|
| }
|
|
|
| - AnalysisDriverUnlinkedUnitBuilder({UnlinkedUnitBuilder unit, List<String> referencedNames})
|
| - : _unit = unit,
|
| - _referencedNames = referencedNames;
|
| + AnalysisDriverUnlinkedUnitBuilder({List<String> referencedNames, UnlinkedUnitBuilder unit})
|
| + : _referencedNames = referencedNames,
|
| + _unit = unit;
|
|
|
| /**
|
| * Flush [informative] data recursively.
|
| @@ -1212,21 +1212,21 @@ class AnalysisDriverUnlinkedUnitBuilder extends Object with _AnalysisDriverUnlin
|
| }
|
|
|
| fb.Offset finish(fb.Builder fbBuilder) {
|
| - fb.Offset offset_unit;
|
| fb.Offset offset_referencedNames;
|
| - if (_unit != null) {
|
| - offset_unit = _unit.finish(fbBuilder);
|
| - }
|
| + fb.Offset offset_unit;
|
| if (!(_referencedNames == null || _referencedNames.isEmpty)) {
|
| offset_referencedNames = fbBuilder.writeList(_referencedNames.map((b) => fbBuilder.writeString(b)).toList());
|
| }
|
| - fbBuilder.startTable();
|
| - if (offset_unit != null) {
|
| - fbBuilder.addOffset(1, offset_unit);
|
| + if (_unit != null) {
|
| + offset_unit = _unit.finish(fbBuilder);
|
| }
|
| + fbBuilder.startTable();
|
| if (offset_referencedNames != null) {
|
| fbBuilder.addOffset(0, offset_referencedNames);
|
| }
|
| + if (offset_unit != null) {
|
| + fbBuilder.addOffset(1, offset_unit);
|
| + }
|
| return fbBuilder.endTable();
|
| }
|
| }
|
| @@ -1249,35 +1249,35 @@ class _AnalysisDriverUnlinkedUnitImpl extends Object with _AnalysisDriverUnlinke
|
|
|
| _AnalysisDriverUnlinkedUnitImpl(this._bc, this._bcOffset);
|
|
|
| - idl.UnlinkedUnit _unit;
|
| List<String> _referencedNames;
|
| -
|
| - @override
|
| - idl.UnlinkedUnit get unit {
|
| - _unit ??= const _UnlinkedUnitReader().vTableGet(_bc, _bcOffset, 1, null);
|
| - return _unit;
|
| - }
|
| + idl.UnlinkedUnit _unit;
|
|
|
| @override
|
| List<String> get referencedNames {
|
| _referencedNames ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet(_bc, _bcOffset, 0, const <String>[]);
|
| return _referencedNames;
|
| }
|
| +
|
| + @override
|
| + idl.UnlinkedUnit get unit {
|
| + _unit ??= const _UnlinkedUnitReader().vTableGet(_bc, _bcOffset, 1, null);
|
| + return _unit;
|
| + }
|
| }
|
|
|
| abstract class _AnalysisDriverUnlinkedUnitMixin implements idl.AnalysisDriverUnlinkedUnit {
|
| @override
|
| Map<String, Object> toJson() {
|
| Map<String, Object> _result = <String, Object>{};
|
| - if (unit != null) _result["unit"] = unit.toJson();
|
| if (referencedNames.isNotEmpty) _result["referencedNames"] = referencedNames;
|
| + if (unit != null) _result["unit"] = unit.toJson();
|
| return _result;
|
| }
|
|
|
| @override
|
| Map<String, Object> toMap() => {
|
| - "unit": unit,
|
| "referencedNames": referencedNames,
|
| + "unit": unit,
|
| };
|
|
|
| @override
|
|
|