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

Side by Side Diff: pkg/analyzer/lib/src/summary/format.dart

Issue 1826353002: Add a fallback mode for building summaries. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/summary/format.fbs » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 // 4 //
5 // This file has been automatically generated. Please do not edit it manually. 5 // This file has been automatically generated. Please do not edit it manually.
6 // To regenerate the file, use the script "pkg/analyzer/tool/generate_files". 6 // To regenerate the file, use the script "pkg/analyzer/tool/generate_files".
7 7
8 library analyzer.src.summary.format; 8 library analyzer.src.summary.format;
9 9
10 import 'flat_buffers.dart' as fb; 10 import 'flat_buffers.dart' as fb;
(...skipping 957 matching lines...) Expand 10 before | Expand all | Expand 10 after
968 968
969 @override 969 @override
970 String toString() => convert.JSON.encode(toJson()); 970 String toString() => convert.JSON.encode(toJson());
971 } 971 }
972 972
973 class LinkedLibraryBuilder extends Object with _LinkedLibraryMixin implements id l.LinkedLibrary { 973 class LinkedLibraryBuilder extends Object with _LinkedLibraryMixin implements id l.LinkedLibrary {
974 bool _finished = false; 974 bool _finished = false;
975 975
976 List<LinkedDependencyBuilder> _dependencies; 976 List<LinkedDependencyBuilder> _dependencies;
977 List<LinkedExportNameBuilder> _exportNames; 977 List<LinkedExportNameBuilder> _exportNames;
978 bool _fallbackMode;
978 List<int> _importDependencies; 979 List<int> _importDependencies;
979 int _numPrelinkedDependencies; 980 int _numPrelinkedDependencies;
980 List<LinkedUnitBuilder> _units; 981 List<LinkedUnitBuilder> _units;
981 982
982 @override 983 @override
983 List<LinkedDependencyBuilder> get dependencies => _dependencies ??= <LinkedDep endencyBuilder>[]; 984 List<LinkedDependencyBuilder> get dependencies => _dependencies ??= <LinkedDep endencyBuilder>[];
984 985
985 /** 986 /**
986 * The libraries that this library depends on (either via an explicit import 987 * The libraries that this library depends on (either via an explicit import
987 * statement or via the implicit dependencies on `dart:core` and 988 * statement or via the implicit dependencies on `dart:core` and
(...skipping 24 matching lines...) Expand all
1012 * brought into the namespace via `export` directives). 1013 * brought into the namespace via `export` directives).
1013 * 1014 *
1014 * Sorted by name. 1015 * Sorted by name.
1015 */ 1016 */
1016 void set exportNames(List<LinkedExportNameBuilder> _value) { 1017 void set exportNames(List<LinkedExportNameBuilder> _value) {
1017 assert(!_finished); 1018 assert(!_finished);
1018 _exportNames = _value; 1019 _exportNames = _value;
1019 } 1020 }
1020 1021
1021 @override 1022 @override
1023 bool get fallbackMode => _fallbackMode ??= false;
1024
1025 /**
1026 * Indicates whether this library was summarized in "fallback mode". If
1027 * true, all other fields in the data structure have their default values.
1028 */
1029 void set fallbackMode(bool _value) {
1030 assert(!_finished);
1031 _fallbackMode = _value;
1032 }
1033
1034 @override
1022 List<int> get importDependencies => _importDependencies ??= <int>[]; 1035 List<int> get importDependencies => _importDependencies ??= <int>[];
1023 1036
1024 /** 1037 /**
1025 * For each import in [UnlinkedUnit.imports], an index into [dependencies] 1038 * For each import in [UnlinkedUnit.imports], an index into [dependencies]
1026 * of the library being imported. 1039 * of the library being imported.
1027 */ 1040 */
1028 void set importDependencies(List<int> _value) { 1041 void set importDependencies(List<int> _value) {
1029 assert(!_finished); 1042 assert(!_finished);
1030 assert(_value == null || _value.every((e) => e >= 0)); 1043 assert(_value == null || _value.every((e) => e >= 0));
1031 _importDependencies = _value; 1044 _importDependencies = _value;
(...skipping 20 matching lines...) Expand all
1052 * The linked summary of all the compilation units constituting the 1065 * The linked summary of all the compilation units constituting the
1053 * library. The summary of the defining compilation unit is listed first, 1066 * library. The summary of the defining compilation unit is listed first,
1054 * followed by the summary of each part, in the order of the `part` 1067 * followed by the summary of each part, in the order of the `part`
1055 * declarations in the defining compilation unit. 1068 * declarations in the defining compilation unit.
1056 */ 1069 */
1057 void set units(List<LinkedUnitBuilder> _value) { 1070 void set units(List<LinkedUnitBuilder> _value) {
1058 assert(!_finished); 1071 assert(!_finished);
1059 _units = _value; 1072 _units = _value;
1060 } 1073 }
1061 1074
1062 LinkedLibraryBuilder({List<LinkedDependencyBuilder> dependencies, List<LinkedE xportNameBuilder> exportNames, List<int> importDependencies, int numPrelinkedDep endencies, List<LinkedUnitBuilder> units}) 1075 LinkedLibraryBuilder({List<LinkedDependencyBuilder> dependencies, List<LinkedE xportNameBuilder> exportNames, bool fallbackMode, List<int> importDependencies, int numPrelinkedDependencies, List<LinkedUnitBuilder> units})
1063 : _dependencies = dependencies, 1076 : _dependencies = dependencies,
1064 _exportNames = exportNames, 1077 _exportNames = exportNames,
1078 _fallbackMode = fallbackMode,
1065 _importDependencies = importDependencies, 1079 _importDependencies = importDependencies,
1066 _numPrelinkedDependencies = numPrelinkedDependencies, 1080 _numPrelinkedDependencies = numPrelinkedDependencies,
1067 _units = units; 1081 _units = units;
1068 1082
1069 /** 1083 /**
1070 * Flush [informative] data recursively. 1084 * Flush [informative] data recursively.
1071 */ 1085 */
1072 void flushInformative() { 1086 void flushInformative() {
1073 _dependencies?.forEach((b) => b.flushInformative()); 1087 _dependencies?.forEach((b) => b.flushInformative());
1074 _exportNames?.forEach((b) => b.flushInformative()); 1088 _exportNames?.forEach((b) => b.flushInformative());
(...skipping 24 matching lines...) Expand all
1099 if (!(_units == null || _units.isEmpty)) { 1113 if (!(_units == null || _units.isEmpty)) {
1100 offset_units = fbBuilder.writeList(_units.map((b) => b.finish(fbBuilder)). toList()); 1114 offset_units = fbBuilder.writeList(_units.map((b) => b.finish(fbBuilder)). toList());
1101 } 1115 }
1102 fbBuilder.startTable(); 1116 fbBuilder.startTable();
1103 if (offset_dependencies != null) { 1117 if (offset_dependencies != null) {
1104 fbBuilder.addOffset(0, offset_dependencies); 1118 fbBuilder.addOffset(0, offset_dependencies);
1105 } 1119 }
1106 if (offset_exportNames != null) { 1120 if (offset_exportNames != null) {
1107 fbBuilder.addOffset(4, offset_exportNames); 1121 fbBuilder.addOffset(4, offset_exportNames);
1108 } 1122 }
1123 if (_fallbackMode == true) {
1124 fbBuilder.addBool(5, true);
1125 }
1109 if (offset_importDependencies != null) { 1126 if (offset_importDependencies != null) {
1110 fbBuilder.addOffset(1, offset_importDependencies); 1127 fbBuilder.addOffset(1, offset_importDependencies);
1111 } 1128 }
1112 if (_numPrelinkedDependencies != null && _numPrelinkedDependencies != 0) { 1129 if (_numPrelinkedDependencies != null && _numPrelinkedDependencies != 0) {
1113 fbBuilder.addUint32(2, _numPrelinkedDependencies); 1130 fbBuilder.addUint32(2, _numPrelinkedDependencies);
1114 } 1131 }
1115 if (offset_units != null) { 1132 if (offset_units != null) {
1116 fbBuilder.addOffset(3, offset_units); 1133 fbBuilder.addOffset(3, offset_units);
1117 } 1134 }
1118 return fbBuilder.endTable(); 1135 return fbBuilder.endTable();
(...skipping 12 matching lines...) Expand all
1131 _LinkedLibraryImpl createObject(fb.BufferPointer bp) => new _LinkedLibraryImpl (bp); 1148 _LinkedLibraryImpl createObject(fb.BufferPointer bp) => new _LinkedLibraryImpl (bp);
1132 } 1149 }
1133 1150
1134 class _LinkedLibraryImpl extends Object with _LinkedLibraryMixin implements idl. LinkedLibrary { 1151 class _LinkedLibraryImpl extends Object with _LinkedLibraryMixin implements idl. LinkedLibrary {
1135 final fb.BufferPointer _bp; 1152 final fb.BufferPointer _bp;
1136 1153
1137 _LinkedLibraryImpl(this._bp); 1154 _LinkedLibraryImpl(this._bp);
1138 1155
1139 List<idl.LinkedDependency> _dependencies; 1156 List<idl.LinkedDependency> _dependencies;
1140 List<idl.LinkedExportName> _exportNames; 1157 List<idl.LinkedExportName> _exportNames;
1158 bool _fallbackMode;
1141 List<int> _importDependencies; 1159 List<int> _importDependencies;
1142 int _numPrelinkedDependencies; 1160 int _numPrelinkedDependencies;
1143 List<idl.LinkedUnit> _units; 1161 List<idl.LinkedUnit> _units;
1144 1162
1145 @override 1163 @override
1146 List<idl.LinkedDependency> get dependencies { 1164 List<idl.LinkedDependency> get dependencies {
1147 _dependencies ??= const fb.ListReader<idl.LinkedDependency>(const _LinkedDep endencyReader()).vTableGet(_bp, 0, const <idl.LinkedDependency>[]); 1165 _dependencies ??= const fb.ListReader<idl.LinkedDependency>(const _LinkedDep endencyReader()).vTableGet(_bp, 0, const <idl.LinkedDependency>[]);
1148 return _dependencies; 1166 return _dependencies;
1149 } 1167 }
1150 1168
1151 @override 1169 @override
1152 List<idl.LinkedExportName> get exportNames { 1170 List<idl.LinkedExportName> get exportNames {
1153 _exportNames ??= const fb.ListReader<idl.LinkedExportName>(const _LinkedExpo rtNameReader()).vTableGet(_bp, 4, const <idl.LinkedExportName>[]); 1171 _exportNames ??= const fb.ListReader<idl.LinkedExportName>(const _LinkedExpo rtNameReader()).vTableGet(_bp, 4, const <idl.LinkedExportName>[]);
1154 return _exportNames; 1172 return _exportNames;
1155 } 1173 }
1156 1174
1157 @override 1175 @override
1176 bool get fallbackMode {
1177 _fallbackMode ??= const fb.BoolReader().vTableGet(_bp, 5, false);
1178 return _fallbackMode;
1179 }
1180
1181 @override
1158 List<int> get importDependencies { 1182 List<int> get importDependencies {
1159 _importDependencies ??= const fb.Uint32ListReader().vTableGet(_bp, 1, const <int>[]); 1183 _importDependencies ??= const fb.Uint32ListReader().vTableGet(_bp, 1, const <int>[]);
1160 return _importDependencies; 1184 return _importDependencies;
1161 } 1185 }
1162 1186
1163 @override 1187 @override
1164 int get numPrelinkedDependencies { 1188 int get numPrelinkedDependencies {
1165 _numPrelinkedDependencies ??= const fb.Uint32Reader().vTableGet(_bp, 2, 0); 1189 _numPrelinkedDependencies ??= const fb.Uint32Reader().vTableGet(_bp, 2, 0);
1166 return _numPrelinkedDependencies; 1190 return _numPrelinkedDependencies;
1167 } 1191 }
1168 1192
1169 @override 1193 @override
1170 List<idl.LinkedUnit> get units { 1194 List<idl.LinkedUnit> get units {
1171 _units ??= const fb.ListReader<idl.LinkedUnit>(const _LinkedUnitReader()).vT ableGet(_bp, 3, const <idl.LinkedUnit>[]); 1195 _units ??= const fb.ListReader<idl.LinkedUnit>(const _LinkedUnitReader()).vT ableGet(_bp, 3, const <idl.LinkedUnit>[]);
1172 return _units; 1196 return _units;
1173 } 1197 }
1174 } 1198 }
1175 1199
1176 abstract class _LinkedLibraryMixin implements idl.LinkedLibrary { 1200 abstract class _LinkedLibraryMixin implements idl.LinkedLibrary {
1177 @override 1201 @override
1178 Map<String, Object> toJson() { 1202 Map<String, Object> toJson() {
1179 Map<String, Object> _result = <String, Object>{}; 1203 Map<String, Object> _result = <String, Object>{};
1180 if (dependencies.isNotEmpty) _result["dependencies"] = dependencies.map((_va lue) => _value.toJson()).toList(); 1204 if (dependencies.isNotEmpty) _result["dependencies"] = dependencies.map((_va lue) => _value.toJson()).toList();
1181 if (exportNames.isNotEmpty) _result["exportNames"] = exportNames.map((_value ) => _value.toJson()).toList(); 1205 if (exportNames.isNotEmpty) _result["exportNames"] = exportNames.map((_value ) => _value.toJson()).toList();
1206 if (fallbackMode != false) _result["fallbackMode"] = fallbackMode;
1182 if (importDependencies.isNotEmpty) _result["importDependencies"] = importDep endencies; 1207 if (importDependencies.isNotEmpty) _result["importDependencies"] = importDep endencies;
1183 if (numPrelinkedDependencies != 0) _result["numPrelinkedDependencies"] = num PrelinkedDependencies; 1208 if (numPrelinkedDependencies != 0) _result["numPrelinkedDependencies"] = num PrelinkedDependencies;
1184 if (units.isNotEmpty) _result["units"] = units.map((_value) => _value.toJson ()).toList(); 1209 if (units.isNotEmpty) _result["units"] = units.map((_value) => _value.toJson ()).toList();
1185 return _result; 1210 return _result;
1186 } 1211 }
1187 1212
1188 @override 1213 @override
1189 Map<String, Object> toMap() => { 1214 Map<String, Object> toMap() => {
1190 "dependencies": dependencies, 1215 "dependencies": dependencies,
1191 "exportNames": exportNames, 1216 "exportNames": exportNames,
1217 "fallbackMode": fallbackMode,
1192 "importDependencies": importDependencies, 1218 "importDependencies": importDependencies,
1193 "numPrelinkedDependencies": numPrelinkedDependencies, 1219 "numPrelinkedDependencies": numPrelinkedDependencies,
1194 "units": units, 1220 "units": units,
1195 }; 1221 };
1196 1222
1197 @override 1223 @override
1198 String toString() => convert.JSON.encode(toJson()); 1224 String toString() => convert.JSON.encode(toJson());
1199 } 1225 }
1200 1226
1201 class LinkedReferenceBuilder extends Object with _LinkedReferenceMixin implement s idl.LinkedReference { 1227 class LinkedReferenceBuilder extends Object with _LinkedReferenceMixin implement s idl.LinkedReference {
(...skipping 6004 matching lines...) Expand 10 before | Expand all | Expand 10 after
7206 "nameOffset": nameOffset, 7232 "nameOffset": nameOffset,
7207 }; 7233 };
7208 7234
7209 @override 7235 @override
7210 String toString() => convert.JSON.encode(toJson()); 7236 String toString() => convert.JSON.encode(toJson());
7211 } 7237 }
7212 7238
7213 class UnlinkedUnitBuilder extends Object with _UnlinkedUnitMixin implements idl. UnlinkedUnit { 7239 class UnlinkedUnitBuilder extends Object with _UnlinkedUnitMixin implements idl. UnlinkedUnit {
7214 bool _finished = false; 7240 bool _finished = false;
7215 7241
7242 String _fallbackModePath;
7216 List<UnlinkedClassBuilder> _classes; 7243 List<UnlinkedClassBuilder> _classes;
7217 CodeRangeBuilder _codeRange; 7244 CodeRangeBuilder _codeRange;
7218 List<UnlinkedEnumBuilder> _enums; 7245 List<UnlinkedEnumBuilder> _enums;
7219 List<UnlinkedExecutableBuilder> _executables; 7246 List<UnlinkedExecutableBuilder> _executables;
7220 List<UnlinkedExportNonPublicBuilder> _exports; 7247 List<UnlinkedExportNonPublicBuilder> _exports;
7221 List<UnlinkedImportBuilder> _imports; 7248 List<UnlinkedImportBuilder> _imports;
7222 List<UnlinkedConstBuilder> _libraryAnnotations; 7249 List<UnlinkedConstBuilder> _libraryAnnotations;
7223 UnlinkedDocumentationCommentBuilder _libraryDocumentationComment; 7250 UnlinkedDocumentationCommentBuilder _libraryDocumentationComment;
7224 String _libraryName; 7251 String _libraryName;
7225 int _libraryNameLength; 7252 int _libraryNameLength;
7226 int _libraryNameOffset; 7253 int _libraryNameOffset;
7227 List<UnlinkedPartBuilder> _parts; 7254 List<UnlinkedPartBuilder> _parts;
7228 UnlinkedPublicNamespaceBuilder _publicNamespace; 7255 UnlinkedPublicNamespaceBuilder _publicNamespace;
7229 List<UnlinkedReferenceBuilder> _references; 7256 List<UnlinkedReferenceBuilder> _references;
7230 List<UnlinkedTypedefBuilder> _typedefs; 7257 List<UnlinkedTypedefBuilder> _typedefs;
7231 List<UnlinkedVariableBuilder> _variables; 7258 List<UnlinkedVariableBuilder> _variables;
7232 7259
7233 @override 7260 @override
7261 String get fallbackModePath => _fallbackModePath ??= '';
7262
7263 /**
7264 * If this compilation unit was summarized in fallback mode, the path where
7265 * the compilation unit may be found on disk. Otherwise empty.
7266 *
7267 * When this field is non-empty, all other fields in the data structure have
7268 * their default values.
7269 */
7270 void set fallbackModePath(String _value) {
7271 assert(!_finished);
7272 _fallbackModePath = _value;
7273 }
7274
7275 @override
7234 List<UnlinkedClassBuilder> get classes => _classes ??= <UnlinkedClassBuilder>[ ]; 7276 List<UnlinkedClassBuilder> get classes => _classes ??= <UnlinkedClassBuilder>[ ];
7235 7277
7236 /** 7278 /**
7237 * Classes declared in the compilation unit. 7279 * Classes declared in the compilation unit.
7238 */ 7280 */
7239 void set classes(List<UnlinkedClassBuilder> _value) { 7281 void set classes(List<UnlinkedClassBuilder> _value) {
7240 assert(!_finished); 7282 assert(!_finished);
7241 _classes = _value; 7283 _classes = _value;
7242 } 7284 }
7243 7285
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
7410 List<UnlinkedVariableBuilder> get variables => _variables ??= <UnlinkedVariabl eBuilder>[]; 7452 List<UnlinkedVariableBuilder> get variables => _variables ??= <UnlinkedVariabl eBuilder>[];
7411 7453
7412 /** 7454 /**
7413 * Top level variables declared in the compilation unit. 7455 * Top level variables declared in the compilation unit.
7414 */ 7456 */
7415 void set variables(List<UnlinkedVariableBuilder> _value) { 7457 void set variables(List<UnlinkedVariableBuilder> _value) {
7416 assert(!_finished); 7458 assert(!_finished);
7417 _variables = _value; 7459 _variables = _value;
7418 } 7460 }
7419 7461
7420 UnlinkedUnitBuilder({List<UnlinkedClassBuilder> classes, CodeRangeBuilder code Range, List<UnlinkedEnumBuilder> enums, List<UnlinkedExecutableBuilder> executab les, List<UnlinkedExportNonPublicBuilder> exports, List<UnlinkedImportBuilder> i mports, List<UnlinkedConstBuilder> libraryAnnotations, UnlinkedDocumentationComm entBuilder libraryDocumentationComment, String libraryName, int libraryNameLengt h, int libraryNameOffset, List<UnlinkedPartBuilder> parts, UnlinkedPublicNamespa ceBuilder publicNamespace, List<UnlinkedReferenceBuilder> references, List<Unlin kedTypedefBuilder> typedefs, List<UnlinkedVariableBuilder> variables}) 7462 UnlinkedUnitBuilder({String fallbackModePath, List<UnlinkedClassBuilder> class es, CodeRangeBuilder codeRange, List<UnlinkedEnumBuilder> enums, List<UnlinkedEx ecutableBuilder> executables, List<UnlinkedExportNonPublicBuilder> exports, List <UnlinkedImportBuilder> imports, List<UnlinkedConstBuilder> libraryAnnotations, UnlinkedDocumentationCommentBuilder libraryDocumentationComment, String libraryN ame, int libraryNameLength, int libraryNameOffset, List<UnlinkedPartBuilder> par ts, UnlinkedPublicNamespaceBuilder publicNamespace, List<UnlinkedReferenceBuilde r> references, List<UnlinkedTypedefBuilder> typedefs, List<UnlinkedVariableBuild er> variables})
7421 : _classes = classes, 7463 : _fallbackModePath = fallbackModePath,
7464 _classes = classes,
7422 _codeRange = codeRange, 7465 _codeRange = codeRange,
7423 _enums = enums, 7466 _enums = enums,
7424 _executables = executables, 7467 _executables = executables,
7425 _exports = exports, 7468 _exports = exports,
7426 _imports = imports, 7469 _imports = imports,
7427 _libraryAnnotations = libraryAnnotations, 7470 _libraryAnnotations = libraryAnnotations,
7428 _libraryDocumentationComment = libraryDocumentationComment, 7471 _libraryDocumentationComment = libraryDocumentationComment,
7429 _libraryName = libraryName, 7472 _libraryName = libraryName,
7430 _libraryNameLength = libraryNameLength, 7473 _libraryNameLength = libraryNameLength,
7431 _libraryNameOffset = libraryNameOffset, 7474 _libraryNameOffset = libraryNameOffset,
(...skipping 25 matching lines...) Expand all
7457 } 7500 }
7458 7501
7459 List<int> toBuffer() { 7502 List<int> toBuffer() {
7460 fb.Builder fbBuilder = new fb.Builder(); 7503 fb.Builder fbBuilder = new fb.Builder();
7461 return fbBuilder.finish(finish(fbBuilder), "UUnt"); 7504 return fbBuilder.finish(finish(fbBuilder), "UUnt");
7462 } 7505 }
7463 7506
7464 fb.Offset finish(fb.Builder fbBuilder) { 7507 fb.Offset finish(fb.Builder fbBuilder) {
7465 assert(!_finished); 7508 assert(!_finished);
7466 _finished = true; 7509 _finished = true;
7510 fb.Offset offset_fallbackModePath;
7467 fb.Offset offset_classes; 7511 fb.Offset offset_classes;
7468 fb.Offset offset_codeRange; 7512 fb.Offset offset_codeRange;
7469 fb.Offset offset_enums; 7513 fb.Offset offset_enums;
7470 fb.Offset offset_executables; 7514 fb.Offset offset_executables;
7471 fb.Offset offset_exports; 7515 fb.Offset offset_exports;
7472 fb.Offset offset_imports; 7516 fb.Offset offset_imports;
7473 fb.Offset offset_libraryAnnotations; 7517 fb.Offset offset_libraryAnnotations;
7474 fb.Offset offset_libraryDocumentationComment; 7518 fb.Offset offset_libraryDocumentationComment;
7475 fb.Offset offset_libraryName; 7519 fb.Offset offset_libraryName;
7476 fb.Offset offset_parts; 7520 fb.Offset offset_parts;
7477 fb.Offset offset_publicNamespace; 7521 fb.Offset offset_publicNamespace;
7478 fb.Offset offset_references; 7522 fb.Offset offset_references;
7479 fb.Offset offset_typedefs; 7523 fb.Offset offset_typedefs;
7480 fb.Offset offset_variables; 7524 fb.Offset offset_variables;
7525 if (_fallbackModePath != null) {
7526 offset_fallbackModePath = fbBuilder.writeString(_fallbackModePath);
7527 }
7481 if (!(_classes == null || _classes.isEmpty)) { 7528 if (!(_classes == null || _classes.isEmpty)) {
7482 offset_classes = fbBuilder.writeList(_classes.map((b) => b.finish(fbBuilde r)).toList()); 7529 offset_classes = fbBuilder.writeList(_classes.map((b) => b.finish(fbBuilde r)).toList());
7483 } 7530 }
7484 if (_codeRange != null) { 7531 if (_codeRange != null) {
7485 offset_codeRange = _codeRange.finish(fbBuilder); 7532 offset_codeRange = _codeRange.finish(fbBuilder);
7486 } 7533 }
7487 if (!(_enums == null || _enums.isEmpty)) { 7534 if (!(_enums == null || _enums.isEmpty)) {
7488 offset_enums = fbBuilder.writeList(_enums.map((b) => b.finish(fbBuilder)). toList()); 7535 offset_enums = fbBuilder.writeList(_enums.map((b) => b.finish(fbBuilder)). toList());
7489 } 7536 }
7490 if (!(_executables == null || _executables.isEmpty)) { 7537 if (!(_executables == null || _executables.isEmpty)) {
(...skipping 23 matching lines...) Expand all
7514 if (!(_references == null || _references.isEmpty)) { 7561 if (!(_references == null || _references.isEmpty)) {
7515 offset_references = fbBuilder.writeList(_references.map((b) => b.finish(fb Builder)).toList()); 7562 offset_references = fbBuilder.writeList(_references.map((b) => b.finish(fb Builder)).toList());
7516 } 7563 }
7517 if (!(_typedefs == null || _typedefs.isEmpty)) { 7564 if (!(_typedefs == null || _typedefs.isEmpty)) {
7518 offset_typedefs = fbBuilder.writeList(_typedefs.map((b) => b.finish(fbBuil der)).toList()); 7565 offset_typedefs = fbBuilder.writeList(_typedefs.map((b) => b.finish(fbBuil der)).toList());
7519 } 7566 }
7520 if (!(_variables == null || _variables.isEmpty)) { 7567 if (!(_variables == null || _variables.isEmpty)) {
7521 offset_variables = fbBuilder.writeList(_variables.map((b) => b.finish(fbBu ilder)).toList()); 7568 offset_variables = fbBuilder.writeList(_variables.map((b) => b.finish(fbBu ilder)).toList());
7522 } 7569 }
7523 fbBuilder.startTable(); 7570 fbBuilder.startTable();
7571 if (offset_fallbackModePath != null) {
7572 fbBuilder.addOffset(16, offset_fallbackModePath);
7573 }
7524 if (offset_classes != null) { 7574 if (offset_classes != null) {
7525 fbBuilder.addOffset(2, offset_classes); 7575 fbBuilder.addOffset(2, offset_classes);
7526 } 7576 }
7527 if (offset_codeRange != null) { 7577 if (offset_codeRange != null) {
7528 fbBuilder.addOffset(15, offset_codeRange); 7578 fbBuilder.addOffset(15, offset_codeRange);
7529 } 7579 }
7530 if (offset_enums != null) { 7580 if (offset_enums != null) {
7531 fbBuilder.addOffset(12, offset_enums); 7581 fbBuilder.addOffset(12, offset_enums);
7532 } 7582 }
7533 if (offset_executables != null) { 7583 if (offset_executables != null) {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
7583 7633
7584 @override 7634 @override
7585 _UnlinkedUnitImpl createObject(fb.BufferPointer bp) => new _UnlinkedUnitImpl(b p); 7635 _UnlinkedUnitImpl createObject(fb.BufferPointer bp) => new _UnlinkedUnitImpl(b p);
7586 } 7636 }
7587 7637
7588 class _UnlinkedUnitImpl extends Object with _UnlinkedUnitMixin implements idl.Un linkedUnit { 7638 class _UnlinkedUnitImpl extends Object with _UnlinkedUnitMixin implements idl.Un linkedUnit {
7589 final fb.BufferPointer _bp; 7639 final fb.BufferPointer _bp;
7590 7640
7591 _UnlinkedUnitImpl(this._bp); 7641 _UnlinkedUnitImpl(this._bp);
7592 7642
7643 String _fallbackModePath;
7593 List<idl.UnlinkedClass> _classes; 7644 List<idl.UnlinkedClass> _classes;
7594 idl.CodeRange _codeRange; 7645 idl.CodeRange _codeRange;
7595 List<idl.UnlinkedEnum> _enums; 7646 List<idl.UnlinkedEnum> _enums;
7596 List<idl.UnlinkedExecutable> _executables; 7647 List<idl.UnlinkedExecutable> _executables;
7597 List<idl.UnlinkedExportNonPublic> _exports; 7648 List<idl.UnlinkedExportNonPublic> _exports;
7598 List<idl.UnlinkedImport> _imports; 7649 List<idl.UnlinkedImport> _imports;
7599 List<idl.UnlinkedConst> _libraryAnnotations; 7650 List<idl.UnlinkedConst> _libraryAnnotations;
7600 idl.UnlinkedDocumentationComment _libraryDocumentationComment; 7651 idl.UnlinkedDocumentationComment _libraryDocumentationComment;
7601 String _libraryName; 7652 String _libraryName;
7602 int _libraryNameLength; 7653 int _libraryNameLength;
7603 int _libraryNameOffset; 7654 int _libraryNameOffset;
7604 List<idl.UnlinkedPart> _parts; 7655 List<idl.UnlinkedPart> _parts;
7605 idl.UnlinkedPublicNamespace _publicNamespace; 7656 idl.UnlinkedPublicNamespace _publicNamespace;
7606 List<idl.UnlinkedReference> _references; 7657 List<idl.UnlinkedReference> _references;
7607 List<idl.UnlinkedTypedef> _typedefs; 7658 List<idl.UnlinkedTypedef> _typedefs;
7608 List<idl.UnlinkedVariable> _variables; 7659 List<idl.UnlinkedVariable> _variables;
7609 7660
7610 @override 7661 @override
7662 String get fallbackModePath {
7663 _fallbackModePath ??= const fb.StringReader().vTableGet(_bp, 16, '');
7664 return _fallbackModePath;
7665 }
7666
7667 @override
7611 List<idl.UnlinkedClass> get classes { 7668 List<idl.UnlinkedClass> get classes {
7612 _classes ??= const fb.ListReader<idl.UnlinkedClass>(const _UnlinkedClassRead er()).vTableGet(_bp, 2, const <idl.UnlinkedClass>[]); 7669 _classes ??= const fb.ListReader<idl.UnlinkedClass>(const _UnlinkedClassRead er()).vTableGet(_bp, 2, const <idl.UnlinkedClass>[]);
7613 return _classes; 7670 return _classes;
7614 } 7671 }
7615 7672
7616 @override 7673 @override
7617 idl.CodeRange get codeRange { 7674 idl.CodeRange get codeRange {
7618 _codeRange ??= const _CodeRangeReader().vTableGet(_bp, 15, null); 7675 _codeRange ??= const _CodeRangeReader().vTableGet(_bp, 15, null);
7619 return _codeRange; 7676 return _codeRange;
7620 } 7677 }
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
7701 List<idl.UnlinkedVariable> get variables { 7758 List<idl.UnlinkedVariable> get variables {
7702 _variables ??= const fb.ListReader<idl.UnlinkedVariable>(const _UnlinkedVari ableReader()).vTableGet(_bp, 3, const <idl.UnlinkedVariable>[]); 7759 _variables ??= const fb.ListReader<idl.UnlinkedVariable>(const _UnlinkedVari ableReader()).vTableGet(_bp, 3, const <idl.UnlinkedVariable>[]);
7703 return _variables; 7760 return _variables;
7704 } 7761 }
7705 } 7762 }
7706 7763
7707 abstract class _UnlinkedUnitMixin implements idl.UnlinkedUnit { 7764 abstract class _UnlinkedUnitMixin implements idl.UnlinkedUnit {
7708 @override 7765 @override
7709 Map<String, Object> toJson() { 7766 Map<String, Object> toJson() {
7710 Map<String, Object> _result = <String, Object>{}; 7767 Map<String, Object> _result = <String, Object>{};
7768 if (fallbackModePath != '') _result["fallbackModePath"] = fallbackModePath;
7711 if (classes.isNotEmpty) _result["classes"] = classes.map((_value) => _value. toJson()).toList(); 7769 if (classes.isNotEmpty) _result["classes"] = classes.map((_value) => _value. toJson()).toList();
7712 if (codeRange != null) _result["codeRange"] = codeRange.toJson(); 7770 if (codeRange != null) _result["codeRange"] = codeRange.toJson();
7713 if (enums.isNotEmpty) _result["enums"] = enums.map((_value) => _value.toJson ()).toList(); 7771 if (enums.isNotEmpty) _result["enums"] = enums.map((_value) => _value.toJson ()).toList();
7714 if (executables.isNotEmpty) _result["executables"] = executables.map((_value ) => _value.toJson()).toList(); 7772 if (executables.isNotEmpty) _result["executables"] = executables.map((_value ) => _value.toJson()).toList();
7715 if (exports.isNotEmpty) _result["exports"] = exports.map((_value) => _value. toJson()).toList(); 7773 if (exports.isNotEmpty) _result["exports"] = exports.map((_value) => _value. toJson()).toList();
7716 if (imports.isNotEmpty) _result["imports"] = imports.map((_value) => _value. toJson()).toList(); 7774 if (imports.isNotEmpty) _result["imports"] = imports.map((_value) => _value. toJson()).toList();
7717 if (libraryAnnotations.isNotEmpty) _result["libraryAnnotations"] = libraryAn notations.map((_value) => _value.toJson()).toList(); 7775 if (libraryAnnotations.isNotEmpty) _result["libraryAnnotations"] = libraryAn notations.map((_value) => _value.toJson()).toList();
7718 if (libraryDocumentationComment != null) _result["libraryDocumentationCommen t"] = libraryDocumentationComment.toJson(); 7776 if (libraryDocumentationComment != null) _result["libraryDocumentationCommen t"] = libraryDocumentationComment.toJson();
7719 if (libraryName != '') _result["libraryName"] = libraryName; 7777 if (libraryName != '') _result["libraryName"] = libraryName;
7720 if (libraryNameLength != 0) _result["libraryNameLength"] = libraryNameLength ; 7778 if (libraryNameLength != 0) _result["libraryNameLength"] = libraryNameLength ;
7721 if (libraryNameOffset != 0) _result["libraryNameOffset"] = libraryNameOffset ; 7779 if (libraryNameOffset != 0) _result["libraryNameOffset"] = libraryNameOffset ;
7722 if (parts.isNotEmpty) _result["parts"] = parts.map((_value) => _value.toJson ()).toList(); 7780 if (parts.isNotEmpty) _result["parts"] = parts.map((_value) => _value.toJson ()).toList();
7723 if (publicNamespace != null) _result["publicNamespace"] = publicNamespace.to Json(); 7781 if (publicNamespace != null) _result["publicNamespace"] = publicNamespace.to Json();
7724 if (references.isNotEmpty) _result["references"] = references.map((_value) = > _value.toJson()).toList(); 7782 if (references.isNotEmpty) _result["references"] = references.map((_value) = > _value.toJson()).toList();
7725 if (typedefs.isNotEmpty) _result["typedefs"] = typedefs.map((_value) => _val ue.toJson()).toList(); 7783 if (typedefs.isNotEmpty) _result["typedefs"] = typedefs.map((_value) => _val ue.toJson()).toList();
7726 if (variables.isNotEmpty) _result["variables"] = variables.map((_value) => _ value.toJson()).toList(); 7784 if (variables.isNotEmpty) _result["variables"] = variables.map((_value) => _ value.toJson()).toList();
7727 return _result; 7785 return _result;
7728 } 7786 }
7729 7787
7730 @override 7788 @override
7731 Map<String, Object> toMap() => { 7789 Map<String, Object> toMap() => {
7790 "fallbackModePath": fallbackModePath,
7732 "classes": classes, 7791 "classes": classes,
7733 "codeRange": codeRange, 7792 "codeRange": codeRange,
7734 "enums": enums, 7793 "enums": enums,
7735 "executables": executables, 7794 "executables": executables,
7736 "exports": exports, 7795 "exports": exports,
7737 "imports": imports, 7796 "imports": imports,
7738 "libraryAnnotations": libraryAnnotations, 7797 "libraryAnnotations": libraryAnnotations,
7739 "libraryDocumentationComment": libraryDocumentationComment, 7798 "libraryDocumentationComment": libraryDocumentationComment,
7740 "libraryName": libraryName, 7799 "libraryName": libraryName,
7741 "libraryNameLength": libraryNameLength, 7800 "libraryNameLength": libraryNameLength,
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
8224 "propagatedTypeSlot": propagatedTypeSlot, 8283 "propagatedTypeSlot": propagatedTypeSlot,
8225 "type": type, 8284 "type": type,
8226 "visibleLength": visibleLength, 8285 "visibleLength": visibleLength,
8227 "visibleOffset": visibleOffset, 8286 "visibleOffset": visibleOffset,
8228 }; 8287 };
8229 8288
8230 @override 8289 @override
8231 String toString() => convert.JSON.encode(toJson()); 8290 String toString() => convert.JSON.encode(toJson());
8232 } 8291 }
8233 8292
OLDNEW
« 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