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

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

Issue 1762193002: Resynthesize codeOffset/codeLength properties. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 months 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
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 98f53f17b0b5d9813a2b06d5ed48760b58313aea..e69027570446c564f327f6ab7ab527fa57118a9e 100644
--- a/pkg/analyzer/lib/src/summary/format.dart
+++ b/pkg/analyzer/lib/src/summary/format.dart
@@ -1137,9 +1137,22 @@ abstract class _LinkedReferenceMixin implements idl.LinkedReference {
class LinkedUnitBuilder extends Object with _LinkedUnitMixin implements idl.LinkedUnit {
bool _finished = false;
+ List<int> _constCycles;
List<LinkedReferenceBuilder> _references;
List<EntityRefBuilder> _types;
- List<int> _constCycles;
+
+ @override
+ List<int> get constCycles => _constCycles ??= <int>[];
+
+ /**
+ * List of slot ids (referring to [UnlinkedExecutable.constCycleSlot])
+ * corresponding to const constructors that are part of cycles.
+ */
+ void set constCycles(List<int> _value) {
+ assert(!_finished);
+ assert(_value == null || _value.every((e) => e >= 0));
+ _constCycles = _value;
+ }
@override
List<LinkedReferenceBuilder> get references => _references ??= <LinkedReferenceBuilder>[];
@@ -1169,49 +1182,36 @@ class LinkedUnitBuilder extends Object with _LinkedUnitMixin implements idl.Link
_types = _value;
}
- @override
- List<int> get constCycles => _constCycles ??= <int>[];
-
- /**
- * List of slot ids (referring to [UnlinkedExecutable.constCycleSlot])
- * corresponding to const constructors that are part of cycles.
- */
- void set constCycles(List<int> _value) {
- assert(!_finished);
- assert(_value == null || _value.every((e) => e >= 0));
- _constCycles = _value;
- }
-
- LinkedUnitBuilder({List<LinkedReferenceBuilder> references, List<EntityRefBuilder> types, List<int> constCycles})
- : _references = references,
- _types = types,
- _constCycles = constCycles;
+ LinkedUnitBuilder({List<int> constCycles, List<LinkedReferenceBuilder> references, List<EntityRefBuilder> types})
+ : _constCycles = constCycles,
+ _references = references,
+ _types = types;
fb.Offset finish(fb.Builder fbBuilder) {
assert(!_finished);
_finished = true;
+ fb.Offset offset_constCycles;
fb.Offset offset_references;
fb.Offset offset_types;
- fb.Offset offset_constCycles;
+ if (!(_constCycles == null || _constCycles.isEmpty)) {
+ offset_constCycles = fbBuilder.writeListUint32(_constCycles);
+ }
if (!(_references == null || _references.isEmpty)) {
offset_references = fbBuilder.writeList(_references.map((b) => b.finish(fbBuilder)).toList());
}
if (!(_types == null || _types.isEmpty)) {
offset_types = fbBuilder.writeList(_types.map((b) => b.finish(fbBuilder)).toList());
}
- if (!(_constCycles == null || _constCycles.isEmpty)) {
- offset_constCycles = fbBuilder.writeListUint32(_constCycles);
- }
fbBuilder.startTable();
+ if (offset_constCycles != null) {
+ fbBuilder.addOffset(2, offset_constCycles);
+ }
if (offset_references != null) {
fbBuilder.addOffset(0, offset_references);
}
if (offset_types != null) {
fbBuilder.addOffset(1, offset_types);
}
- if (offset_constCycles != null) {
- fbBuilder.addOffset(2, offset_constCycles);
- }
return fbBuilder.endTable();
}
}
@@ -1228,9 +1228,15 @@ class _LinkedUnitImpl extends Object with _LinkedUnitMixin implements idl.Linked
_LinkedUnitImpl(this._bp);
+ List<int> _constCycles;
List<idl.LinkedReference> _references;
List<idl.EntityRef> _types;
- List<int> _constCycles;
+
+ @override
+ List<int> get constCycles {
+ _constCycles ??= const fb.Uint32ListReader().vTableGet(_bp, 2, const <int>[]);
+ return _constCycles;
+ }
@override
List<idl.LinkedReference> get references {
@@ -1243,29 +1249,23 @@ class _LinkedUnitImpl extends Object with _LinkedUnitMixin implements idl.Linked
_types ??= const fb.ListReader<idl.EntityRef>(const _EntityRefReader()).vTableGet(_bp, 1, const <idl.EntityRef>[]);
return _types;
}
-
- @override
- List<int> get constCycles {
- _constCycles ??= const fb.Uint32ListReader().vTableGet(_bp, 2, const <int>[]);
- return _constCycles;
- }
}
abstract class _LinkedUnitMixin implements idl.LinkedUnit {
@override
Map<String, Object> toJson() {
Map<String, Object> _result = <String, Object>{};
+ if (constCycles.isNotEmpty) _result["constCycles"] = constCycles;
if (references.isNotEmpty) _result["references"] = references.map((_value) => _value.toJson()).toList();
if (types.isNotEmpty) _result["types"] = types.map((_value) => _value.toJson()).toList();
- if (constCycles.isNotEmpty) _result["constCycles"] = constCycles;
return _result;
}
@override
Map<String, Object> toMap() => {
+ "constCycles": constCycles,
"references": references,
"types": types,
- "constCycles": constCycles,
};
@override
@@ -2207,9 +2207,12 @@ class UnlinkedClassBuilder extends Object with _UnlinkedClassMixin implements id
bool _finished = false;
List<UnlinkedConstBuilder> _annotations;
+ int _codeLength;
+ int _codeOffset;
UnlinkedDocumentationCommentBuilder _documentationComment;
List<UnlinkedExecutableBuilder> _executables;
List<UnlinkedVariableBuilder> _fields;
+ bool _hasCodeRange;
bool _hasNoSupertype;
List<EntityRefBuilder> _interfaces;
bool _isAbstract;
@@ -2232,6 +2235,30 @@ class UnlinkedClassBuilder extends Object with _UnlinkedClassMixin implements id
}
@override
+ int get codeLength => _codeLength ??= 0;
+
+ /**
+ * Length of the class code.
+ */
+ void set codeLength(int _value) {
+ assert(!_finished);
+ assert(_value == null || _value >= 0);
+ _codeLength = _value;
+ }
+
+ @override
+ int get codeOffset => _codeOffset ??= 0;
+
+ /**
+ * Offset of the class code relative to the beginning of the file.
+ */
+ void set codeOffset(int _value) {
+ assert(!_finished);
+ assert(_value == null || _value >= 0);
+ _codeOffset = _value;
+ }
+
+ @override
UnlinkedDocumentationCommentBuilder get documentationComment => _documentationComment;
/**
@@ -2266,6 +2293,17 @@ class UnlinkedClassBuilder extends Object with _UnlinkedClassMixin implements id
}
@override
+ bool get hasCodeRange => _hasCodeRange ??= false;
+
+ /**
+ * Indicates whether the class has the code range.
+ */
+ void set hasCodeRange(bool _value) {
+ assert(!_finished);
+ _hasCodeRange = _value;
+ }
+
+ @override
bool get hasNoSupertype => _hasNoSupertype ??= false;
/**
@@ -2368,11 +2406,14 @@ class UnlinkedClassBuilder extends Object with _UnlinkedClassMixin implements id
_typeParameters = _value;
}
- UnlinkedClassBuilder({List<UnlinkedConstBuilder> annotations, UnlinkedDocumentationCommentBuilder documentationComment, List<UnlinkedExecutableBuilder> executables, List<UnlinkedVariableBuilder> fields, bool hasNoSupertype, List<EntityRefBuilder> interfaces, bool isAbstract, bool isMixinApplication, List<EntityRefBuilder> mixins, String name, int nameOffset, EntityRefBuilder supertype, List<UnlinkedTypeParamBuilder> typeParameters})
+ UnlinkedClassBuilder({List<UnlinkedConstBuilder> annotations, int codeLength, int codeOffset, UnlinkedDocumentationCommentBuilder documentationComment, List<UnlinkedExecutableBuilder> executables, List<UnlinkedVariableBuilder> fields, bool hasCodeRange, bool hasNoSupertype, List<EntityRefBuilder> interfaces, bool isAbstract, bool isMixinApplication, List<EntityRefBuilder> mixins, String name, int nameOffset, EntityRefBuilder supertype, List<UnlinkedTypeParamBuilder> typeParameters})
: _annotations = annotations,
+ _codeLength = codeLength,
+ _codeOffset = codeOffset,
_documentationComment = documentationComment,
_executables = executables,
_fields = fields,
+ _hasCodeRange = hasCodeRange,
_hasNoSupertype = hasNoSupertype,
_interfaces = interfaces,
_isAbstract = isAbstract,
@@ -2426,6 +2467,12 @@ class UnlinkedClassBuilder extends Object with _UnlinkedClassMixin implements id
if (offset_annotations != null) {
fbBuilder.addOffset(5, offset_annotations);
}
+ if (_codeLength != null && _codeLength != 0) {
+ fbBuilder.addUint32(15, _codeLength);
+ }
+ if (_codeOffset != null && _codeOffset != 0) {
+ fbBuilder.addUint32(14, _codeOffset);
+ }
if (offset_documentationComment != null) {
fbBuilder.addOffset(6, offset_documentationComment);
}
@@ -2435,6 +2482,9 @@ class UnlinkedClassBuilder extends Object with _UnlinkedClassMixin implements id
if (offset_fields != null) {
fbBuilder.addOffset(4, offset_fields);
}
+ if (_hasCodeRange == true) {
+ fbBuilder.addBool(13, true);
+ }
if (_hasNoSupertype == true) {
fbBuilder.addBool(12, true);
}
@@ -2479,9 +2529,12 @@ class _UnlinkedClassImpl extends Object with _UnlinkedClassMixin implements idl.
_UnlinkedClassImpl(this._bp);
List<idl.UnlinkedConst> _annotations;
+ int _codeLength;
+ int _codeOffset;
idl.UnlinkedDocumentationComment _documentationComment;
List<idl.UnlinkedExecutable> _executables;
List<idl.UnlinkedVariable> _fields;
+ bool _hasCodeRange;
bool _hasNoSupertype;
List<idl.EntityRef> _interfaces;
bool _isAbstract;
@@ -2499,6 +2552,18 @@ class _UnlinkedClassImpl extends Object with _UnlinkedClassMixin implements idl.
}
@override
+ int get codeLength {
+ _codeLength ??= const fb.Uint32Reader().vTableGet(_bp, 15, 0);
+ return _codeLength;
+ }
+
+ @override
+ int get codeOffset {
+ _codeOffset ??= const fb.Uint32Reader().vTableGet(_bp, 14, 0);
+ return _codeOffset;
+ }
+
+ @override
idl.UnlinkedDocumentationComment get documentationComment {
_documentationComment ??= const _UnlinkedDocumentationCommentReader().vTableGet(_bp, 6, null);
return _documentationComment;
@@ -2517,6 +2582,12 @@ class _UnlinkedClassImpl extends Object with _UnlinkedClassMixin implements idl.
}
@override
+ bool get hasCodeRange {
+ _hasCodeRange ??= const fb.BoolReader().vTableGet(_bp, 13, false);
+ return _hasCodeRange;
+ }
+
+ @override
bool get hasNoSupertype {
_hasNoSupertype ??= const fb.BoolReader().vTableGet(_bp, 12, false);
return _hasNoSupertype;
@@ -2576,9 +2647,12 @@ abstract class _UnlinkedClassMixin implements idl.UnlinkedClass {
Map<String, Object> toJson() {
Map<String, Object> _result = <String, Object>{};
if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value) => _value.toJson()).toList();
+ if (codeLength != 0) _result["codeLength"] = codeLength;
+ if (codeOffset != 0) _result["codeOffset"] = codeOffset;
if (documentationComment != null) _result["documentationComment"] = documentationComment.toJson();
if (executables.isNotEmpty) _result["executables"] = executables.map((_value) => _value.toJson()).toList();
if (fields.isNotEmpty) _result["fields"] = fields.map((_value) => _value.toJson()).toList();
+ if (hasCodeRange != false) _result["hasCodeRange"] = hasCodeRange;
if (hasNoSupertype != false) _result["hasNoSupertype"] = hasNoSupertype;
if (interfaces.isNotEmpty) _result["interfaces"] = interfaces.map((_value) => _value.toJson()).toList();
if (isAbstract != false) _result["isAbstract"] = isAbstract;
@@ -2594,9 +2668,12 @@ abstract class _UnlinkedClassMixin implements idl.UnlinkedClass {
@override
Map<String, Object> toMap() => {
"annotations": annotations,
+ "codeLength": codeLength,
+ "codeOffset": codeOffset,
"documentationComment": documentationComment,
"executables": executables,
"fields": fields,
+ "hasCodeRange": hasCodeRange,
"hasNoSupertype": hasNoSupertype,
"interfaces": interfaces,
"isAbstract": isAbstract,
@@ -3281,7 +3358,10 @@ class UnlinkedEnumBuilder extends Object with _UnlinkedEnumMixin implements idl.
bool _finished = false;
List<UnlinkedConstBuilder> _annotations;
+ int _codeLength;
+ int _codeOffset;
UnlinkedDocumentationCommentBuilder _documentationComment;
+ bool _hasCodeRange;
String _name;
int _nameOffset;
List<UnlinkedEnumValueBuilder> _values;
@@ -3298,6 +3378,30 @@ class UnlinkedEnumBuilder extends Object with _UnlinkedEnumMixin implements idl.
}
@override
+ int get codeLength => _codeLength ??= 0;
+
+ /**
+ * Length of the enum code.
+ */
+ void set codeLength(int _value) {
+ assert(!_finished);
+ assert(_value == null || _value >= 0);
+ _codeLength = _value;
+ }
+
+ @override
+ int get codeOffset => _codeOffset ??= 0;
+
+ /**
+ * Offset of the enum code relative to the beginning of the file.
+ */
+ void set codeOffset(int _value) {
+ assert(!_finished);
+ assert(_value == null || _value >= 0);
+ _codeOffset = _value;
+ }
+
+ @override
UnlinkedDocumentationCommentBuilder get documentationComment => _documentationComment;
/**
@@ -3310,6 +3414,17 @@ class UnlinkedEnumBuilder extends Object with _UnlinkedEnumMixin implements idl.
}
@override
+ bool get hasCodeRange => _hasCodeRange ??= false;
+
+ /**
+ * Indicates whether the enum has the code range.
+ */
+ void set hasCodeRange(bool _value) {
+ assert(!_finished);
+ _hasCodeRange = _value;
+ }
+
+ @override
String get name => _name ??= '';
/**
@@ -3343,9 +3458,12 @@ class UnlinkedEnumBuilder extends Object with _UnlinkedEnumMixin implements idl.
_values = _value;
}
- UnlinkedEnumBuilder({List<UnlinkedConstBuilder> annotations, UnlinkedDocumentationCommentBuilder documentationComment, String name, int nameOffset, List<UnlinkedEnumValueBuilder> values})
+ UnlinkedEnumBuilder({List<UnlinkedConstBuilder> annotations, int codeLength, int codeOffset, UnlinkedDocumentationCommentBuilder documentationComment, bool hasCodeRange, String name, int nameOffset, List<UnlinkedEnumValueBuilder> values})
: _annotations = annotations,
+ _codeLength = codeLength,
+ _codeOffset = codeOffset,
_documentationComment = documentationComment,
+ _hasCodeRange = hasCodeRange,
_name = name,
_nameOffset = nameOffset,
_values = values;
@@ -3373,9 +3491,18 @@ class UnlinkedEnumBuilder extends Object with _UnlinkedEnumMixin implements idl.
if (offset_annotations != null) {
fbBuilder.addOffset(4, offset_annotations);
}
+ if (_codeLength != null && _codeLength != 0) {
+ fbBuilder.addUint32(7, _codeLength);
+ }
+ if (_codeOffset != null && _codeOffset != 0) {
+ fbBuilder.addUint32(6, _codeOffset);
+ }
if (offset_documentationComment != null) {
fbBuilder.addOffset(3, offset_documentationComment);
}
+ if (_hasCodeRange == true) {
+ fbBuilder.addBool(5, true);
+ }
if (offset_name != null) {
fbBuilder.addOffset(0, offset_name);
}
@@ -3402,7 +3529,10 @@ class _UnlinkedEnumImpl extends Object with _UnlinkedEnumMixin implements idl.Un
_UnlinkedEnumImpl(this._bp);
List<idl.UnlinkedConst> _annotations;
+ int _codeLength;
+ int _codeOffset;
idl.UnlinkedDocumentationComment _documentationComment;
+ bool _hasCodeRange;
String _name;
int _nameOffset;
List<idl.UnlinkedEnumValue> _values;
@@ -3414,12 +3544,30 @@ class _UnlinkedEnumImpl extends Object with _UnlinkedEnumMixin implements idl.Un
}
@override
+ int get codeLength {
+ _codeLength ??= const fb.Uint32Reader().vTableGet(_bp, 7, 0);
+ return _codeLength;
+ }
+
+ @override
+ int get codeOffset {
+ _codeOffset ??= const fb.Uint32Reader().vTableGet(_bp, 6, 0);
+ return _codeOffset;
+ }
+
+ @override
idl.UnlinkedDocumentationComment get documentationComment {
_documentationComment ??= const _UnlinkedDocumentationCommentReader().vTableGet(_bp, 3, null);
return _documentationComment;
}
@override
+ bool get hasCodeRange {
+ _hasCodeRange ??= const fb.BoolReader().vTableGet(_bp, 5, false);
+ return _hasCodeRange;
+ }
+
+ @override
String get name {
_name ??= const fb.StringReader().vTableGet(_bp, 0, '');
return _name;
@@ -3443,7 +3591,10 @@ abstract class _UnlinkedEnumMixin implements idl.UnlinkedEnum {
Map<String, Object> toJson() {
Map<String, Object> _result = <String, Object>{};
if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value) => _value.toJson()).toList();
+ if (codeLength != 0) _result["codeLength"] = codeLength;
+ if (codeOffset != 0) _result["codeOffset"] = codeOffset;
if (documentationComment != null) _result["documentationComment"] = documentationComment.toJson();
+ if (hasCodeRange != false) _result["hasCodeRange"] = hasCodeRange;
if (name != '') _result["name"] = name;
if (nameOffset != 0) _result["nameOffset"] = nameOffset;
if (values.isNotEmpty) _result["values"] = values.map((_value) => _value.toJson()).toList();
@@ -3453,7 +3604,10 @@ abstract class _UnlinkedEnumMixin implements idl.UnlinkedEnum {
@override
Map<String, Object> toMap() => {
"annotations": annotations,
+ "codeLength": codeLength,
+ "codeOffset": codeOffset,
"documentationComment": documentationComment,
+ "hasCodeRange": hasCodeRange,
"name": name,
"nameOffset": nameOffset,
"values": values,
@@ -3595,8 +3749,12 @@ class UnlinkedExecutableBuilder extends Object with _UnlinkedExecutableMixin imp
bool _finished = false;
List<UnlinkedConstBuilder> _annotations;
+ int _codeLength;
+ int _codeOffset;
List<UnlinkedConstructorInitializerBuilder> _constantInitializers;
+ int _constCycleSlot;
UnlinkedDocumentationCommentBuilder _documentationComment;
+ bool _hasCodeRange;
int _inferredReturnTypeSlot;
bool _isAbstract;
bool _isConst;
@@ -3619,7 +3777,6 @@ class UnlinkedExecutableBuilder extends Object with _UnlinkedExecutableMixin imp
List<UnlinkedTypeParamBuilder> _typeParameters;
int _visibleLength;
int _visibleOffset;
- int _constCycleSlot;
@override
List<UnlinkedConstBuilder> get annotations => _annotations ??= <UnlinkedConstBuilder>[];
@@ -3633,6 +3790,30 @@ class UnlinkedExecutableBuilder extends Object with _UnlinkedExecutableMixin imp
}
@override
+ int get codeLength => _codeLength ??= 0;
+
+ /**
+ * Length of the executable code.
+ */
+ void set codeLength(int _value) {
+ assert(!_finished);
+ assert(_value == null || _value >= 0);
+ _codeLength = _value;
+ }
+
+ @override
+ int get codeOffset => _codeOffset ??= 0;
+
+ /**
+ * Offset of the executable code relative to the beginning of the file.
+ */
+ void set codeOffset(int _value) {
+ assert(!_finished);
+ assert(_value == null || _value >= 0);
+ _codeOffset = _value;
+ }
+
+ @override
List<UnlinkedConstructorInitializerBuilder> get constantInitializers => _constantInitializers ??= <UnlinkedConstructorInitializerBuilder>[];
/**
@@ -3645,6 +3826,23 @@ class UnlinkedExecutableBuilder extends Object with _UnlinkedExecutableMixin imp
}
@override
+ int get constCycleSlot => _constCycleSlot ??= 0;
+
+ /**
+ * If [kind] is [UnlinkedExecutableKind.constructor] and [isConst] is `true`,
+ * a nonzero slot id which is unique within this compilation unit. If this id
+ * is found in [LinkedUnit.constCycles], then this constructor is part of a
+ * cycle.
+ *
+ * Otherwise, zero.
+ */
+ void set constCycleSlot(int _value) {
+ assert(!_finished);
+ assert(_value == null || _value >= 0);
+ _constCycleSlot = _value;
+ }
+
+ @override
UnlinkedDocumentationCommentBuilder get documentationComment => _documentationComment;
/**
@@ -3657,6 +3855,17 @@ class UnlinkedExecutableBuilder extends Object with _UnlinkedExecutableMixin imp
}
@override
+ bool get hasCodeRange => _hasCodeRange ??= false;
+
+ /**
+ * Indicates whether the executable has the code range.
+ */
+ void set hasCodeRange(bool _value) {
+ assert(!_finished);
+ _hasCodeRange = _value;
+ }
+
+ @override
int get inferredReturnTypeSlot => _inferredReturnTypeSlot ??= 0;
/**
@@ -3930,27 +4139,14 @@ class UnlinkedExecutableBuilder extends Object with _UnlinkedExecutableMixin imp
_visibleOffset = _value;
}
- @override
- int get constCycleSlot => _constCycleSlot ??= 0;
-
- /**
- * If [kind] is [UnlinkedExecutableKind.constructor] and [isConst] is `true`,
- * a nonzero slot id which is unique within this compilation unit. If this id
- * is found in [LinkedUnit.constCycles], then this constructor is part of a
- * cycle.
- *
- * Otherwise, zero.
- */
- void set constCycleSlot(int _value) {
- assert(!_finished);
- assert(_value == null || _value >= 0);
- _constCycleSlot = _value;
- }
-
- UnlinkedExecutableBuilder({List<UnlinkedConstBuilder> annotations, List<UnlinkedConstructorInitializerBuilder> constantInitializers, UnlinkedDocumentationCommentBuilder documentationComment, int inferredReturnTypeSlot, bool isAbstract, bool isConst, bool isExternal, bool isFactory, bool isRedirectedConstructor, bool isStatic, idl.UnlinkedExecutableKind kind, List<UnlinkedExecutableBuilder> localFunctions, List<UnlinkedLabelBuilder> localLabels, List<UnlinkedVariableBuilder> localVariables, String name, int nameEnd, int nameOffset, List<UnlinkedParamBuilder> parameters, int periodOffset, EntityRefBuilder redirectedConstructor, String redirectedConstructorName, EntityRefBuilder returnType, List<UnlinkedTypeParamBuilder> typeParameters, int visibleLength, int visibleOffset, int constCycleSlot})
+ UnlinkedExecutableBuilder({List<UnlinkedConstBuilder> annotations, int codeLength, int codeOffset, List<UnlinkedConstructorInitializerBuilder> constantInitializers, int constCycleSlot, UnlinkedDocumentationCommentBuilder documentationComment, bool hasCodeRange, int inferredReturnTypeSlot, bool isAbstract, bool isConst, bool isExternal, bool isFactory, bool isRedirectedConstructor, bool isStatic, idl.UnlinkedExecutableKind kind, List<UnlinkedExecutableBuilder> localFunctions, List<UnlinkedLabelBuilder> localLabels, List<UnlinkedVariableBuilder> localVariables, String name, int nameEnd, int nameOffset, List<UnlinkedParamBuilder> parameters, int periodOffset, EntityRefBuilder redirectedConstructor, String redirectedConstructorName, EntityRefBuilder returnType, List<UnlinkedTypeParamBuilder> typeParameters, int visibleLength, int visibleOffset})
: _annotations = annotations,
+ _codeLength = codeLength,
+ _codeOffset = codeOffset,
_constantInitializers = constantInitializers,
+ _constCycleSlot = constCycleSlot,
_documentationComment = documentationComment,
+ _hasCodeRange = hasCodeRange,
_inferredReturnTypeSlot = inferredReturnTypeSlot,
_isAbstract = isAbstract,
_isConst = isConst,
@@ -3972,8 +4168,7 @@ class UnlinkedExecutableBuilder extends Object with _UnlinkedExecutableMixin imp
_returnType = returnType,
_typeParameters = typeParameters,
_visibleLength = visibleLength,
- _visibleOffset = visibleOffset,
- _constCycleSlot = constCycleSlot;
+ _visibleOffset = visibleOffset;
fb.Offset finish(fb.Builder fbBuilder) {
assert(!_finished);
@@ -4030,12 +4225,24 @@ class UnlinkedExecutableBuilder extends Object with _UnlinkedExecutableMixin imp
if (offset_annotations != null) {
fbBuilder.addOffset(6, offset_annotations);
}
+ if (_codeLength != null && _codeLength != 0) {
+ fbBuilder.addUint32(28, _codeLength);
+ }
+ if (_codeOffset != null && _codeOffset != 0) {
+ fbBuilder.addUint32(27, _codeOffset);
+ }
if (offset_constantInitializers != null) {
fbBuilder.addOffset(14, offset_constantInitializers);
}
+ if (_constCycleSlot != null && _constCycleSlot != 0) {
+ fbBuilder.addUint32(25, _constCycleSlot);
+ }
if (offset_documentationComment != null) {
fbBuilder.addOffset(7, offset_documentationComment);
}
+ if (_hasCodeRange == true) {
+ fbBuilder.addBool(26, true);
+ }
if (_inferredReturnTypeSlot != null && _inferredReturnTypeSlot != 0) {
fbBuilder.addUint32(5, _inferredReturnTypeSlot);
}
@@ -4102,9 +4309,6 @@ class UnlinkedExecutableBuilder extends Object with _UnlinkedExecutableMixin imp
if (_visibleOffset != null && _visibleOffset != 0) {
fbBuilder.addUint32(21, _visibleOffset);
}
- if (_constCycleSlot != null && _constCycleSlot != 0) {
- fbBuilder.addUint32(25, _constCycleSlot);
- }
return fbBuilder.endTable();
}
}
@@ -4122,8 +4326,12 @@ class _UnlinkedExecutableImpl extends Object with _UnlinkedExecutableMixin imple
_UnlinkedExecutableImpl(this._bp);
List<idl.UnlinkedConst> _annotations;
+ int _codeLength;
+ int _codeOffset;
List<idl.UnlinkedConstructorInitializer> _constantInitializers;
+ int _constCycleSlot;
idl.UnlinkedDocumentationComment _documentationComment;
+ bool _hasCodeRange;
int _inferredReturnTypeSlot;
bool _isAbstract;
bool _isConst;
@@ -4146,7 +4354,6 @@ class _UnlinkedExecutableImpl extends Object with _UnlinkedExecutableMixin imple
List<idl.UnlinkedTypeParam> _typeParameters;
int _visibleLength;
int _visibleOffset;
- int _constCycleSlot;
@override
List<idl.UnlinkedConst> get annotations {
@@ -4155,18 +4362,42 @@ class _UnlinkedExecutableImpl extends Object with _UnlinkedExecutableMixin imple
}
@override
+ int get codeLength {
+ _codeLength ??= const fb.Uint32Reader().vTableGet(_bp, 28, 0);
+ return _codeLength;
+ }
+
+ @override
+ int get codeOffset {
+ _codeOffset ??= const fb.Uint32Reader().vTableGet(_bp, 27, 0);
+ return _codeOffset;
+ }
+
+ @override
List<idl.UnlinkedConstructorInitializer> get constantInitializers {
_constantInitializers ??= const fb.ListReader<idl.UnlinkedConstructorInitializer>(const _UnlinkedConstructorInitializerReader()).vTableGet(_bp, 14, const <idl.UnlinkedConstructorInitializer>[]);
return _constantInitializers;
}
@override
+ int get constCycleSlot {
+ _constCycleSlot ??= const fb.Uint32Reader().vTableGet(_bp, 25, 0);
+ return _constCycleSlot;
+ }
+
+ @override
idl.UnlinkedDocumentationComment get documentationComment {
_documentationComment ??= const _UnlinkedDocumentationCommentReader().vTableGet(_bp, 7, null);
return _documentationComment;
}
@override
+ bool get hasCodeRange {
+ _hasCodeRange ??= const fb.BoolReader().vTableGet(_bp, 26, false);
+ return _hasCodeRange;
+ }
+
+ @override
int get inferredReturnTypeSlot {
_inferredReturnTypeSlot ??= const fb.Uint32Reader().vTableGet(_bp, 5, 0);
return _inferredReturnTypeSlot;
@@ -4297,12 +4528,6 @@ class _UnlinkedExecutableImpl extends Object with _UnlinkedExecutableMixin imple
_visibleOffset ??= const fb.Uint32Reader().vTableGet(_bp, 21, 0);
return _visibleOffset;
}
-
- @override
- int get constCycleSlot {
- _constCycleSlot ??= const fb.Uint32Reader().vTableGet(_bp, 25, 0);
- return _constCycleSlot;
- }
}
abstract class _UnlinkedExecutableMixin implements idl.UnlinkedExecutable {
@@ -4310,8 +4535,12 @@ abstract class _UnlinkedExecutableMixin implements idl.UnlinkedExecutable {
Map<String, Object> toJson() {
Map<String, Object> _result = <String, Object>{};
if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value) => _value.toJson()).toList();
+ if (codeLength != 0) _result["codeLength"] = codeLength;
+ if (codeOffset != 0) _result["codeOffset"] = codeOffset;
if (constantInitializers.isNotEmpty) _result["constantInitializers"] = constantInitializers.map((_value) => _value.toJson()).toList();
+ if (constCycleSlot != 0) _result["constCycleSlot"] = constCycleSlot;
if (documentationComment != null) _result["documentationComment"] = documentationComment.toJson();
+ if (hasCodeRange != false) _result["hasCodeRange"] = hasCodeRange;
if (inferredReturnTypeSlot != 0) _result["inferredReturnTypeSlot"] = inferredReturnTypeSlot;
if (isAbstract != false) _result["isAbstract"] = isAbstract;
if (isConst != false) _result["isConst"] = isConst;
@@ -4334,15 +4563,18 @@ abstract class _UnlinkedExecutableMixin implements idl.UnlinkedExecutable {
if (typeParameters.isNotEmpty) _result["typeParameters"] = typeParameters.map((_value) => _value.toJson()).toList();
if (visibleLength != 0) _result["visibleLength"] = visibleLength;
if (visibleOffset != 0) _result["visibleOffset"] = visibleOffset;
- if (constCycleSlot != 0) _result["constCycleSlot"] = constCycleSlot;
return _result;
}
@override
Map<String, Object> toMap() => {
"annotations": annotations,
+ "codeLength": codeLength,
+ "codeOffset": codeOffset,
"constantInitializers": constantInitializers,
+ "constCycleSlot": constCycleSlot,
"documentationComment": documentationComment,
+ "hasCodeRange": hasCodeRange,
"inferredReturnTypeSlot": inferredReturnTypeSlot,
"isAbstract": isAbstract,
"isConst": isConst,
@@ -4365,7 +4597,6 @@ abstract class _UnlinkedExecutableMixin implements idl.UnlinkedExecutable {
"typeParameters": typeParameters,
"visibleLength": visibleLength,
"visibleOffset": visibleOffset,
- "constCycleSlot": constCycleSlot,
};
@override
@@ -5095,8 +5326,11 @@ class UnlinkedParamBuilder extends Object with _UnlinkedParamMixin implements id
bool _finished = false;
List<UnlinkedConstBuilder> _annotations;
+ int _codeLength;
+ int _codeOffset;
UnlinkedConstBuilder _defaultValue;
String _defaultValueCode;
+ bool _hasCodeRange;
int _inferredTypeSlot;
UnlinkedExecutableBuilder _initializer;
bool _isFunctionTyped;
@@ -5121,6 +5355,30 @@ class UnlinkedParamBuilder extends Object with _UnlinkedParamMixin implements id
}
@override
+ int get codeLength => _codeLength ??= 0;
+
+ /**
+ * Length of the parameter code.
+ */
+ void set codeLength(int _value) {
+ assert(!_finished);
+ assert(_value == null || _value >= 0);
+ _codeLength = _value;
+ }
+
+ @override
+ int get codeOffset => _codeOffset ??= 0;
+
+ /**
+ * Offset of the parameter code relative to the beginning of the file.
+ */
+ void set codeOffset(int _value) {
+ assert(!_finished);
+ assert(_value == null || _value >= 0);
+ _codeOffset = _value;
+ }
+
+ @override
UnlinkedConstBuilder get defaultValue => _defaultValue;
/**
@@ -5146,6 +5404,17 @@ class UnlinkedParamBuilder extends Object with _UnlinkedParamMixin implements id
}
@override
+ bool get hasCodeRange => _hasCodeRange ??= false;
+
+ /**
+ * Indicates whether the parameter has the code range.
+ */
+ void set hasCodeRange(bool _value) {
+ assert(!_finished);
+ _hasCodeRange = _value;
+ }
+
+ @override
int get inferredTypeSlot => _inferredTypeSlot ??= 0;
/**
@@ -5282,10 +5551,13 @@ class UnlinkedParamBuilder extends Object with _UnlinkedParamMixin implements id
_visibleOffset = _value;
}
- UnlinkedParamBuilder({List<UnlinkedConstBuilder> annotations, UnlinkedConstBuilder defaultValue, String defaultValueCode, int inferredTypeSlot, UnlinkedExecutableBuilder initializer, bool isFunctionTyped, bool isInitializingFormal, idl.UnlinkedParamKind kind, String name, int nameOffset, List<UnlinkedParamBuilder> parameters, EntityRefBuilder type, int visibleLength, int visibleOffset})
+ UnlinkedParamBuilder({List<UnlinkedConstBuilder> annotations, int codeLength, int codeOffset, UnlinkedConstBuilder defaultValue, String defaultValueCode, bool hasCodeRange, 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,
+ _codeLength = codeLength,
+ _codeOffset = codeOffset,
_defaultValue = defaultValue,
_defaultValueCode = defaultValueCode,
+ _hasCodeRange = hasCodeRange,
_inferredTypeSlot = inferredTypeSlot,
_initializer = initializer,
_isFunctionTyped = isFunctionTyped,
@@ -5333,12 +5605,21 @@ class UnlinkedParamBuilder extends Object with _UnlinkedParamMixin implements id
if (offset_annotations != null) {
fbBuilder.addOffset(9, offset_annotations);
}
+ if (_codeLength != null && _codeLength != 0) {
+ fbBuilder.addUint32(16, _codeLength);
+ }
+ if (_codeOffset != null && _codeOffset != 0) {
+ fbBuilder.addUint32(15, _codeOffset);
+ }
if (offset_defaultValue != null) {
fbBuilder.addOffset(7, offset_defaultValue);
}
if (offset_defaultValueCode != null) {
fbBuilder.addOffset(13, offset_defaultValueCode);
}
+ if (_hasCodeRange == true) {
+ fbBuilder.addBool(14, true);
+ }
if (_inferredTypeSlot != null && _inferredTypeSlot != 0) {
fbBuilder.addUint32(2, _inferredTypeSlot);
}
@@ -5389,8 +5670,11 @@ class _UnlinkedParamImpl extends Object with _UnlinkedParamMixin implements idl.
_UnlinkedParamImpl(this._bp);
List<idl.UnlinkedConst> _annotations;
+ int _codeLength;
+ int _codeOffset;
idl.UnlinkedConst _defaultValue;
String _defaultValueCode;
+ bool _hasCodeRange;
int _inferredTypeSlot;
idl.UnlinkedExecutable _initializer;
bool _isFunctionTyped;
@@ -5410,6 +5694,18 @@ class _UnlinkedParamImpl extends Object with _UnlinkedParamMixin implements idl.
}
@override
+ int get codeLength {
+ _codeLength ??= const fb.Uint32Reader().vTableGet(_bp, 16, 0);
+ return _codeLength;
+ }
+
+ @override
+ int get codeOffset {
+ _codeOffset ??= const fb.Uint32Reader().vTableGet(_bp, 15, 0);
+ return _codeOffset;
+ }
+
+ @override
idl.UnlinkedConst get defaultValue {
_defaultValue ??= const _UnlinkedConstReader().vTableGet(_bp, 7, null);
return _defaultValue;
@@ -5422,6 +5718,12 @@ class _UnlinkedParamImpl extends Object with _UnlinkedParamMixin implements idl.
}
@override
+ bool get hasCodeRange {
+ _hasCodeRange ??= const fb.BoolReader().vTableGet(_bp, 14, false);
+ return _hasCodeRange;
+ }
+
+ @override
int get inferredTypeSlot {
_inferredTypeSlot ??= const fb.Uint32Reader().vTableGet(_bp, 2, 0);
return _inferredTypeSlot;
@@ -5493,8 +5795,11 @@ abstract class _UnlinkedParamMixin implements idl.UnlinkedParam {
Map<String, Object> toJson() {
Map<String, Object> _result = <String, Object>{};
if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value) => _value.toJson()).toList();
+ if (codeLength != 0) _result["codeLength"] = codeLength;
+ if (codeOffset != 0) _result["codeOffset"] = codeOffset;
if (defaultValue != null) _result["defaultValue"] = defaultValue.toJson();
if (defaultValueCode != '') _result["defaultValueCode"] = defaultValueCode;
+ if (hasCodeRange != false) _result["hasCodeRange"] = hasCodeRange;
if (inferredTypeSlot != 0) _result["inferredTypeSlot"] = inferredTypeSlot;
if (initializer != null) _result["initializer"] = initializer.toJson();
if (isFunctionTyped != false) _result["isFunctionTyped"] = isFunctionTyped;
@@ -5512,8 +5817,11 @@ abstract class _UnlinkedParamMixin implements idl.UnlinkedParam {
@override
Map<String, Object> toMap() => {
"annotations": annotations,
+ "codeLength": codeLength,
+ "codeOffset": codeOffset,
"defaultValue": defaultValue,
"defaultValueCode": defaultValueCode,
+ "hasCodeRange": hasCodeRange,
"inferredTypeSlot": inferredTypeSlot,
"initializer": initializer,
"isFunctionTyped": isFunctionTyped,
@@ -6067,7 +6375,10 @@ class UnlinkedTypedefBuilder extends Object with _UnlinkedTypedefMixin implement
bool _finished = false;
List<UnlinkedConstBuilder> _annotations;
+ int _codeLength;
+ int _codeOffset;
UnlinkedDocumentationCommentBuilder _documentationComment;
+ bool _hasCodeRange;
String _name;
int _nameOffset;
List<UnlinkedParamBuilder> _parameters;
@@ -6086,6 +6397,30 @@ class UnlinkedTypedefBuilder extends Object with _UnlinkedTypedefMixin implement
}
@override
+ int get codeLength => _codeLength ??= 0;
+
+ /**
+ * Length of the typedef code.
+ */
+ void set codeLength(int _value) {
+ assert(!_finished);
+ assert(_value == null || _value >= 0);
+ _codeLength = _value;
+ }
+
+ @override
+ int get codeOffset => _codeOffset ??= 0;
+
+ /**
+ * Offset of the typedef code relative to the beginning of the file.
+ */
+ void set codeOffset(int _value) {
+ assert(!_finished);
+ assert(_value == null || _value >= 0);
+ _codeOffset = _value;
+ }
+
+ @override
UnlinkedDocumentationCommentBuilder get documentationComment => _documentationComment;
/**
@@ -6098,6 +6433,17 @@ class UnlinkedTypedefBuilder extends Object with _UnlinkedTypedefMixin implement
}
@override
+ bool get hasCodeRange => _hasCodeRange ??= false;
+
+ /**
+ * Indicates whether the typedef has the code range.
+ */
+ void set hasCodeRange(bool _value) {
+ assert(!_finished);
+ _hasCodeRange = _value;
+ }
+
+ @override
String get name => _name ??= '';
/**
@@ -6153,9 +6499,12 @@ class UnlinkedTypedefBuilder extends Object with _UnlinkedTypedefMixin implement
_typeParameters = _value;
}
- UnlinkedTypedefBuilder({List<UnlinkedConstBuilder> annotations, UnlinkedDocumentationCommentBuilder documentationComment, String name, int nameOffset, List<UnlinkedParamBuilder> parameters, EntityRefBuilder returnType, List<UnlinkedTypeParamBuilder> typeParameters})
+ UnlinkedTypedefBuilder({List<UnlinkedConstBuilder> annotations, int codeLength, int codeOffset, UnlinkedDocumentationCommentBuilder documentationComment, bool hasCodeRange, String name, int nameOffset, List<UnlinkedParamBuilder> parameters, EntityRefBuilder returnType, List<UnlinkedTypeParamBuilder> typeParameters})
: _annotations = annotations,
+ _codeLength = codeLength,
+ _codeOffset = codeOffset,
_documentationComment = documentationComment,
+ _hasCodeRange = hasCodeRange,
_name = name,
_nameOffset = nameOffset,
_parameters = parameters,
@@ -6193,9 +6542,18 @@ class UnlinkedTypedefBuilder extends Object with _UnlinkedTypedefMixin implement
if (offset_annotations != null) {
fbBuilder.addOffset(4, offset_annotations);
}
+ if (_codeLength != null && _codeLength != 0) {
+ fbBuilder.addUint32(9, _codeLength);
+ }
+ if (_codeOffset != null && _codeOffset != 0) {
+ fbBuilder.addUint32(8, _codeOffset);
+ }
if (offset_documentationComment != null) {
fbBuilder.addOffset(6, offset_documentationComment);
}
+ if (_hasCodeRange == true) {
+ fbBuilder.addBool(7, true);
+ }
if (offset_name != null) {
fbBuilder.addOffset(0, offset_name);
}
@@ -6228,7 +6586,10 @@ class _UnlinkedTypedefImpl extends Object with _UnlinkedTypedefMixin implements
_UnlinkedTypedefImpl(this._bp);
List<idl.UnlinkedConst> _annotations;
+ int _codeLength;
+ int _codeOffset;
idl.UnlinkedDocumentationComment _documentationComment;
+ bool _hasCodeRange;
String _name;
int _nameOffset;
List<idl.UnlinkedParam> _parameters;
@@ -6242,12 +6603,30 @@ class _UnlinkedTypedefImpl extends Object with _UnlinkedTypedefMixin implements
}
@override
+ int get codeLength {
+ _codeLength ??= const fb.Uint32Reader().vTableGet(_bp, 9, 0);
+ return _codeLength;
+ }
+
+ @override
+ int get codeOffset {
+ _codeOffset ??= const fb.Uint32Reader().vTableGet(_bp, 8, 0);
+ return _codeOffset;
+ }
+
+ @override
idl.UnlinkedDocumentationComment get documentationComment {
_documentationComment ??= const _UnlinkedDocumentationCommentReader().vTableGet(_bp, 6, null);
return _documentationComment;
}
@override
+ bool get hasCodeRange {
+ _hasCodeRange ??= const fb.BoolReader().vTableGet(_bp, 7, false);
+ return _hasCodeRange;
+ }
+
+ @override
String get name {
_name ??= const fb.StringReader().vTableGet(_bp, 0, '');
return _name;
@@ -6283,7 +6662,10 @@ abstract class _UnlinkedTypedefMixin implements idl.UnlinkedTypedef {
Map<String, Object> toJson() {
Map<String, Object> _result = <String, Object>{};
if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value) => _value.toJson()).toList();
+ if (codeLength != 0) _result["codeLength"] = codeLength;
+ if (codeOffset != 0) _result["codeOffset"] = codeOffset;
if (documentationComment != null) _result["documentationComment"] = documentationComment.toJson();
+ if (hasCodeRange != false) _result["hasCodeRange"] = hasCodeRange;
if (name != '') _result["name"] = name;
if (nameOffset != 0) _result["nameOffset"] = nameOffset;
if (parameters.isNotEmpty) _result["parameters"] = parameters.map((_value) => _value.toJson()).toList();
@@ -6295,7 +6677,10 @@ abstract class _UnlinkedTypedefMixin implements idl.UnlinkedTypedef {
@override
Map<String, Object> toMap() => {
"annotations": annotations,
+ "codeLength": codeLength,
+ "codeOffset": codeOffset,
"documentationComment": documentationComment,
+ "hasCodeRange": hasCodeRange,
"name": name,
"nameOffset": nameOffset,
"parameters": parameters,
@@ -6312,6 +6697,9 @@ class UnlinkedTypeParamBuilder extends Object with _UnlinkedTypeParamMixin imple
List<UnlinkedConstBuilder> _annotations;
EntityRefBuilder _bound;
+ int _codeLength;
+ int _codeOffset;
+ bool _hasCodeRange;
String _name;
int _nameOffset;
@@ -6339,6 +6727,41 @@ class UnlinkedTypeParamBuilder extends Object with _UnlinkedTypeParamMixin imple
}
@override
+ int get codeLength => _codeLength ??= 0;
+
+ /**
+ * Length of the type parameter code.
+ */
+ void set codeLength(int _value) {
+ assert(!_finished);
+ assert(_value == null || _value >= 0);
+ _codeLength = _value;
+ }
+
+ @override
+ int get codeOffset => _codeOffset ??= 0;
+
+ /**
+ * Offset of the type parameter code relative to the beginning of the file.
+ */
+ void set codeOffset(int _value) {
+ assert(!_finished);
+ assert(_value == null || _value >= 0);
+ _codeOffset = _value;
+ }
+
+ @override
+ bool get hasCodeRange => _hasCodeRange ??= false;
+
+ /**
+ * Indicates whether the parameter has the code range.
+ */
+ void set hasCodeRange(bool _value) {
+ assert(!_finished);
+ _hasCodeRange = _value;
+ }
+
+ @override
String get name => _name ??= '';
/**
@@ -6361,9 +6784,12 @@ class UnlinkedTypeParamBuilder extends Object with _UnlinkedTypeParamMixin imple
_nameOffset = _value;
}
- UnlinkedTypeParamBuilder({List<UnlinkedConstBuilder> annotations, EntityRefBuilder bound, String name, int nameOffset})
+ UnlinkedTypeParamBuilder({List<UnlinkedConstBuilder> annotations, EntityRefBuilder bound, int codeLength, int codeOffset, bool hasCodeRange, String name, int nameOffset})
: _annotations = annotations,
_bound = bound,
+ _codeLength = codeLength,
+ _codeOffset = codeOffset,
+ _hasCodeRange = hasCodeRange,
_name = name,
_nameOffset = nameOffset;
@@ -6389,6 +6815,15 @@ class UnlinkedTypeParamBuilder extends Object with _UnlinkedTypeParamMixin imple
if (offset_bound != null) {
fbBuilder.addOffset(2, offset_bound);
}
+ if (_codeLength != null && _codeLength != 0) {
+ fbBuilder.addUint32(6, _codeLength);
+ }
+ if (_codeOffset != null && _codeOffset != 0) {
+ fbBuilder.addUint32(5, _codeOffset);
+ }
+ if (_hasCodeRange == true) {
+ fbBuilder.addBool(4, true);
+ }
if (offset_name != null) {
fbBuilder.addOffset(0, offset_name);
}
@@ -6413,6 +6848,9 @@ class _UnlinkedTypeParamImpl extends Object with _UnlinkedTypeParamMixin impleme
List<idl.UnlinkedConst> _annotations;
idl.EntityRef _bound;
+ int _codeLength;
+ int _codeOffset;
+ bool _hasCodeRange;
String _name;
int _nameOffset;
@@ -6429,6 +6867,24 @@ class _UnlinkedTypeParamImpl extends Object with _UnlinkedTypeParamMixin impleme
}
@override
+ int get codeLength {
+ _codeLength ??= const fb.Uint32Reader().vTableGet(_bp, 6, 0);
+ return _codeLength;
+ }
+
+ @override
+ int get codeOffset {
+ _codeOffset ??= const fb.Uint32Reader().vTableGet(_bp, 5, 0);
+ return _codeOffset;
+ }
+
+ @override
+ bool get hasCodeRange {
+ _hasCodeRange ??= const fb.BoolReader().vTableGet(_bp, 4, false);
+ return _hasCodeRange;
+ }
+
+ @override
String get name {
_name ??= const fb.StringReader().vTableGet(_bp, 0, '');
return _name;
@@ -6447,6 +6903,9 @@ abstract class _UnlinkedTypeParamMixin implements idl.UnlinkedTypeParam {
Map<String, Object> _result = <String, Object>{};
if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value) => _value.toJson()).toList();
if (bound != null) _result["bound"] = bound.toJson();
+ if (codeLength != 0) _result["codeLength"] = codeLength;
+ if (codeOffset != 0) _result["codeOffset"] = codeOffset;
+ if (hasCodeRange != false) _result["hasCodeRange"] = hasCodeRange;
if (name != '') _result["name"] = name;
if (nameOffset != 0) _result["nameOffset"] = nameOffset;
return _result;
@@ -6456,6 +6915,9 @@ abstract class _UnlinkedTypeParamMixin implements idl.UnlinkedTypeParam {
Map<String, Object> toMap() => {
"annotations": annotations,
"bound": bound,
+ "codeLength": codeLength,
+ "codeOffset": codeOffset,
+ "hasCodeRange": hasCodeRange,
"name": name,
"nameOffset": nameOffset,
};
@@ -6468,9 +6930,12 @@ class UnlinkedUnitBuilder extends Object with _UnlinkedUnitMixin implements idl.
bool _finished = false;
List<UnlinkedClassBuilder> _classes;
+ int _codeLength;
+ int _codeOffset;
List<UnlinkedEnumBuilder> _enums;
List<UnlinkedExecutableBuilder> _executables;
List<UnlinkedExportNonPublicBuilder> _exports;
+ bool _hasCodeRange;
List<UnlinkedImportBuilder> _imports;
List<UnlinkedConstBuilder> _libraryAnnotations;
UnlinkedDocumentationCommentBuilder _libraryDocumentationComment;
@@ -6495,6 +6960,30 @@ class UnlinkedUnitBuilder extends Object with _UnlinkedUnitMixin implements idl.
}
@override
+ int get codeLength => _codeLength ??= 0;
+
+ /**
+ * Length of the unit code.
+ */
+ void set codeLength(int _value) {
+ assert(!_finished);
+ assert(_value == null || _value >= 0);
+ _codeLength = _value;
+ }
+
+ @override
+ int get codeOffset => _codeOffset ??= 0;
+
+ /**
+ * Offset of the unit code relative to the beginning of the file.
+ */
+ void set codeOffset(int _value) {
+ assert(!_finished);
+ assert(_value == null || _value >= 0);
+ _codeOffset = _value;
+ }
+
+ @override
List<UnlinkedEnumBuilder> get enums => _enums ??= <UnlinkedEnumBuilder>[];
/**
@@ -6529,6 +7018,17 @@ class UnlinkedUnitBuilder extends Object with _UnlinkedUnitMixin implements idl.
}
@override
+ bool get hasCodeRange => _hasCodeRange ??= false;
+
+ /**
+ * Indicates whether the unit has the code range.
+ */
+ void set hasCodeRange(bool _value) {
+ assert(!_finished);
+ _hasCodeRange = _value;
+ }
+
+ @override
List<UnlinkedImportBuilder> get imports => _imports ??= <UnlinkedImportBuilder>[];
/**
@@ -6659,11 +7159,14 @@ class UnlinkedUnitBuilder extends Object with _UnlinkedUnitMixin implements idl.
_variables = _value;
}
- UnlinkedUnitBuilder({List<UnlinkedClassBuilder> classes, List<UnlinkedEnumBuilder> enums, List<UnlinkedExecutableBuilder> executables, List<UnlinkedExportNonPublicBuilder> exports, List<UnlinkedImportBuilder> imports, List<UnlinkedConstBuilder> libraryAnnotations, UnlinkedDocumentationCommentBuilder libraryDocumentationComment, String libraryName, int libraryNameLength, int libraryNameOffset, List<UnlinkedPartBuilder> parts, UnlinkedPublicNamespaceBuilder publicNamespace, List<UnlinkedReferenceBuilder> references, List<UnlinkedTypedefBuilder> typedefs, List<UnlinkedVariableBuilder> variables})
+ UnlinkedUnitBuilder({List<UnlinkedClassBuilder> classes, int codeLength, int codeOffset, List<UnlinkedEnumBuilder> enums, List<UnlinkedExecutableBuilder> executables, List<UnlinkedExportNonPublicBuilder> exports, bool hasCodeRange, List<UnlinkedImportBuilder> imports, List<UnlinkedConstBuilder> libraryAnnotations, UnlinkedDocumentationCommentBuilder libraryDocumentationComment, String libraryName, int libraryNameLength, int libraryNameOffset, List<UnlinkedPartBuilder> parts, UnlinkedPublicNamespaceBuilder publicNamespace, List<UnlinkedReferenceBuilder> references, List<UnlinkedTypedefBuilder> typedefs, List<UnlinkedVariableBuilder> variables})
: _classes = classes,
+ _codeLength = codeLength,
+ _codeOffset = codeOffset,
_enums = enums,
_executables = executables,
_exports = exports,
+ _hasCodeRange = hasCodeRange,
_imports = imports,
_libraryAnnotations = libraryAnnotations,
_libraryDocumentationComment = libraryDocumentationComment,
@@ -6740,6 +7243,12 @@ class UnlinkedUnitBuilder extends Object with _UnlinkedUnitMixin implements idl.
if (offset_classes != null) {
fbBuilder.addOffset(2, offset_classes);
}
+ if (_codeLength != null && _codeLength != 0) {
+ fbBuilder.addUint32(17, _codeLength);
+ }
+ if (_codeOffset != null && _codeOffset != 0) {
+ fbBuilder.addUint32(16, _codeOffset);
+ }
if (offset_enums != null) {
fbBuilder.addOffset(12, offset_enums);
}
@@ -6749,6 +7258,9 @@ class UnlinkedUnitBuilder extends Object with _UnlinkedUnitMixin implements idl.
if (offset_exports != null) {
fbBuilder.addOffset(13, offset_exports);
}
+ if (_hasCodeRange == true) {
+ fbBuilder.addBool(15, true);
+ }
if (offset_imports != null) {
fbBuilder.addOffset(5, offset_imports);
}
@@ -6804,9 +7316,12 @@ class _UnlinkedUnitImpl extends Object with _UnlinkedUnitMixin implements idl.Un
_UnlinkedUnitImpl(this._bp);
List<idl.UnlinkedClass> _classes;
+ int _codeLength;
+ int _codeOffset;
List<idl.UnlinkedEnum> _enums;
List<idl.UnlinkedExecutable> _executables;
List<idl.UnlinkedExportNonPublic> _exports;
+ bool _hasCodeRange;
List<idl.UnlinkedImport> _imports;
List<idl.UnlinkedConst> _libraryAnnotations;
idl.UnlinkedDocumentationComment _libraryDocumentationComment;
@@ -6826,6 +7341,18 @@ class _UnlinkedUnitImpl extends Object with _UnlinkedUnitMixin implements idl.Un
}
@override
+ int get codeLength {
+ _codeLength ??= const fb.Uint32Reader().vTableGet(_bp, 17, 0);
+ return _codeLength;
+ }
+
+ @override
+ int get codeOffset {
+ _codeOffset ??= const fb.Uint32Reader().vTableGet(_bp, 16, 0);
+ return _codeOffset;
+ }
+
+ @override
List<idl.UnlinkedEnum> get enums {
_enums ??= const fb.ListReader<idl.UnlinkedEnum>(const _UnlinkedEnumReader()).vTableGet(_bp, 12, const <idl.UnlinkedEnum>[]);
return _enums;
@@ -6844,6 +7371,12 @@ class _UnlinkedUnitImpl extends Object with _UnlinkedUnitMixin implements idl.Un
}
@override
+ bool get hasCodeRange {
+ _hasCodeRange ??= const fb.BoolReader().vTableGet(_bp, 15, false);
+ return _hasCodeRange;
+ }
+
+ @override
List<idl.UnlinkedImport> get imports {
_imports ??= const fb.ListReader<idl.UnlinkedImport>(const _UnlinkedImportReader()).vTableGet(_bp, 5, const <idl.UnlinkedImport>[]);
return _imports;
@@ -6915,9 +7448,12 @@ abstract class _UnlinkedUnitMixin implements idl.UnlinkedUnit {
Map<String, Object> toJson() {
Map<String, Object> _result = <String, Object>{};
if (classes.isNotEmpty) _result["classes"] = classes.map((_value) => _value.toJson()).toList();
+ if (codeLength != 0) _result["codeLength"] = codeLength;
+ if (codeOffset != 0) _result["codeOffset"] = codeOffset;
if (enums.isNotEmpty) _result["enums"] = enums.map((_value) => _value.toJson()).toList();
if (executables.isNotEmpty) _result["executables"] = executables.map((_value) => _value.toJson()).toList();
if (exports.isNotEmpty) _result["exports"] = exports.map((_value) => _value.toJson()).toList();
+ if (hasCodeRange != false) _result["hasCodeRange"] = hasCodeRange;
if (imports.isNotEmpty) _result["imports"] = imports.map((_value) => _value.toJson()).toList();
if (libraryAnnotations.isNotEmpty) _result["libraryAnnotations"] = libraryAnnotations.map((_value) => _value.toJson()).toList();
if (libraryDocumentationComment != null) _result["libraryDocumentationComment"] = libraryDocumentationComment.toJson();
@@ -6935,9 +7471,12 @@ abstract class _UnlinkedUnitMixin implements idl.UnlinkedUnit {
@override
Map<String, Object> toMap() => {
"classes": classes,
+ "codeLength": codeLength,
+ "codeOffset": codeOffset,
"enums": enums,
"executables": executables,
"exports": exports,
+ "hasCodeRange": hasCodeRange,
"imports": imports,
"libraryAnnotations": libraryAnnotations,
"libraryDocumentationComment": libraryDocumentationComment,
@@ -6959,8 +7498,11 @@ class UnlinkedVariableBuilder extends Object with _UnlinkedVariableMixin impleme
bool _finished = false;
List<UnlinkedConstBuilder> _annotations;
+ int _codeLength;
+ int _codeOffset;
UnlinkedConstBuilder _constExpr;
UnlinkedDocumentationCommentBuilder _documentationComment;
+ bool _hasCodeRange;
int _inferredTypeSlot;
UnlinkedExecutableBuilder _initializer;
bool _isConst;
@@ -6985,6 +7527,30 @@ class UnlinkedVariableBuilder extends Object with _UnlinkedVariableMixin impleme
}
@override
+ int get codeLength => _codeLength ??= 0;
+
+ /**
+ * Length of the variable code.
+ */
+ void set codeLength(int _value) {
+ assert(!_finished);
+ assert(_value == null || _value >= 0);
+ _codeLength = _value;
+ }
+
+ @override
+ int get codeOffset => _codeOffset ??= 0;
+
+ /**
+ * Offset of the variable code relative to the beginning of the file.
+ */
+ void set codeOffset(int _value) {
+ assert(!_finished);
+ assert(_value == null || _value >= 0);
+ _codeOffset = _value;
+ }
+
+ @override
UnlinkedConstBuilder get constExpr => _constExpr;
/**
@@ -7010,6 +7576,17 @@ class UnlinkedVariableBuilder extends Object with _UnlinkedVariableMixin impleme
}
@override
+ bool get hasCodeRange => _hasCodeRange ??= false;
+
+ /**
+ * Indicates whether the variable has the code range.
+ */
+ void set hasCodeRange(bool _value) {
+ assert(!_finished);
+ _hasCodeRange = _value;
+ }
+
+ @override
int get inferredTypeSlot => _inferredTypeSlot ??= 0;
/**
@@ -7148,10 +7725,13 @@ class UnlinkedVariableBuilder extends Object with _UnlinkedVariableMixin impleme
_visibleOffset = _value;
}
- 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})
+ UnlinkedVariableBuilder({List<UnlinkedConstBuilder> annotations, int codeLength, int codeOffset, UnlinkedConstBuilder constExpr, UnlinkedDocumentationCommentBuilder documentationComment, bool hasCodeRange, int inferredTypeSlot, UnlinkedExecutableBuilder initializer, bool isConst, bool isFinal, bool isStatic, String name, int nameOffset, int propagatedTypeSlot, EntityRefBuilder type, int visibleLength, int visibleOffset})
: _annotations = annotations,
+ _codeLength = codeLength,
+ _codeOffset = codeOffset,
_constExpr = constExpr,
_documentationComment = documentationComment,
+ _hasCodeRange = hasCodeRange,
_inferredTypeSlot = inferredTypeSlot,
_initializer = initializer,
_isConst = isConst,
@@ -7195,12 +7775,21 @@ class UnlinkedVariableBuilder extends Object with _UnlinkedVariableMixin impleme
if (offset_annotations != null) {
fbBuilder.addOffset(8, offset_annotations);
}
+ if (_codeLength != null && _codeLength != 0) {
+ fbBuilder.addUint32(16, _codeLength);
+ }
+ if (_codeOffset != null && _codeOffset != 0) {
+ fbBuilder.addUint32(15, _codeOffset);
+ }
if (offset_constExpr != null) {
fbBuilder.addOffset(5, offset_constExpr);
}
if (offset_documentationComment != null) {
fbBuilder.addOffset(10, offset_documentationComment);
}
+ if (_hasCodeRange == true) {
+ fbBuilder.addBool(14, true);
+ }
if (_inferredTypeSlot != null && _inferredTypeSlot != 0) {
fbBuilder.addUint32(9, _inferredTypeSlot);
}
@@ -7251,8 +7840,11 @@ class _UnlinkedVariableImpl extends Object with _UnlinkedVariableMixin implement
_UnlinkedVariableImpl(this._bp);
List<idl.UnlinkedConst> _annotations;
+ int _codeLength;
+ int _codeOffset;
idl.UnlinkedConst _constExpr;
idl.UnlinkedDocumentationComment _documentationComment;
+ bool _hasCodeRange;
int _inferredTypeSlot;
idl.UnlinkedExecutable _initializer;
bool _isConst;
@@ -7272,6 +7864,18 @@ class _UnlinkedVariableImpl extends Object with _UnlinkedVariableMixin implement
}
@override
+ int get codeLength {
+ _codeLength ??= const fb.Uint32Reader().vTableGet(_bp, 16, 0);
+ return _codeLength;
+ }
+
+ @override
+ int get codeOffset {
+ _codeOffset ??= const fb.Uint32Reader().vTableGet(_bp, 15, 0);
+ return _codeOffset;
+ }
+
+ @override
idl.UnlinkedConst get constExpr {
_constExpr ??= const _UnlinkedConstReader().vTableGet(_bp, 5, null);
return _constExpr;
@@ -7284,6 +7888,12 @@ class _UnlinkedVariableImpl extends Object with _UnlinkedVariableMixin implement
}
@override
+ bool get hasCodeRange {
+ _hasCodeRange ??= const fb.BoolReader().vTableGet(_bp, 14, false);
+ return _hasCodeRange;
+ }
+
+ @override
int get inferredTypeSlot {
_inferredTypeSlot ??= const fb.Uint32Reader().vTableGet(_bp, 9, 0);
return _inferredTypeSlot;
@@ -7355,8 +7965,11 @@ abstract class _UnlinkedVariableMixin implements idl.UnlinkedVariable {
Map<String, Object> toJson() {
Map<String, Object> _result = <String, Object>{};
if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value) => _value.toJson()).toList();
+ if (codeLength != 0) _result["codeLength"] = codeLength;
+ if (codeOffset != 0) _result["codeOffset"] = codeOffset;
if (constExpr != null) _result["constExpr"] = constExpr.toJson();
if (documentationComment != null) _result["documentationComment"] = documentationComment.toJson();
+ if (hasCodeRange != false) _result["hasCodeRange"] = hasCodeRange;
if (inferredTypeSlot != 0) _result["inferredTypeSlot"] = inferredTypeSlot;
if (initializer != null) _result["initializer"] = initializer.toJson();
if (isConst != false) _result["isConst"] = isConst;
@@ -7374,8 +7987,11 @@ abstract class _UnlinkedVariableMixin implements idl.UnlinkedVariable {
@override
Map<String, Object> toMap() => {
"annotations": annotations,
+ "codeLength": codeLength,
+ "codeOffset": codeOffset,
"constExpr": constExpr,
"documentationComment": documentationComment,
+ "hasCodeRange": hasCodeRange,
"inferredTypeSlot": inferredTypeSlot,
"initializer": initializer,
"isConst": isConst,

Powered by Google App Engine
This is Rietveld 408576698