@@ -447,6 +447,10 @@ class InformativeDataApplier {
447447 var representationField = element.fields.first;
448448 var infoRep = info.representation;
449449 representationField.nameOffset = infoRep.fieldNameOffset;
450+ _setFragmentNameOffset (
451+ representationField.name2,
452+ infoRep.fieldNameOffset2,
453+ );
450454 representationField.setCodeRange (
451455 infoRep.fieldCodeOffset,
452456 infoRep.fieldCodeLength,
@@ -533,6 +537,7 @@ class InformativeDataApplier {
533537 element as FieldElementImpl ;
534538 element.setCodeRange (info.codeOffset, info.codeLength);
535539 element.nameOffset = info.nameOffset;
540+ _setFragmentNameOffset (element.name2, info.nameOffset2);
536541 element.documentationComment = info.documentationComment;
537542
538543 var applyOffsets = ApplyConstantOffsets (
@@ -779,6 +784,7 @@ class InformativeDataApplier {
779784 element as TopLevelVariableElementImpl ;
780785 element.setCodeRange (info.codeOffset, info.codeLength);
781786 element.nameOffset = info.nameOffset;
787+ _setFragmentNameOffset (element.name2, info.nameOffset2);
782788 element.documentationComment = info.documentationComment;
783789
784790 var applyOffsets = ApplyConstantOffsets (
@@ -1139,6 +1145,7 @@ class _InfoExtensionTypeRepresentation {
11391145 final int fieldCodeOffset;
11401146 final int fieldCodeLength;
11411147 final int fieldNameOffset;
1148+ final int ? fieldNameOffset2;
11421149 final Uint32List fieldConstantOffsets;
11431150
11441151 factory _InfoExtensionTypeRepresentation (SummaryDataReader reader) {
@@ -1152,6 +1159,7 @@ class _InfoExtensionTypeRepresentation {
11521159 fieldCodeOffset: reader.readUInt30 (),
11531160 fieldCodeLength: reader.readUInt30 (),
11541161 fieldNameOffset: reader.readUInt30 (),
1162+ fieldNameOffset2: reader.readOptionalUInt30 (),
11551163 fieldConstantOffsets: reader.readUInt30List (),
11561164 );
11571165 }
@@ -1166,6 +1174,7 @@ class _InfoExtensionTypeRepresentation {
11661174 required this .fieldCodeOffset,
11671175 required this .fieldCodeLength,
11681176 required this .fieldNameOffset,
1177+ required this .fieldNameOffset2,
11691178 required this .fieldConstantOffsets,
11701179 });
11711180}
@@ -1174,6 +1183,7 @@ class _InfoFieldDeclaration {
11741183 final int codeOffset;
11751184 final int codeLength;
11761185 final int nameOffset;
1186+ final int ? nameOffset2;
11771187 final String ? documentationComment;
11781188 final Uint32List constantOffsets;
11791189
@@ -1182,6 +1192,7 @@ class _InfoFieldDeclaration {
11821192 codeOffset: reader.readUInt30 (),
11831193 codeLength: reader.readUInt30 (),
11841194 nameOffset: reader.readUInt30 (),
1195+ nameOffset2: reader.readOptionalUInt30 (),
11851196 documentationComment: reader.readStringUtf8 ().nullIfEmpty,
11861197 constantOffsets: reader.readUInt30List (),
11871198 );
@@ -1191,6 +1202,7 @@ class _InfoFieldDeclaration {
11911202 required this .codeOffset,
11921203 required this .codeLength,
11931204 required this .nameOffset,
1205+ required this .nameOffset2,
11941206 required this .documentationComment,
11951207 required this .constantOffsets,
11961208 });
@@ -1721,6 +1733,7 @@ class _InformativeDataWriter {
17211733 sink.writeUInt30 (codeOffset);
17221734 sink.writeUInt30 (node.end - codeOffset);
17231735 sink.writeUInt30 (node.name.offset);
1736+ sink.writeOptionalUInt30 (node.name.offsetIfNotEmpty);
17241737 _writeDocumentationComment (node);
17251738 _writeOffsets (
17261739 metadata: node.metadata,
@@ -1738,6 +1751,7 @@ class _InformativeDataWriter {
17381751 sink.writeUInt30 (codeOffset);
17391752 sink.writeUInt30 (node.end - codeOffset);
17401753 sink.writeUInt30 (node.name.offset);
1754+ sink.writeOptionalUInt30 (node.name.offsetIfNotEmpty);
17411755 _writeDocumentationComment (node);
17421756
17431757 // TODO(scheglov): Replace with some kind of double-iterating list.
@@ -1955,6 +1969,7 @@ class _InformativeDataWriter {
19551969 sink.writeUInt30 (codeOffset);
19561970 sink.writeUInt30 (codeEnd - codeOffset);
19571971 sink.writeUInt30 (node.fieldName.offset);
1972+ sink.writeOptionalUInt30 (node.fieldName.offsetIfNotEmpty);
19581973
19591974 _writeOffsets (
19601975 metadata: node.fieldMetadata,
@@ -1966,6 +1981,7 @@ class _InformativeDataWriter {
19661981 sink.writeUInt30 (codeOffset);
19671982 sink.writeUInt30 (node.end - codeOffset);
19681983 sink.writeUInt30 (node.name.offset);
1984+ sink.writeOptionalUInt30 (node.name.offsetIfNotEmpty);
19691985 _writeDocumentationComment (node);
19701986
19711987 // TODO(scheglov): Replace with some kind of double-iterating list.
@@ -1991,6 +2007,7 @@ class _InfoTopLevelVariable {
19912007 final int codeOffset;
19922008 final int codeLength;
19932009 final int nameOffset;
2010+ final int ? nameOffset2;
19942011 final String ? documentationComment;
19952012 final Uint32List constantOffsets;
19962013
@@ -1999,6 +2016,7 @@ class _InfoTopLevelVariable {
19992016 codeOffset: reader.readUInt30 (),
20002017 codeLength: reader.readUInt30 (),
20012018 nameOffset: reader.readUInt30 (),
2019+ nameOffset2: reader.readOptionalUInt30 (),
20022020 documentationComment: reader.readStringUtf8 ().nullIfEmpty,
20032021 constantOffsets: reader.readUInt30List (),
20042022 );
@@ -2008,6 +2026,7 @@ class _InfoTopLevelVariable {
20082026 required this .codeOffset,
20092027 required this .codeLength,
20102028 required this .nameOffset,
2029+ required this .nameOffset2,
20112030 required this .documentationComment,
20122031 required this .constantOffsets,
20132032 });
0 commit comments