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

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

Issue 1531913002: Add UnlinkedClass.hasNoSupertype property to summaries. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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/resynthesize.dart » ('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 4d3cc97ed67d8c1db6dbd78d44e01a28a4d55f95..3ce5b792c28d91029024a58162506d876175bfa2 100644
--- a/pkg/analyzer/lib/src/summary/format.dart
+++ b/pkg/analyzer/lib/src/summary/format.dart
@@ -253,6 +253,7 @@ class UnlinkedClass {
List<UnlinkedExecutable> _executables;
bool _isAbstract;
bool _isMixinApplication;
+ bool _hasNoSupertype;
UnlinkedClass.fromJson(Map json)
: _name = json["name"],
@@ -263,7 +264,8 @@ class UnlinkedClass {
_fields = json["fields"]?.map((x) => new UnlinkedVariable.fromJson(x))?.toList(),
_executables = json["executables"]?.map((x) => new UnlinkedExecutable.fromJson(x))?.toList(),
_isAbstract = json["isAbstract"],
- _isMixinApplication = json["isMixinApplication"];
+ _isMixinApplication = json["isMixinApplication"],
+ _hasNoSupertype = json["hasNoSupertype"];
String get name => _name ?? '';
List<UnlinkedTypeParam> get typeParameters => _typeParameters ?? const <UnlinkedTypeParam>[];
@@ -274,6 +276,7 @@ class UnlinkedClass {
List<UnlinkedExecutable> get executables => _executables ?? const <UnlinkedExecutable>[];
bool get isAbstract => _isAbstract ?? false;
bool get isMixinApplication => _isMixinApplication ?? false;
+ bool get hasNoSupertype => _hasNoSupertype ?? false;
}
class UnlinkedClassBuilder {
@@ -355,6 +358,14 @@ class UnlinkedClassBuilder {
}
}
+ void set hasNoSupertype(bool _value) {
+ assert(!_finished);
+ assert(!_json.containsKey("hasNoSupertype"));
+ if (_value != null) {
+ _json["hasNoSupertype"] = _value;
+ }
+ }
+
Map finish() {
assert(!_finished);
_finished = true;
@@ -362,7 +373,7 @@ class UnlinkedClassBuilder {
}
}
-UnlinkedClassBuilder encodeUnlinkedClass(builder.BuilderContext builderContext, {String name, List<UnlinkedTypeParamBuilder> typeParameters, UnlinkedTypeRefBuilder supertype, List<UnlinkedTypeRefBuilder> mixins, List<UnlinkedTypeRefBuilder> interfaces, List<UnlinkedVariableBuilder> fields, List<UnlinkedExecutableBuilder> executables, bool isAbstract, bool isMixinApplication}) {
+UnlinkedClassBuilder encodeUnlinkedClass(builder.BuilderContext builderContext, {String name, List<UnlinkedTypeParamBuilder> typeParameters, UnlinkedTypeRefBuilder supertype, List<UnlinkedTypeRefBuilder> mixins, List<UnlinkedTypeRefBuilder> interfaces, List<UnlinkedVariableBuilder> fields, List<UnlinkedExecutableBuilder> executables, bool isAbstract, bool isMixinApplication, bool hasNoSupertype}) {
UnlinkedClassBuilder builder = new UnlinkedClassBuilder(builderContext);
builder.name = name;
builder.typeParameters = typeParameters;
@@ -373,6 +384,7 @@ UnlinkedClassBuilder encodeUnlinkedClass(builder.BuilderContext builderContext,
builder.executables = executables;
builder.isAbstract = isAbstract;
builder.isMixinApplication = isMixinApplication;
+ builder.hasNoSupertype = hasNoSupertype;
return builder;
}
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/summary/resynthesize.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698