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

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

Issue 2459573005: Add UnlinkedUnit.isPartOf flag. (Closed)
Patch Set: tweak the comment Created 4 years, 1 month 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 | « no previous file | pkg/analyzer/lib/src/summary/format.fbs » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 85ac30ae6aebe9367a67cdc5228d1823df31aa92..b469b7404972a16d3ae6bd57c89d5e0e2e79b011 100644
--- a/pkg/analyzer/lib/src/summary/format.dart
+++ b/pkg/analyzer/lib/src/summary/format.dart
@@ -8668,6 +8668,7 @@ class UnlinkedUnitBuilder extends Object with _UnlinkedUnitMixin implements idl.
List<UnlinkedExportNonPublicBuilder> _exports;
String _fallbackModePath;
List<UnlinkedImportBuilder> _imports;
+ bool _isPartOf;
List<UnlinkedConstBuilder> _libraryAnnotations;
UnlinkedDocumentationCommentBuilder _libraryDocumentationComment;
String _libraryName;
@@ -8756,6 +8757,16 @@ class UnlinkedUnitBuilder extends Object with _UnlinkedUnitMixin implements idl.
}
@override
+ bool get isPartOf => _isPartOf ??= false;
+
+ /**
+ * Indicates whether the unit contains a "part of" declaration.
+ */
+ void set isPartOf(bool value) {
+ this._isPartOf = value;
+ }
+
+ @override
List<UnlinkedConstBuilder> get libraryAnnotations => _libraryAnnotations ??= <UnlinkedConstBuilder>[];
/**
@@ -8876,7 +8887,7 @@ class UnlinkedUnitBuilder extends Object with _UnlinkedUnitMixin implements idl.
this._variables = value;
}
- UnlinkedUnitBuilder({List<UnlinkedClassBuilder> classes, CodeRangeBuilder codeRange, List<UnlinkedEnumBuilder> enums, List<UnlinkedExecutableBuilder> executables, List<UnlinkedExportNonPublicBuilder> exports, String fallbackModePath, List<UnlinkedImportBuilder> imports, List<UnlinkedConstBuilder> libraryAnnotations, UnlinkedDocumentationCommentBuilder libraryDocumentationComment, String libraryName, int libraryNameLength, int libraryNameOffset, List<int> lineStarts, List<UnlinkedPartBuilder> parts, UnlinkedPublicNamespaceBuilder publicNamespace, List<UnlinkedReferenceBuilder> references, List<UnlinkedTypedefBuilder> typedefs, List<UnlinkedVariableBuilder> variables})
+ UnlinkedUnitBuilder({List<UnlinkedClassBuilder> classes, CodeRangeBuilder codeRange, List<UnlinkedEnumBuilder> enums, List<UnlinkedExecutableBuilder> executables, List<UnlinkedExportNonPublicBuilder> exports, String fallbackModePath, List<UnlinkedImportBuilder> imports, bool isPartOf, List<UnlinkedConstBuilder> libraryAnnotations, UnlinkedDocumentationCommentBuilder libraryDocumentationComment, String libraryName, int libraryNameLength, int libraryNameOffset, List<int> lineStarts, List<UnlinkedPartBuilder> parts, UnlinkedPublicNamespaceBuilder publicNamespace, List<UnlinkedReferenceBuilder> references, List<UnlinkedTypedefBuilder> typedefs, List<UnlinkedVariableBuilder> variables})
: _classes = classes,
_codeRange = codeRange,
_enums = enums,
@@ -8884,6 +8895,7 @@ class UnlinkedUnitBuilder extends Object with _UnlinkedUnitMixin implements idl.
_exports = exports,
_fallbackModePath = fallbackModePath,
_imports = imports,
+ _isPartOf = isPartOf,
_libraryAnnotations = libraryAnnotations,
_libraryDocumentationComment = libraryDocumentationComment,
_libraryName = libraryName,
@@ -9006,6 +9018,7 @@ class UnlinkedUnitBuilder extends Object with _UnlinkedUnitMixin implements idl.
}
}
signature.addString(this._fallbackModePath ?? '');
+ signature.addBool(this._isPartOf == true);
}
List<int> toBuffer() {
@@ -9100,6 +9113,9 @@ class UnlinkedUnitBuilder extends Object with _UnlinkedUnitMixin implements idl.
if (offset_imports != null) {
fbBuilder.addOffset(5, offset_imports);
}
+ if (_isPartOf == true) {
+ fbBuilder.addBool(18, true);
+ }
if (offset_libraryAnnotations != null) {
fbBuilder.addOffset(14, offset_libraryAnnotations);
}
@@ -9162,6 +9178,7 @@ class _UnlinkedUnitImpl extends Object with _UnlinkedUnitMixin implements idl.Un
List<idl.UnlinkedExportNonPublic> _exports;
String _fallbackModePath;
List<idl.UnlinkedImport> _imports;
+ bool _isPartOf;
List<idl.UnlinkedConst> _libraryAnnotations;
idl.UnlinkedDocumentationComment _libraryDocumentationComment;
String _libraryName;
@@ -9217,6 +9234,12 @@ class _UnlinkedUnitImpl extends Object with _UnlinkedUnitMixin implements idl.Un
}
@override
+ bool get isPartOf {
+ _isPartOf ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 18, false);
+ return _isPartOf;
+ }
+
+ @override
List<idl.UnlinkedConst> get libraryAnnotations {
_libraryAnnotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConstReader()).vTableGet(_bc, _bcOffset, 14, const <idl.UnlinkedConst>[]);
return _libraryAnnotations;
@@ -9294,6 +9317,7 @@ abstract class _UnlinkedUnitMixin implements idl.UnlinkedUnit {
if (exports.isNotEmpty) _result["exports"] = exports.map((_value) => _value.toJson()).toList();
if (fallbackModePath != '') _result["fallbackModePath"] = fallbackModePath;
if (imports.isNotEmpty) _result["imports"] = imports.map((_value) => _value.toJson()).toList();
+ if (isPartOf != false) _result["isPartOf"] = isPartOf;
if (libraryAnnotations.isNotEmpty) _result["libraryAnnotations"] = libraryAnnotations.map((_value) => _value.toJson()).toList();
if (libraryDocumentationComment != null) _result["libraryDocumentationComment"] = libraryDocumentationComment.toJson();
if (libraryName != '') _result["libraryName"] = libraryName;
@@ -9317,6 +9341,7 @@ abstract class _UnlinkedUnitMixin implements idl.UnlinkedUnit {
"exports": exports,
"fallbackModePath": fallbackModePath,
"imports": imports,
+ "isPartOf": isPartOf,
"libraryAnnotations": libraryAnnotations,
"libraryDocumentationComment": libraryDocumentationComment,
"libraryName": libraryName,
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/summary/format.fbs » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698