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

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

Issue 1936403002: Serialize / resynthesize 'isAsynchronous' and 'isGenerator' flags. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/summary/format.fbs » ('j') | pkg/analyzer/lib/src/summary/idl.dart » ('J')
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 9179120d17a6ff97b23b1966828b6628f563217c..a66bc7a65679e926640936052e3262f1d4895935 100644
--- a/pkg/analyzer/lib/src/summary/format.dart
+++ b/pkg/analyzer/lib/src/summary/format.dart
@@ -4208,9 +4208,11 @@ class UnlinkedExecutableBuilder extends Object with _UnlinkedExecutableMixin imp
UnlinkedDocumentationCommentBuilder _documentationComment;
int _inferredReturnTypeSlot;
bool _isAbstract;
+ bool _isAsynchronous;
bool _isConst;
bool _isExternal;
bool _isFactory;
+ bool _isGenerator;
bool _isRedirectedConstructor;
bool _isStatic;
idl.UnlinkedExecutableKind _kind;
@@ -4320,6 +4322,17 @@ class UnlinkedExecutableBuilder extends Object with _UnlinkedExecutableMixin imp
}
@override
+ bool get isAsynchronous => _isAsynchronous ??= false;
+
+ /**
+ * Indicates whether the executable has body marked as being asynchronous.
+ */
+ void set isAsynchronous(bool _value) {
+ assert(!_finished);
+ _isAsynchronous = _value;
+ }
+
+ @override
bool get isConst => _isConst ??= false;
/**
@@ -4353,6 +4366,17 @@ class UnlinkedExecutableBuilder extends Object with _UnlinkedExecutableMixin imp
}
@override
+ bool get isGenerator => _isGenerator ??= false;
+
+ /**
+ * Indicates whether the executable has body marked as being a generator.
+ */
+ void set isGenerator(bool _value) {
+ assert(!_finished);
+ _isGenerator = _value;
+ }
+
+ @override
bool get isRedirectedConstructor => _isRedirectedConstructor ??= false;
/**
@@ -4566,7 +4590,7 @@ class UnlinkedExecutableBuilder extends Object with _UnlinkedExecutableMixin imp
_visibleOffset = _value;
}
- UnlinkedExecutableBuilder({List<UnlinkedConstBuilder> annotations, CodeRangeBuilder codeRange, List<UnlinkedConstructorInitializerBuilder> constantInitializers, int constCycleSlot, 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})
+ UnlinkedExecutableBuilder({List<UnlinkedConstBuilder> annotations, CodeRangeBuilder codeRange, List<UnlinkedConstructorInitializerBuilder> constantInitializers, int constCycleSlot, UnlinkedDocumentationCommentBuilder documentationComment, int inferredReturnTypeSlot, bool isAbstract, bool isAsynchronous, bool isConst, bool isExternal, bool isFactory, bool isGenerator, 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,
_codeRange = codeRange,
_constantInitializers = constantInitializers,
@@ -4574,9 +4598,11 @@ class UnlinkedExecutableBuilder extends Object with _UnlinkedExecutableMixin imp
_documentationComment = documentationComment,
_inferredReturnTypeSlot = inferredReturnTypeSlot,
_isAbstract = isAbstract,
+ _isAsynchronous = isAsynchronous,
_isConst = isConst,
_isExternal = isExternal,
_isFactory = isFactory,
+ _isGenerator = isGenerator,
_isRedirectedConstructor = isRedirectedConstructor,
_isStatic = isStatic,
_kind = kind,
@@ -4692,6 +4718,9 @@ class UnlinkedExecutableBuilder extends Object with _UnlinkedExecutableMixin imp
if (_isAbstract == true) {
fbBuilder.addBool(10, true);
}
+ if (_isAsynchronous == true) {
+ fbBuilder.addBool(27, true);
+ }
if (_isConst == true) {
fbBuilder.addBool(12, true);
}
@@ -4701,6 +4730,9 @@ class UnlinkedExecutableBuilder extends Object with _UnlinkedExecutableMixin imp
if (_isFactory == true) {
fbBuilder.addBool(8, true);
}
+ if (_isGenerator == true) {
+ fbBuilder.addBool(28, true);
+ }
if (_isRedirectedConstructor == true) {
fbBuilder.addBool(13, true);
}
@@ -4775,9 +4807,11 @@ class _UnlinkedExecutableImpl extends Object with _UnlinkedExecutableMixin imple
idl.UnlinkedDocumentationComment _documentationComment;
int _inferredReturnTypeSlot;
bool _isAbstract;
+ bool _isAsynchronous;
bool _isConst;
bool _isExternal;
bool _isFactory;
+ bool _isGenerator;
bool _isRedirectedConstructor;
bool _isStatic;
idl.UnlinkedExecutableKind _kind;
@@ -4839,6 +4873,12 @@ class _UnlinkedExecutableImpl extends Object with _UnlinkedExecutableMixin imple
}
@override
+ bool get isAsynchronous {
+ _isAsynchronous ??= const fb.BoolReader().vTableGet(_bp, 27, false);
+ return _isAsynchronous;
+ }
+
+ @override
bool get isConst {
_isConst ??= const fb.BoolReader().vTableGet(_bp, 12, false);
return _isConst;
@@ -4857,6 +4897,12 @@ class _UnlinkedExecutableImpl extends Object with _UnlinkedExecutableMixin imple
}
@override
+ bool get isGenerator {
+ _isGenerator ??= const fb.BoolReader().vTableGet(_bp, 28, false);
+ return _isGenerator;
+ }
+
+ @override
bool get isRedirectedConstructor {
_isRedirectedConstructor ??= const fb.BoolReader().vTableGet(_bp, 13, false);
return _isRedirectedConstructor;
@@ -4970,9 +5016,11 @@ abstract class _UnlinkedExecutableMixin implements idl.UnlinkedExecutable {
if (documentationComment != null) _result["documentationComment"] = documentationComment.toJson();
if (inferredReturnTypeSlot != 0) _result["inferredReturnTypeSlot"] = inferredReturnTypeSlot;
if (isAbstract != false) _result["isAbstract"] = isAbstract;
+ if (isAsynchronous != false) _result["isAsynchronous"] = isAsynchronous;
if (isConst != false) _result["isConst"] = isConst;
if (isExternal != false) _result["isExternal"] = isExternal;
if (isFactory != false) _result["isFactory"] = isFactory;
+ if (isGenerator != false) _result["isGenerator"] = isGenerator;
if (isRedirectedConstructor != false) _result["isRedirectedConstructor"] = isRedirectedConstructor;
if (isStatic != false) _result["isStatic"] = isStatic;
if (kind != idl.UnlinkedExecutableKind.functionOrMethod) _result["kind"] = kind.toString().split('.')[1];
@@ -5002,9 +5050,11 @@ abstract class _UnlinkedExecutableMixin implements idl.UnlinkedExecutable {
"documentationComment": documentationComment,
"inferredReturnTypeSlot": inferredReturnTypeSlot,
"isAbstract": isAbstract,
+ "isAsynchronous": isAsynchronous,
"isConst": isConst,
"isExternal": isExternal,
"isFactory": isFactory,
+ "isGenerator": isGenerator,
"isRedirectedConstructor": isRedirectedConstructor,
"isStatic": isStatic,
"kind": kind,
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/summary/format.fbs » ('j') | pkg/analyzer/lib/src/summary/idl.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698