OLD | NEW |
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 'dart:convert' as convert; | 10 import 'dart:convert' as convert; |
(...skipping 7365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7376 bool _isAbstract; | 7376 bool _isAbstract; |
7377 bool _isAsynchronous; | 7377 bool _isAsynchronous; |
7378 bool _isConst; | 7378 bool _isConst; |
7379 bool _isExternal; | 7379 bool _isExternal; |
7380 bool _isFactory; | 7380 bool _isFactory; |
7381 bool _isGenerator; | 7381 bool _isGenerator; |
7382 bool _isRedirectedConstructor; | 7382 bool _isRedirectedConstructor; |
7383 bool _isStatic; | 7383 bool _isStatic; |
7384 idl.UnlinkedExecutableKind _kind; | 7384 idl.UnlinkedExecutableKind _kind; |
7385 List<UnlinkedExecutableBuilder> _localFunctions; | 7385 List<UnlinkedExecutableBuilder> _localFunctions; |
7386 List<UnlinkedLabelBuilder> _localLabels; | |
7387 String _name; | 7386 String _name; |
7388 int _nameEnd; | 7387 int _nameEnd; |
7389 int _nameOffset; | 7388 int _nameOffset; |
7390 List<UnlinkedParamBuilder> _parameters; | 7389 List<UnlinkedParamBuilder> _parameters; |
7391 int _periodOffset; | 7390 int _periodOffset; |
7392 EntityRefBuilder _redirectedConstructor; | 7391 EntityRefBuilder _redirectedConstructor; |
7393 String _redirectedConstructorName; | 7392 String _redirectedConstructorName; |
7394 EntityRefBuilder _returnType; | 7393 EntityRefBuilder _returnType; |
7395 List<UnlinkedTypeParamBuilder> _typeParameters; | 7394 List<UnlinkedTypeParamBuilder> _typeParameters; |
7396 int _visibleLength; | 7395 int _visibleLength; |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7586 _localFunctions ??= <UnlinkedExecutableBuilder>[]; | 7585 _localFunctions ??= <UnlinkedExecutableBuilder>[]; |
7587 | 7586 |
7588 /** | 7587 /** |
7589 * The list of local functions. | 7588 * The list of local functions. |
7590 */ | 7589 */ |
7591 void set localFunctions(List<UnlinkedExecutableBuilder> value) { | 7590 void set localFunctions(List<UnlinkedExecutableBuilder> value) { |
7592 this._localFunctions = value; | 7591 this._localFunctions = value; |
7593 } | 7592 } |
7594 | 7593 |
7595 @override | 7594 @override |
7596 List<UnlinkedLabelBuilder> get localLabels => | 7595 List<String> get localLabels => |
7597 _localLabels ??= <UnlinkedLabelBuilder>[]; | 7596 throw new UnimplementedError('attempt to access deprecated field'); |
7598 | |
7599 /** | |
7600 * The list of local labels. | |
7601 */ | |
7602 void set localLabels(List<UnlinkedLabelBuilder> value) { | |
7603 this._localLabels = value; | |
7604 } | |
7605 | 7597 |
7606 @override | 7598 @override |
7607 List<UnlinkedVariableBuilder> get localVariables => | 7599 List<UnlinkedVariableBuilder> get localVariables => |
7608 throw new UnimplementedError('attempt to access deprecated field'); | 7600 throw new UnimplementedError('attempt to access deprecated field'); |
7609 | 7601 |
7610 @override | 7602 @override |
7611 String get name => _name ??= ''; | 7603 String get name => _name ??= ''; |
7612 | 7604 |
7613 /** | 7605 /** |
7614 * Name of the executable. For setters, this includes the trailing "=". For | 7606 * Name of the executable. For setters, this includes the trailing "=". For |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7752 bool isAbstract, | 7744 bool isAbstract, |
7753 bool isAsynchronous, | 7745 bool isAsynchronous, |
7754 bool isConst, | 7746 bool isConst, |
7755 bool isExternal, | 7747 bool isExternal, |
7756 bool isFactory, | 7748 bool isFactory, |
7757 bool isGenerator, | 7749 bool isGenerator, |
7758 bool isRedirectedConstructor, | 7750 bool isRedirectedConstructor, |
7759 bool isStatic, | 7751 bool isStatic, |
7760 idl.UnlinkedExecutableKind kind, | 7752 idl.UnlinkedExecutableKind kind, |
7761 List<UnlinkedExecutableBuilder> localFunctions, | 7753 List<UnlinkedExecutableBuilder> localFunctions, |
7762 List<UnlinkedLabelBuilder> localLabels, | |
7763 String name, | 7754 String name, |
7764 int nameEnd, | 7755 int nameEnd, |
7765 int nameOffset, | 7756 int nameOffset, |
7766 List<UnlinkedParamBuilder> parameters, | 7757 List<UnlinkedParamBuilder> parameters, |
7767 int periodOffset, | 7758 int periodOffset, |
7768 EntityRefBuilder redirectedConstructor, | 7759 EntityRefBuilder redirectedConstructor, |
7769 String redirectedConstructorName, | 7760 String redirectedConstructorName, |
7770 EntityRefBuilder returnType, | 7761 EntityRefBuilder returnType, |
7771 List<UnlinkedTypeParamBuilder> typeParameters, | 7762 List<UnlinkedTypeParamBuilder> typeParameters, |
7772 int visibleLength, | 7763 int visibleLength, |
7773 int visibleOffset}) | 7764 int visibleOffset}) |
7774 : _annotations = annotations, | 7765 : _annotations = annotations, |
7775 _bodyExpr = bodyExpr, | 7766 _bodyExpr = bodyExpr, |
7776 _codeRange = codeRange, | 7767 _codeRange = codeRange, |
7777 _constantInitializers = constantInitializers, | 7768 _constantInitializers = constantInitializers, |
7778 _constCycleSlot = constCycleSlot, | 7769 _constCycleSlot = constCycleSlot, |
7779 _documentationComment = documentationComment, | 7770 _documentationComment = documentationComment, |
7780 _inferredReturnTypeSlot = inferredReturnTypeSlot, | 7771 _inferredReturnTypeSlot = inferredReturnTypeSlot, |
7781 _isAbstract = isAbstract, | 7772 _isAbstract = isAbstract, |
7782 _isAsynchronous = isAsynchronous, | 7773 _isAsynchronous = isAsynchronous, |
7783 _isConst = isConst, | 7774 _isConst = isConst, |
7784 _isExternal = isExternal, | 7775 _isExternal = isExternal, |
7785 _isFactory = isFactory, | 7776 _isFactory = isFactory, |
7786 _isGenerator = isGenerator, | 7777 _isGenerator = isGenerator, |
7787 _isRedirectedConstructor = isRedirectedConstructor, | 7778 _isRedirectedConstructor = isRedirectedConstructor, |
7788 _isStatic = isStatic, | 7779 _isStatic = isStatic, |
7789 _kind = kind, | 7780 _kind = kind, |
7790 _localFunctions = localFunctions, | 7781 _localFunctions = localFunctions, |
7791 _localLabels = localLabels, | |
7792 _name = name, | 7782 _name = name, |
7793 _nameEnd = nameEnd, | 7783 _nameEnd = nameEnd, |
7794 _nameOffset = nameOffset, | 7784 _nameOffset = nameOffset, |
7795 _parameters = parameters, | 7785 _parameters = parameters, |
7796 _periodOffset = periodOffset, | 7786 _periodOffset = periodOffset, |
7797 _redirectedConstructor = redirectedConstructor, | 7787 _redirectedConstructor = redirectedConstructor, |
7798 _redirectedConstructorName = redirectedConstructorName, | 7788 _redirectedConstructorName = redirectedConstructorName, |
7799 _returnType = returnType, | 7789 _returnType = returnType, |
7800 _typeParameters = typeParameters, | 7790 _typeParameters = typeParameters, |
7801 _visibleLength = visibleLength, | 7791 _visibleLength = visibleLength, |
7802 _visibleOffset = visibleOffset; | 7792 _visibleOffset = visibleOffset; |
7803 | 7793 |
7804 /** | 7794 /** |
7805 * Flush [informative] data recursively. | 7795 * Flush [informative] data recursively. |
7806 */ | 7796 */ |
7807 void flushInformative() { | 7797 void flushInformative() { |
7808 _annotations?.forEach((b) => b.flushInformative()); | 7798 _annotations?.forEach((b) => b.flushInformative()); |
7809 _bodyExpr?.flushInformative(); | 7799 _bodyExpr?.flushInformative(); |
7810 _codeRange = null; | 7800 _codeRange = null; |
7811 _constantInitializers?.forEach((b) => b.flushInformative()); | 7801 _constantInitializers?.forEach((b) => b.flushInformative()); |
7812 _documentationComment = null; | 7802 _documentationComment = null; |
7813 _isAsynchronous = null; | 7803 _isAsynchronous = null; |
7814 _isGenerator = null; | 7804 _isGenerator = null; |
7815 _localFunctions?.forEach((b) => b.flushInformative()); | 7805 _localFunctions?.forEach((b) => b.flushInformative()); |
7816 _localLabels = null; | |
7817 _nameEnd = null; | 7806 _nameEnd = null; |
7818 _nameOffset = null; | 7807 _nameOffset = null; |
7819 _parameters?.forEach((b) => b.flushInformative()); | 7808 _parameters?.forEach((b) => b.flushInformative()); |
7820 _periodOffset = null; | 7809 _periodOffset = null; |
7821 _redirectedConstructor?.flushInformative(); | 7810 _redirectedConstructor?.flushInformative(); |
7822 _returnType?.flushInformative(); | 7811 _returnType?.flushInformative(); |
7823 _typeParameters?.forEach((b) => b.flushInformative()); | 7812 _typeParameters?.forEach((b) => b.flushInformative()); |
7824 _visibleLength = null; | 7813 _visibleLength = null; |
7825 _visibleOffset = null; | 7814 _visibleOffset = null; |
7826 } | 7815 } |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7888 this._bodyExpr?.collectApiSignature(signature); | 7877 this._bodyExpr?.collectApiSignature(signature); |
7889 } | 7878 } |
7890 | 7879 |
7891 fb.Offset finish(fb.Builder fbBuilder) { | 7880 fb.Offset finish(fb.Builder fbBuilder) { |
7892 fb.Offset offset_annotations; | 7881 fb.Offset offset_annotations; |
7893 fb.Offset offset_bodyExpr; | 7882 fb.Offset offset_bodyExpr; |
7894 fb.Offset offset_codeRange; | 7883 fb.Offset offset_codeRange; |
7895 fb.Offset offset_constantInitializers; | 7884 fb.Offset offset_constantInitializers; |
7896 fb.Offset offset_documentationComment; | 7885 fb.Offset offset_documentationComment; |
7897 fb.Offset offset_localFunctions; | 7886 fb.Offset offset_localFunctions; |
7898 fb.Offset offset_localLabels; | |
7899 fb.Offset offset_name; | 7887 fb.Offset offset_name; |
7900 fb.Offset offset_parameters; | 7888 fb.Offset offset_parameters; |
7901 fb.Offset offset_redirectedConstructor; | 7889 fb.Offset offset_redirectedConstructor; |
7902 fb.Offset offset_redirectedConstructorName; | 7890 fb.Offset offset_redirectedConstructorName; |
7903 fb.Offset offset_returnType; | 7891 fb.Offset offset_returnType; |
7904 fb.Offset offset_typeParameters; | 7892 fb.Offset offset_typeParameters; |
7905 if (!(_annotations == null || _annotations.isEmpty)) { | 7893 if (!(_annotations == null || _annotations.isEmpty)) { |
7906 offset_annotations = fbBuilder | 7894 offset_annotations = fbBuilder |
7907 .writeList(_annotations.map((b) => b.finish(fbBuilder)).toList()); | 7895 .writeList(_annotations.map((b) => b.finish(fbBuilder)).toList()); |
7908 } | 7896 } |
7909 if (_bodyExpr != null) { | 7897 if (_bodyExpr != null) { |
7910 offset_bodyExpr = _bodyExpr.finish(fbBuilder); | 7898 offset_bodyExpr = _bodyExpr.finish(fbBuilder); |
7911 } | 7899 } |
7912 if (_codeRange != null) { | 7900 if (_codeRange != null) { |
7913 offset_codeRange = _codeRange.finish(fbBuilder); | 7901 offset_codeRange = _codeRange.finish(fbBuilder); |
7914 } | 7902 } |
7915 if (!(_constantInitializers == null || _constantInitializers.isEmpty)) { | 7903 if (!(_constantInitializers == null || _constantInitializers.isEmpty)) { |
7916 offset_constantInitializers = fbBuilder.writeList( | 7904 offset_constantInitializers = fbBuilder.writeList( |
7917 _constantInitializers.map((b) => b.finish(fbBuilder)).toList()); | 7905 _constantInitializers.map((b) => b.finish(fbBuilder)).toList()); |
7918 } | 7906 } |
7919 if (_documentationComment != null) { | 7907 if (_documentationComment != null) { |
7920 offset_documentationComment = _documentationComment.finish(fbBuilder); | 7908 offset_documentationComment = _documentationComment.finish(fbBuilder); |
7921 } | 7909 } |
7922 if (!(_localFunctions == null || _localFunctions.isEmpty)) { | 7910 if (!(_localFunctions == null || _localFunctions.isEmpty)) { |
7923 offset_localFunctions = fbBuilder | 7911 offset_localFunctions = fbBuilder |
7924 .writeList(_localFunctions.map((b) => b.finish(fbBuilder)).toList()); | 7912 .writeList(_localFunctions.map((b) => b.finish(fbBuilder)).toList()); |
7925 } | 7913 } |
7926 if (!(_localLabels == null || _localLabels.isEmpty)) { | |
7927 offset_localLabels = fbBuilder | |
7928 .writeList(_localLabels.map((b) => b.finish(fbBuilder)).toList()); | |
7929 } | |
7930 if (_name != null) { | 7914 if (_name != null) { |
7931 offset_name = fbBuilder.writeString(_name); | 7915 offset_name = fbBuilder.writeString(_name); |
7932 } | 7916 } |
7933 if (!(_parameters == null || _parameters.isEmpty)) { | 7917 if (!(_parameters == null || _parameters.isEmpty)) { |
7934 offset_parameters = fbBuilder | 7918 offset_parameters = fbBuilder |
7935 .writeList(_parameters.map((b) => b.finish(fbBuilder)).toList()); | 7919 .writeList(_parameters.map((b) => b.finish(fbBuilder)).toList()); |
7936 } | 7920 } |
7937 if (_redirectedConstructor != null) { | 7921 if (_redirectedConstructor != null) { |
7938 offset_redirectedConstructor = _redirectedConstructor.finish(fbBuilder); | 7922 offset_redirectedConstructor = _redirectedConstructor.finish(fbBuilder); |
7939 } | 7923 } |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7993 } | 7977 } |
7994 if (_isStatic == true) { | 7978 if (_isStatic == true) { |
7995 fbBuilder.addBool(9, true); | 7979 fbBuilder.addBool(9, true); |
7996 } | 7980 } |
7997 if (_kind != null && _kind != idl.UnlinkedExecutableKind.functionOrMethod) { | 7981 if (_kind != null && _kind != idl.UnlinkedExecutableKind.functionOrMethod) { |
7998 fbBuilder.addUint8(4, _kind.index); | 7982 fbBuilder.addUint8(4, _kind.index); |
7999 } | 7983 } |
8000 if (offset_localFunctions != null) { | 7984 if (offset_localFunctions != null) { |
8001 fbBuilder.addOffset(18, offset_localFunctions); | 7985 fbBuilder.addOffset(18, offset_localFunctions); |
8002 } | 7986 } |
8003 if (offset_localLabels != null) { | |
8004 fbBuilder.addOffset(22, offset_localLabels); | |
8005 } | |
8006 if (offset_name != null) { | 7987 if (offset_name != null) { |
8007 fbBuilder.addOffset(1, offset_name); | 7988 fbBuilder.addOffset(1, offset_name); |
8008 } | 7989 } |
8009 if (_nameEnd != null && _nameEnd != 0) { | 7990 if (_nameEnd != null && _nameEnd != 0) { |
8010 fbBuilder.addUint32(23, _nameEnd); | 7991 fbBuilder.addUint32(23, _nameEnd); |
8011 } | 7992 } |
8012 if (_nameOffset != null && _nameOffset != 0) { | 7993 if (_nameOffset != null && _nameOffset != 0) { |
8013 fbBuilder.addUint32(0, _nameOffset); | 7994 fbBuilder.addUint32(0, _nameOffset); |
8014 } | 7995 } |
8015 if (offset_parameters != null) { | 7996 if (offset_parameters != null) { |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8067 bool _isAbstract; | 8048 bool _isAbstract; |
8068 bool _isAsynchronous; | 8049 bool _isAsynchronous; |
8069 bool _isConst; | 8050 bool _isConst; |
8070 bool _isExternal; | 8051 bool _isExternal; |
8071 bool _isFactory; | 8052 bool _isFactory; |
8072 bool _isGenerator; | 8053 bool _isGenerator; |
8073 bool _isRedirectedConstructor; | 8054 bool _isRedirectedConstructor; |
8074 bool _isStatic; | 8055 bool _isStatic; |
8075 idl.UnlinkedExecutableKind _kind; | 8056 idl.UnlinkedExecutableKind _kind; |
8076 List<idl.UnlinkedExecutable> _localFunctions; | 8057 List<idl.UnlinkedExecutable> _localFunctions; |
8077 List<idl.UnlinkedLabel> _localLabels; | |
8078 String _name; | 8058 String _name; |
8079 int _nameEnd; | 8059 int _nameEnd; |
8080 int _nameOffset; | 8060 int _nameOffset; |
8081 List<idl.UnlinkedParam> _parameters; | 8061 List<idl.UnlinkedParam> _parameters; |
8082 int _periodOffset; | 8062 int _periodOffset; |
8083 idl.EntityRef _redirectedConstructor; | 8063 idl.EntityRef _redirectedConstructor; |
8084 String _redirectedConstructorName; | 8064 String _redirectedConstructorName; |
8085 idl.EntityRef _returnType; | 8065 idl.EntityRef _returnType; |
8086 List<idl.UnlinkedTypeParam> _typeParameters; | 8066 List<idl.UnlinkedTypeParam> _typeParameters; |
8087 int _visibleLength; | 8067 int _visibleLength; |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8198 | 8178 |
8199 @override | 8179 @override |
8200 List<idl.UnlinkedExecutable> get localFunctions { | 8180 List<idl.UnlinkedExecutable> get localFunctions { |
8201 _localFunctions ??= const fb.ListReader<idl.UnlinkedExecutable>( | 8181 _localFunctions ??= const fb.ListReader<idl.UnlinkedExecutable>( |
8202 const _UnlinkedExecutableReader()) | 8182 const _UnlinkedExecutableReader()) |
8203 .vTableGet(_bc, _bcOffset, 18, const <idl.UnlinkedExecutable>[]); | 8183 .vTableGet(_bc, _bcOffset, 18, const <idl.UnlinkedExecutable>[]); |
8204 return _localFunctions; | 8184 return _localFunctions; |
8205 } | 8185 } |
8206 | 8186 |
8207 @override | 8187 @override |
8208 List<idl.UnlinkedLabel> get localLabels { | 8188 List<String> get localLabels => |
8209 _localLabels ??= | 8189 throw new UnimplementedError('attempt to access deprecated field'); |
8210 const fb.ListReader<idl.UnlinkedLabel>(const _UnlinkedLabelReader()) | |
8211 .vTableGet(_bc, _bcOffset, 22, const <idl.UnlinkedLabel>[]); | |
8212 return _localLabels; | |
8213 } | |
8214 | 8190 |
8215 @override | 8191 @override |
8216 List<idl.UnlinkedVariable> get localVariables => | 8192 List<idl.UnlinkedVariable> get localVariables => |
8217 throw new UnimplementedError('attempt to access deprecated field'); | 8193 throw new UnimplementedError('attempt to access deprecated field'); |
8218 | 8194 |
8219 @override | 8195 @override |
8220 String get name { | 8196 String get name { |
8221 _name ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 1, ''); | 8197 _name ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 1, ''); |
8222 return _name; | 8198 return _name; |
8223 } | 8199 } |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8313 if (isFactory != false) _result["isFactory"] = isFactory; | 8289 if (isFactory != false) _result["isFactory"] = isFactory; |
8314 if (isGenerator != false) _result["isGenerator"] = isGenerator; | 8290 if (isGenerator != false) _result["isGenerator"] = isGenerator; |
8315 if (isRedirectedConstructor != false) | 8291 if (isRedirectedConstructor != false) |
8316 _result["isRedirectedConstructor"] = isRedirectedConstructor; | 8292 _result["isRedirectedConstructor"] = isRedirectedConstructor; |
8317 if (isStatic != false) _result["isStatic"] = isStatic; | 8293 if (isStatic != false) _result["isStatic"] = isStatic; |
8318 if (kind != idl.UnlinkedExecutableKind.functionOrMethod) | 8294 if (kind != idl.UnlinkedExecutableKind.functionOrMethod) |
8319 _result["kind"] = kind.toString().split('.')[1]; | 8295 _result["kind"] = kind.toString().split('.')[1]; |
8320 if (localFunctions.isNotEmpty) | 8296 if (localFunctions.isNotEmpty) |
8321 _result["localFunctions"] = | 8297 _result["localFunctions"] = |
8322 localFunctions.map((_value) => _value.toJson()).toList(); | 8298 localFunctions.map((_value) => _value.toJson()).toList(); |
8323 if (localLabels.isNotEmpty) | |
8324 _result["localLabels"] = | |
8325 localLabels.map((_value) => _value.toJson()).toList(); | |
8326 if (name != '') _result["name"] = name; | 8299 if (name != '') _result["name"] = name; |
8327 if (nameEnd != 0) _result["nameEnd"] = nameEnd; | 8300 if (nameEnd != 0) _result["nameEnd"] = nameEnd; |
8328 if (nameOffset != 0) _result["nameOffset"] = nameOffset; | 8301 if (nameOffset != 0) _result["nameOffset"] = nameOffset; |
8329 if (parameters.isNotEmpty) | 8302 if (parameters.isNotEmpty) |
8330 _result["parameters"] = | 8303 _result["parameters"] = |
8331 parameters.map((_value) => _value.toJson()).toList(); | 8304 parameters.map((_value) => _value.toJson()).toList(); |
8332 if (periodOffset != 0) _result["periodOffset"] = periodOffset; | 8305 if (periodOffset != 0) _result["periodOffset"] = periodOffset; |
8333 if (redirectedConstructor != null) | 8306 if (redirectedConstructor != null) |
8334 _result["redirectedConstructor"] = redirectedConstructor.toJson(); | 8307 _result["redirectedConstructor"] = redirectedConstructor.toJson(); |
8335 if (redirectedConstructorName != '') | 8308 if (redirectedConstructorName != '') |
(...skipping 19 matching lines...) Expand all Loading... |
8355 "isAbstract": isAbstract, | 8328 "isAbstract": isAbstract, |
8356 "isAsynchronous": isAsynchronous, | 8329 "isAsynchronous": isAsynchronous, |
8357 "isConst": isConst, | 8330 "isConst": isConst, |
8358 "isExternal": isExternal, | 8331 "isExternal": isExternal, |
8359 "isFactory": isFactory, | 8332 "isFactory": isFactory, |
8360 "isGenerator": isGenerator, | 8333 "isGenerator": isGenerator, |
8361 "isRedirectedConstructor": isRedirectedConstructor, | 8334 "isRedirectedConstructor": isRedirectedConstructor, |
8362 "isStatic": isStatic, | 8335 "isStatic": isStatic, |
8363 "kind": kind, | 8336 "kind": kind, |
8364 "localFunctions": localFunctions, | 8337 "localFunctions": localFunctions, |
8365 "localLabels": localLabels, | |
8366 "name": name, | 8338 "name": name, |
8367 "nameEnd": nameEnd, | 8339 "nameEnd": nameEnd, |
8368 "nameOffset": nameOffset, | 8340 "nameOffset": nameOffset, |
8369 "parameters": parameters, | 8341 "parameters": parameters, |
8370 "periodOffset": periodOffset, | 8342 "periodOffset": periodOffset, |
8371 "redirectedConstructor": redirectedConstructor, | 8343 "redirectedConstructor": redirectedConstructor, |
8372 "redirectedConstructorName": redirectedConstructorName, | 8344 "redirectedConstructorName": redirectedConstructorName, |
8373 "returnType": returnType, | 8345 "returnType": returnType, |
8374 "typeParameters": typeParameters, | 8346 "typeParameters": typeParameters, |
8375 "visibleLength": visibleLength, | 8347 "visibleLength": visibleLength, |
(...skipping 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9492 "prefixReference": prefixReference, | 9464 "prefixReference": prefixReference, |
9493 "uri": uri, | 9465 "uri": uri, |
9494 "uriEnd": uriEnd, | 9466 "uriEnd": uriEnd, |
9495 "uriOffset": uriOffset, | 9467 "uriOffset": uriOffset, |
9496 }; | 9468 }; |
9497 | 9469 |
9498 @override | 9470 @override |
9499 String toString() => convert.JSON.encode(toJson()); | 9471 String toString() => convert.JSON.encode(toJson()); |
9500 } | 9472 } |
9501 | 9473 |
9502 class UnlinkedLabelBuilder extends Object | |
9503 with _UnlinkedLabelMixin | |
9504 implements idl.UnlinkedLabel { | |
9505 bool _isOnSwitchMember; | |
9506 bool _isOnSwitchStatement; | |
9507 String _name; | |
9508 int _nameOffset; | |
9509 | |
9510 @override | |
9511 bool get isOnSwitchMember => _isOnSwitchMember ??= false; | |
9512 | |
9513 /** | |
9514 * Return `true` if this label is associated with a `switch` member (`case` or | |
9515 * `default`). | |
9516 */ | |
9517 void set isOnSwitchMember(bool value) { | |
9518 this._isOnSwitchMember = value; | |
9519 } | |
9520 | |
9521 @override | |
9522 bool get isOnSwitchStatement => _isOnSwitchStatement ??= false; | |
9523 | |
9524 /** | |
9525 * Return `true` if this label is associated with a `switch` statement. | |
9526 */ | |
9527 void set isOnSwitchStatement(bool value) { | |
9528 this._isOnSwitchStatement = value; | |
9529 } | |
9530 | |
9531 @override | |
9532 String get name => _name ??= ''; | |
9533 | |
9534 /** | |
9535 * Name of the label. | |
9536 */ | |
9537 void set name(String value) { | |
9538 this._name = value; | |
9539 } | |
9540 | |
9541 @override | |
9542 int get nameOffset => _nameOffset ??= 0; | |
9543 | |
9544 /** | |
9545 * Offset of the label relative to the beginning of the file. | |
9546 */ | |
9547 void set nameOffset(int value) { | |
9548 assert(value == null || value >= 0); | |
9549 this._nameOffset = value; | |
9550 } | |
9551 | |
9552 UnlinkedLabelBuilder( | |
9553 {bool isOnSwitchMember, | |
9554 bool isOnSwitchStatement, | |
9555 String name, | |
9556 int nameOffset}) | |
9557 : _isOnSwitchMember = isOnSwitchMember, | |
9558 _isOnSwitchStatement = isOnSwitchStatement, | |
9559 _name = name, | |
9560 _nameOffset = nameOffset; | |
9561 | |
9562 /** | |
9563 * Flush [informative] data recursively. | |
9564 */ | |
9565 void flushInformative() { | |
9566 _nameOffset = null; | |
9567 } | |
9568 | |
9569 /** | |
9570 * Accumulate non-[informative] data into [signature]. | |
9571 */ | |
9572 void collectApiSignature(api_sig.ApiSignature signature) { | |
9573 signature.addString(this._name ?? ''); | |
9574 signature.addBool(this._isOnSwitchMember == true); | |
9575 signature.addBool(this._isOnSwitchStatement == true); | |
9576 } | |
9577 | |
9578 fb.Offset finish(fb.Builder fbBuilder) { | |
9579 fb.Offset offset_name; | |
9580 if (_name != null) { | |
9581 offset_name = fbBuilder.writeString(_name); | |
9582 } | |
9583 fbBuilder.startTable(); | |
9584 if (_isOnSwitchMember == true) { | |
9585 fbBuilder.addBool(2, true); | |
9586 } | |
9587 if (_isOnSwitchStatement == true) { | |
9588 fbBuilder.addBool(3, true); | |
9589 } | |
9590 if (offset_name != null) { | |
9591 fbBuilder.addOffset(0, offset_name); | |
9592 } | |
9593 if (_nameOffset != null && _nameOffset != 0) { | |
9594 fbBuilder.addUint32(1, _nameOffset); | |
9595 } | |
9596 return fbBuilder.endTable(); | |
9597 } | |
9598 } | |
9599 | |
9600 class _UnlinkedLabelReader extends fb.TableReader<_UnlinkedLabelImpl> { | |
9601 const _UnlinkedLabelReader(); | |
9602 | |
9603 @override | |
9604 _UnlinkedLabelImpl createObject(fb.BufferContext bc, int offset) => | |
9605 new _UnlinkedLabelImpl(bc, offset); | |
9606 } | |
9607 | |
9608 class _UnlinkedLabelImpl extends Object | |
9609 with _UnlinkedLabelMixin | |
9610 implements idl.UnlinkedLabel { | |
9611 final fb.BufferContext _bc; | |
9612 final int _bcOffset; | |
9613 | |
9614 _UnlinkedLabelImpl(this._bc, this._bcOffset); | |
9615 | |
9616 bool _isOnSwitchMember; | |
9617 bool _isOnSwitchStatement; | |
9618 String _name; | |
9619 int _nameOffset; | |
9620 | |
9621 @override | |
9622 bool get isOnSwitchMember { | |
9623 _isOnSwitchMember ??= | |
9624 const fb.BoolReader().vTableGet(_bc, _bcOffset, 2, false); | |
9625 return _isOnSwitchMember; | |
9626 } | |
9627 | |
9628 @override | |
9629 bool get isOnSwitchStatement { | |
9630 _isOnSwitchStatement ??= | |
9631 const fb.BoolReader().vTableGet(_bc, _bcOffset, 3, false); | |
9632 return _isOnSwitchStatement; | |
9633 } | |
9634 | |
9635 @override | |
9636 String get name { | |
9637 _name ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 0, ''); | |
9638 return _name; | |
9639 } | |
9640 | |
9641 @override | |
9642 int get nameOffset { | |
9643 _nameOffset ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 1, 0); | |
9644 return _nameOffset; | |
9645 } | |
9646 } | |
9647 | |
9648 abstract class _UnlinkedLabelMixin implements idl.UnlinkedLabel { | |
9649 @override | |
9650 Map<String, Object> toJson() { | |
9651 Map<String, Object> _result = <String, Object>{}; | |
9652 if (isOnSwitchMember != false) | |
9653 _result["isOnSwitchMember"] = isOnSwitchMember; | |
9654 if (isOnSwitchStatement != false) | |
9655 _result["isOnSwitchStatement"] = isOnSwitchStatement; | |
9656 if (name != '') _result["name"] = name; | |
9657 if (nameOffset != 0) _result["nameOffset"] = nameOffset; | |
9658 return _result; | |
9659 } | |
9660 | |
9661 @override | |
9662 Map<String, Object> toMap() => { | |
9663 "isOnSwitchMember": isOnSwitchMember, | |
9664 "isOnSwitchStatement": isOnSwitchStatement, | |
9665 "name": name, | |
9666 "nameOffset": nameOffset, | |
9667 }; | |
9668 | |
9669 @override | |
9670 String toString() => convert.JSON.encode(toJson()); | |
9671 } | |
9672 | |
9673 class UnlinkedParamBuilder extends Object | 9474 class UnlinkedParamBuilder extends Object |
9674 with _UnlinkedParamMixin | 9475 with _UnlinkedParamMixin |
9675 implements idl.UnlinkedParam { | 9476 implements idl.UnlinkedParam { |
9676 List<UnlinkedExprBuilder> _annotations; | 9477 List<UnlinkedExprBuilder> _annotations; |
9677 CodeRangeBuilder _codeRange; | 9478 CodeRangeBuilder _codeRange; |
9678 String _defaultValueCode; | 9479 String _defaultValueCode; |
9679 int _inferredTypeSlot; | 9480 int _inferredTypeSlot; |
9680 int _inheritsCovariantSlot; | 9481 int _inheritsCovariantSlot; |
9681 UnlinkedExecutableBuilder _initializer; | 9482 UnlinkedExecutableBuilder _initializer; |
9682 bool _isExplicitlyCovariant; | 9483 bool _isExplicitlyCovariant; |
(...skipping 3191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12874 "nameOffset": nameOffset, | 12675 "nameOffset": nameOffset, |
12875 "propagatedTypeSlot": propagatedTypeSlot, | 12676 "propagatedTypeSlot": propagatedTypeSlot, |
12876 "type": type, | 12677 "type": type, |
12877 "visibleLength": visibleLength, | 12678 "visibleLength": visibleLength, |
12878 "visibleOffset": visibleOffset, | 12679 "visibleOffset": visibleOffset, |
12879 }; | 12680 }; |
12880 | 12681 |
12881 @override | 12682 @override |
12882 String toString() => convert.JSON.encode(toJson()); | 12683 String toString() => convert.JSON.encode(toJson()); |
12883 } | 12684 } |
OLD | NEW |