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

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

Issue 2013883003: Migrate UnlinkedVariable.constExpr to UnlinkedExecutable.bodyExpr. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fix a comment Created 4 years, 6 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 3532 matching lines...) Expand 10 before | Expand all | Expand 10 after
3543 "strings": strings, 3543 "strings": strings,
3544 }; 3544 };
3545 3545
3546 @override 3546 @override
3547 String toString() => convert.JSON.encode(toJson()); 3547 String toString() => convert.JSON.encode(toJson());
3548 } 3548 }
3549 3549
3550 class UnlinkedConstructorInitializerBuilder extends Object with _UnlinkedConstru ctorInitializerMixin implements idl.UnlinkedConstructorInitializer { 3550 class UnlinkedConstructorInitializerBuilder extends Object with _UnlinkedConstru ctorInitializerMixin implements idl.UnlinkedConstructorInitializer {
3551 bool _finished = false; 3551 bool _finished = false;
3552 3552
3553 List<String> _argumentNames;
3553 List<UnlinkedConstBuilder> _arguments; 3554 List<UnlinkedConstBuilder> _arguments;
3554 List<String> _argumentNames;
3555 UnlinkedConstBuilder _expression; 3555 UnlinkedConstBuilder _expression;
3556 idl.UnlinkedConstructorInitializerKind _kind; 3556 idl.UnlinkedConstructorInitializerKind _kind;
3557 String _name; 3557 String _name;
3558 3558
3559 @override 3559 @override
3560 List<UnlinkedConstBuilder> get arguments => _arguments ??= <UnlinkedConstBuild er>[];
3561
3562 /**
3563 * If [kind] is `thisInvocation` or `superInvocation`, the arguments of the
3564 * invocation. Otherwise empty.
3565 */
3566 void set arguments(List<UnlinkedConstBuilder> _value) {
3567 assert(!_finished);
3568 _arguments = _value;
3569 }
3570
3571 @override
3572 List<String> get argumentNames => _argumentNames ??= <String>[]; 3560 List<String> get argumentNames => _argumentNames ??= <String>[];
3573 3561
3574 /** 3562 /**
3575 * If there are `m` [arguments] and `n` [argumentNames], then each argument 3563 * If there are `m` [arguments] and `n` [argumentNames], then each argument
3576 * from [arguments] with index `i` such that `n + i - m >= 0`, should be used 3564 * from [arguments] with index `i` such that `n + i - m >= 0`, should be used
3577 * with the name at `n + i - m`. 3565 * with the name at `n + i - m`.
3578 */ 3566 */
3579 void set argumentNames(List<String> _value) { 3567 void set argumentNames(List<String> _value) {
3580 assert(!_finished); 3568 assert(!_finished);
3581 _argumentNames = _value; 3569 _argumentNames = _value;
3582 } 3570 }
3583 3571
3584 @override 3572 @override
3573 List<UnlinkedConstBuilder> get arguments => _arguments ??= <UnlinkedConstBuild er>[];
3574
3575 /**
3576 * If [kind] is `thisInvocation` or `superInvocation`, the arguments of the
3577 * invocation. Otherwise empty.
3578 */
3579 void set arguments(List<UnlinkedConstBuilder> _value) {
3580 assert(!_finished);
3581 _arguments = _value;
3582 }
3583
3584 @override
3585 UnlinkedConstBuilder get expression => _expression; 3585 UnlinkedConstBuilder get expression => _expression;
3586 3586
3587 /** 3587 /**
3588 * If [kind] is `field`, the expression of the field initializer. 3588 * If [kind] is `field`, the expression of the field initializer.
3589 * Otherwise `null`. 3589 * Otherwise `null`.
3590 */ 3590 */
3591 void set expression(UnlinkedConstBuilder _value) { 3591 void set expression(UnlinkedConstBuilder _value) {
3592 assert(!_finished); 3592 assert(!_finished);
3593 _expression = _value; 3593 _expression = _value;
3594 } 3594 }
(...skipping 16 matching lines...) Expand all
3611 * If [kind] is `field`, the name of the field declared in the class. If 3611 * If [kind] is `field`, the name of the field declared in the class. If
3612 * [kind] is `thisInvocation`, the name of the constructor, declared in this 3612 * [kind] is `thisInvocation`, the name of the constructor, declared in this
3613 * class, to redirect to. If [kind] is `superInvocation`, the name of the 3613 * class, to redirect to. If [kind] is `superInvocation`, the name of the
3614 * constructor, declared in the superclass, to invoke. 3614 * constructor, declared in the superclass, to invoke.
3615 */ 3615 */
3616 void set name(String _value) { 3616 void set name(String _value) {
3617 assert(!_finished); 3617 assert(!_finished);
3618 _name = _value; 3618 _name = _value;
3619 } 3619 }
3620 3620
3621 UnlinkedConstructorInitializerBuilder({List<UnlinkedConstBuilder> arguments, L ist<String> argumentNames, UnlinkedConstBuilder expression, idl.UnlinkedConstruc torInitializerKind kind, String name}) 3621 UnlinkedConstructorInitializerBuilder({List<String> argumentNames, List<Unlink edConstBuilder> arguments, UnlinkedConstBuilder expression, idl.UnlinkedConstruc torInitializerKind kind, String name})
3622 : _arguments = arguments, 3622 : _argumentNames = argumentNames,
3623 _argumentNames = argumentNames, 3623 _arguments = arguments,
3624 _expression = expression, 3624 _expression = expression,
3625 _kind = kind, 3625 _kind = kind,
3626 _name = name; 3626 _name = name;
3627 3627
3628 /** 3628 /**
3629 * Flush [informative] data recursively. 3629 * Flush [informative] data recursively.
3630 */ 3630 */
3631 void flushInformative() { 3631 void flushInformative() {
3632 _arguments?.forEach((b) => b.flushInformative()); 3632 _arguments?.forEach((b) => b.flushInformative());
3633 _expression?.flushInformative(); 3633 _expression?.flushInformative();
3634 } 3634 }
3635 3635
3636 fb.Offset finish(fb.Builder fbBuilder) { 3636 fb.Offset finish(fb.Builder fbBuilder) {
3637 assert(!_finished); 3637 assert(!_finished);
3638 _finished = true; 3638 _finished = true;
3639 fb.Offset offset_argumentNames;
3639 fb.Offset offset_arguments; 3640 fb.Offset offset_arguments;
3640 fb.Offset offset_argumentNames;
3641 fb.Offset offset_expression; 3641 fb.Offset offset_expression;
3642 fb.Offset offset_name; 3642 fb.Offset offset_name;
3643 if (!(_argumentNames == null || _argumentNames.isEmpty)) {
3644 offset_argumentNames = fbBuilder.writeList(_argumentNames.map((b) => fbBui lder.writeString(b)).toList());
3645 }
3643 if (!(_arguments == null || _arguments.isEmpty)) { 3646 if (!(_arguments == null || _arguments.isEmpty)) {
3644 offset_arguments = fbBuilder.writeList(_arguments.map((b) => b.finish(fbBu ilder)).toList()); 3647 offset_arguments = fbBuilder.writeList(_arguments.map((b) => b.finish(fbBu ilder)).toList());
3645 } 3648 }
3646 if (!(_argumentNames == null || _argumentNames.isEmpty)) {
3647 offset_argumentNames = fbBuilder.writeList(_argumentNames.map((b) => fbBui lder.writeString(b)).toList());
3648 }
3649 if (_expression != null) { 3649 if (_expression != null) {
3650 offset_expression = _expression.finish(fbBuilder); 3650 offset_expression = _expression.finish(fbBuilder);
3651 } 3651 }
3652 if (_name != null) { 3652 if (_name != null) {
3653 offset_name = fbBuilder.writeString(_name); 3653 offset_name = fbBuilder.writeString(_name);
3654 } 3654 }
3655 fbBuilder.startTable(); 3655 fbBuilder.startTable();
3656 if (offset_argumentNames != null) {
3657 fbBuilder.addOffset(4, offset_argumentNames);
3658 }
3656 if (offset_arguments != null) { 3659 if (offset_arguments != null) {
3657 fbBuilder.addOffset(3, offset_arguments); 3660 fbBuilder.addOffset(3, offset_arguments);
3658 } 3661 }
3659 if (offset_argumentNames != null) {
3660 fbBuilder.addOffset(4, offset_argumentNames);
3661 }
3662 if (offset_expression != null) { 3662 if (offset_expression != null) {
3663 fbBuilder.addOffset(1, offset_expression); 3663 fbBuilder.addOffset(1, offset_expression);
3664 } 3664 }
3665 if (_kind != null && _kind != idl.UnlinkedConstructorInitializerKind.field) { 3665 if (_kind != null && _kind != idl.UnlinkedConstructorInitializerKind.field) {
3666 fbBuilder.addUint8(2, _kind.index); 3666 fbBuilder.addUint8(2, _kind.index);
3667 } 3667 }
3668 if (offset_name != null) { 3668 if (offset_name != null) {
3669 fbBuilder.addOffset(0, offset_name); 3669 fbBuilder.addOffset(0, offset_name);
3670 } 3670 }
3671 return fbBuilder.endTable(); 3671 return fbBuilder.endTable();
3672 } 3672 }
3673 } 3673 }
3674 3674
3675 class _UnlinkedConstructorInitializerReader extends fb.TableReader<_UnlinkedCons tructorInitializerImpl> { 3675 class _UnlinkedConstructorInitializerReader extends fb.TableReader<_UnlinkedCons tructorInitializerImpl> {
3676 const _UnlinkedConstructorInitializerReader(); 3676 const _UnlinkedConstructorInitializerReader();
3677 3677
3678 @override 3678 @override
3679 _UnlinkedConstructorInitializerImpl createObject(fb.BufferContext bc, int offs et) => new _UnlinkedConstructorInitializerImpl(bc, offset); 3679 _UnlinkedConstructorInitializerImpl createObject(fb.BufferContext bc, int offs et) => new _UnlinkedConstructorInitializerImpl(bc, offset);
3680 } 3680 }
3681 3681
3682 class _UnlinkedConstructorInitializerImpl extends Object with _UnlinkedConstruct orInitializerMixin implements idl.UnlinkedConstructorInitializer { 3682 class _UnlinkedConstructorInitializerImpl extends Object with _UnlinkedConstruct orInitializerMixin implements idl.UnlinkedConstructorInitializer {
3683 final fb.BufferContext _bc; 3683 final fb.BufferContext _bc;
3684 final int _bcOffset; 3684 final int _bcOffset;
3685 3685
3686 _UnlinkedConstructorInitializerImpl(this._bc, this._bcOffset); 3686 _UnlinkedConstructorInitializerImpl(this._bc, this._bcOffset);
3687 3687
3688 List<String> _argumentNames;
3688 List<idl.UnlinkedConst> _arguments; 3689 List<idl.UnlinkedConst> _arguments;
3689 List<String> _argumentNames;
3690 idl.UnlinkedConst _expression; 3690 idl.UnlinkedConst _expression;
3691 idl.UnlinkedConstructorInitializerKind _kind; 3691 idl.UnlinkedConstructorInitializerKind _kind;
3692 String _name; 3692 String _name;
3693 3693
3694 @override 3694 @override
3695 List<String> get argumentNames {
3696 _argumentNames ??= const fb.ListReader<String>(const fb.StringReader()).vTab leGet(_bc, _bcOffset, 4, const <String>[]);
3697 return _argumentNames;
3698 }
3699
3700 @override
3695 List<idl.UnlinkedConst> get arguments { 3701 List<idl.UnlinkedConst> get arguments {
3696 _arguments ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConstRe ader()).vTableGet(_bc, _bcOffset, 3, const <idl.UnlinkedConst>[]); 3702 _arguments ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConstRe ader()).vTableGet(_bc, _bcOffset, 3, const <idl.UnlinkedConst>[]);
3697 return _arguments; 3703 return _arguments;
3698 } 3704 }
3699 3705
3700 @override 3706 @override
3701 List<String> get argumentNames {
3702 _argumentNames ??= const fb.ListReader<String>(const fb.StringReader()).vTab leGet(_bc, _bcOffset, 4, const <String>[]);
3703 return _argumentNames;
3704 }
3705
3706 @override
3707 idl.UnlinkedConst get expression { 3707 idl.UnlinkedConst get expression {
3708 _expression ??= const _UnlinkedConstReader().vTableGet(_bc, _bcOffset, 1, nu ll); 3708 _expression ??= const _UnlinkedConstReader().vTableGet(_bc, _bcOffset, 1, nu ll);
3709 return _expression; 3709 return _expression;
3710 } 3710 }
3711 3711
3712 @override 3712 @override
3713 idl.UnlinkedConstructorInitializerKind get kind { 3713 idl.UnlinkedConstructorInitializerKind get kind {
3714 _kind ??= const _UnlinkedConstructorInitializerKindReader().vTableGet(_bc, _ bcOffset, 2, idl.UnlinkedConstructorInitializerKind.field); 3714 _kind ??= const _UnlinkedConstructorInitializerKindReader().vTableGet(_bc, _ bcOffset, 2, idl.UnlinkedConstructorInitializerKind.field);
3715 return _kind; 3715 return _kind;
3716 } 3716 }
3717 3717
3718 @override 3718 @override
3719 String get name { 3719 String get name {
3720 _name ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 0, ''); 3720 _name ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 0, '');
3721 return _name; 3721 return _name;
3722 } 3722 }
3723 } 3723 }
3724 3724
3725 abstract class _UnlinkedConstructorInitializerMixin implements idl.UnlinkedConst ructorInitializer { 3725 abstract class _UnlinkedConstructorInitializerMixin implements idl.UnlinkedConst ructorInitializer {
3726 @override 3726 @override
3727 Map<String, Object> toJson() { 3727 Map<String, Object> toJson() {
3728 Map<String, Object> _result = <String, Object>{}; 3728 Map<String, Object> _result = <String, Object>{};
3729 if (argumentNames.isNotEmpty) _result["argumentNames"] = argumentNames;
3729 if (arguments.isNotEmpty) _result["arguments"] = arguments.map((_value) => _ value.toJson()).toList(); 3730 if (arguments.isNotEmpty) _result["arguments"] = arguments.map((_value) => _ value.toJson()).toList();
3730 if (argumentNames.isNotEmpty) _result["argumentNames"] = argumentNames;
3731 if (expression != null) _result["expression"] = expression.toJson(); 3731 if (expression != null) _result["expression"] = expression.toJson();
3732 if (kind != idl.UnlinkedConstructorInitializerKind.field) _result["kind"] = kind.toString().split('.')[1]; 3732 if (kind != idl.UnlinkedConstructorInitializerKind.field) _result["kind"] = kind.toString().split('.')[1];
3733 if (name != '') _result["name"] = name; 3733 if (name != '') _result["name"] = name;
3734 return _result; 3734 return _result;
3735 } 3735 }
3736 3736
3737 @override 3737 @override
3738 Map<String, Object> toMap() => { 3738 Map<String, Object> toMap() => {
3739 "argumentNames": argumentNames,
3739 "arguments": arguments, 3740 "arguments": arguments,
3740 "argumentNames": argumentNames,
3741 "expression": expression, 3741 "expression": expression,
3742 "kind": kind, 3742 "kind": kind,
3743 "name": name, 3743 "name": name,
3744 }; 3744 };
3745 3745
3746 @override 3746 @override
3747 String toString() => convert.JSON.encode(toJson()); 3747 String toString() => convert.JSON.encode(toJson());
3748 } 3748 }
3749 3749
3750 class UnlinkedDocumentationCommentBuilder extends Object with _UnlinkedDocumenta tionCommentMixin implements idl.UnlinkedDocumentationComment { 3750 class UnlinkedDocumentationCommentBuilder extends Object with _UnlinkedDocumenta tionCommentMixin implements idl.UnlinkedDocumentationComment {
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
4243 }; 4243 };
4244 4244
4245 @override 4245 @override
4246 String toString() => convert.JSON.encode(toJson()); 4246 String toString() => convert.JSON.encode(toJson());
4247 } 4247 }
4248 4248
4249 class UnlinkedExecutableBuilder extends Object with _UnlinkedExecutableMixin imp lements idl.UnlinkedExecutable { 4249 class UnlinkedExecutableBuilder extends Object with _UnlinkedExecutableMixin imp lements idl.UnlinkedExecutable {
4250 bool _finished = false; 4250 bool _finished = false;
4251 4251
4252 List<UnlinkedConstBuilder> _annotations; 4252 List<UnlinkedConstBuilder> _annotations;
4253 UnlinkedConstBuilder _bodyExpr;
4253 CodeRangeBuilder _codeRange; 4254 CodeRangeBuilder _codeRange;
4254 List<UnlinkedConstructorInitializerBuilder> _constantInitializers; 4255 List<UnlinkedConstructorInitializerBuilder> _constantInitializers;
4255 int _constCycleSlot; 4256 int _constCycleSlot;
4256 UnlinkedDocumentationCommentBuilder _documentationComment; 4257 UnlinkedDocumentationCommentBuilder _documentationComment;
4257 int _inferredReturnTypeSlot; 4258 int _inferredReturnTypeSlot;
4258 bool _isAbstract; 4259 bool _isAbstract;
4259 bool _isAsynchronous; 4260 bool _isAsynchronous;
4260 bool _isConst; 4261 bool _isConst;
4261 bool _isExternal; 4262 bool _isExternal;
4262 bool _isFactory; 4263 bool _isFactory;
(...skipping 21 matching lines...) Expand all
4284 4285
4285 /** 4286 /**
4286 * Annotations for this executable. 4287 * Annotations for this executable.
4287 */ 4288 */
4288 void set annotations(List<UnlinkedConstBuilder> _value) { 4289 void set annotations(List<UnlinkedConstBuilder> _value) {
4289 assert(!_finished); 4290 assert(!_finished);
4290 _annotations = _value; 4291 _annotations = _value;
4291 } 4292 }
4292 4293
4293 @override 4294 @override
4295 UnlinkedConstBuilder get bodyExpr => _bodyExpr;
4296
4297 /**
4298 * If this executable's function body is declared using `=>`, the expression
4299 * to the right of the `=>`. May be omitted if neither type inference nor
4300 * constant evaluation depends on the function body.
4301 */
4302 void set bodyExpr(UnlinkedConstBuilder _value) {
4303 assert(!_finished);
4304 _bodyExpr = _value;
4305 }
4306
4307 @override
4294 CodeRangeBuilder get codeRange => _codeRange; 4308 CodeRangeBuilder get codeRange => _codeRange;
4295 4309
4296 /** 4310 /**
4297 * Code range of the executable. 4311 * Code range of the executable.
4298 */ 4312 */
4299 void set codeRange(CodeRangeBuilder _value) { 4313 void set codeRange(CodeRangeBuilder _value) {
4300 assert(!_finished); 4314 assert(!_finished);
4301 _codeRange = _value; 4315 _codeRange = _value;
4302 } 4316 }
4303 4317
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
4631 4645
4632 /** 4646 /**
4633 * If a local function, the beginning of the visible range; zero otherwise. 4647 * If a local function, the beginning of the visible range; zero otherwise.
4634 */ 4648 */
4635 void set visibleOffset(int _value) { 4649 void set visibleOffset(int _value) {
4636 assert(!_finished); 4650 assert(!_finished);
4637 assert(_value == null || _value >= 0); 4651 assert(_value == null || _value >= 0);
4638 _visibleOffset = _value; 4652 _visibleOffset = _value;
4639 } 4653 }
4640 4654
4641 UnlinkedExecutableBuilder({List<UnlinkedConstBuilder> annotations, CodeRangeBu ilder codeRange, List<UnlinkedConstructorInitializerBuilder> constantInitializer s, 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<UnlinkedVariableB uilder> localVariables, String name, int nameEnd, int nameOffset, List<UnlinkedP aramBuilder> parameters, int periodOffset, EntityRefBuilder redirectedConstructo r, String redirectedConstructorName, EntityRefBuilder returnType, List<UnlinkedT ypeParamBuilder> typeParameters, int visibleLength, int visibleOffset}) 4655 UnlinkedExecutableBuilder({List<UnlinkedConstBuilder> annotations, UnlinkedCon stBuilder bodyExpr, CodeRangeBuilder codeRange, List<UnlinkedConstructorInitiali zerBuilder> constantInitializers, int constCycleSlot, UnlinkedDocumentationComme ntBuilder documentationComment, int inferredReturnTypeSlot, bool isAbstract, boo l isAsynchronous, bool isConst, bool isExternal, bool isFactory, bool isGenerato r, bool isRedirectedConstructor, bool isStatic, idl.UnlinkedExecutableKind kind, List<UnlinkedExecutableBuilder> localFunctions, List<UnlinkedLabelBuilder> loca lLabels, List<UnlinkedVariableBuilder> localVariables, String name, int nameEnd, int nameOffset, List<UnlinkedParamBuilder> parameters, int periodOffset, Entity RefBuilder redirectedConstructor, String redirectedConstructorName, EntityRefBui lder returnType, List<UnlinkedTypeParamBuilder> typeParameters, int visibleLengt h, int visibleOffset})
4642 : _annotations = annotations, 4656 : _annotations = annotations,
4657 _bodyExpr = bodyExpr,
4643 _codeRange = codeRange, 4658 _codeRange = codeRange,
4644 _constantInitializers = constantInitializers, 4659 _constantInitializers = constantInitializers,
4645 _constCycleSlot = constCycleSlot, 4660 _constCycleSlot = constCycleSlot,
4646 _documentationComment = documentationComment, 4661 _documentationComment = documentationComment,
4647 _inferredReturnTypeSlot = inferredReturnTypeSlot, 4662 _inferredReturnTypeSlot = inferredReturnTypeSlot,
4648 _isAbstract = isAbstract, 4663 _isAbstract = isAbstract,
4649 _isAsynchronous = isAsynchronous, 4664 _isAsynchronous = isAsynchronous,
4650 _isConst = isConst, 4665 _isConst = isConst,
4651 _isExternal = isExternal, 4666 _isExternal = isExternal,
4652 _isFactory = isFactory, 4667 _isFactory = isFactory,
(...skipping 14 matching lines...) Expand all
4667 _returnType = returnType, 4682 _returnType = returnType,
4668 _typeParameters = typeParameters, 4683 _typeParameters = typeParameters,
4669 _visibleLength = visibleLength, 4684 _visibleLength = visibleLength,
4670 _visibleOffset = visibleOffset; 4685 _visibleOffset = visibleOffset;
4671 4686
4672 /** 4687 /**
4673 * Flush [informative] data recursively. 4688 * Flush [informative] data recursively.
4674 */ 4689 */
4675 void flushInformative() { 4690 void flushInformative() {
4676 _annotations?.forEach((b) => b.flushInformative()); 4691 _annotations?.forEach((b) => b.flushInformative());
4692 _bodyExpr?.flushInformative();
4677 _codeRange = null; 4693 _codeRange = null;
4678 _constantInitializers?.forEach((b) => b.flushInformative()); 4694 _constantInitializers?.forEach((b) => b.flushInformative());
4679 _documentationComment = null; 4695 _documentationComment = null;
4680 _isAsynchronous = null; 4696 _isAsynchronous = null;
4681 _isGenerator = null; 4697 _isGenerator = null;
4682 _localFunctions?.forEach((b) => b.flushInformative()); 4698 _localFunctions?.forEach((b) => b.flushInformative());
4683 _localLabels = null; 4699 _localLabels = null;
4684 _localVariables = null; 4700 _localVariables = null;
4685 _nameEnd = null; 4701 _nameEnd = null;
4686 _nameOffset = null; 4702 _nameOffset = null;
4687 _parameters?.forEach((b) => b.flushInformative()); 4703 _parameters?.forEach((b) => b.flushInformative());
4688 _periodOffset = null; 4704 _periodOffset = null;
4689 _redirectedConstructor?.flushInformative(); 4705 _redirectedConstructor?.flushInformative();
4690 _returnType?.flushInformative(); 4706 _returnType?.flushInformative();
4691 _typeParameters?.forEach((b) => b.flushInformative()); 4707 _typeParameters?.forEach((b) => b.flushInformative());
4692 } 4708 }
4693 4709
4694 fb.Offset finish(fb.Builder fbBuilder) { 4710 fb.Offset finish(fb.Builder fbBuilder) {
4695 assert(!_finished); 4711 assert(!_finished);
4696 _finished = true; 4712 _finished = true;
4697 fb.Offset offset_annotations; 4713 fb.Offset offset_annotations;
4714 fb.Offset offset_bodyExpr;
4698 fb.Offset offset_codeRange; 4715 fb.Offset offset_codeRange;
4699 fb.Offset offset_constantInitializers; 4716 fb.Offset offset_constantInitializers;
4700 fb.Offset offset_documentationComment; 4717 fb.Offset offset_documentationComment;
4701 fb.Offset offset_localFunctions; 4718 fb.Offset offset_localFunctions;
4702 fb.Offset offset_localLabels; 4719 fb.Offset offset_localLabels;
4703 fb.Offset offset_localVariables; 4720 fb.Offset offset_localVariables;
4704 fb.Offset offset_name; 4721 fb.Offset offset_name;
4705 fb.Offset offset_parameters; 4722 fb.Offset offset_parameters;
4706 fb.Offset offset_redirectedConstructor; 4723 fb.Offset offset_redirectedConstructor;
4707 fb.Offset offset_redirectedConstructorName; 4724 fb.Offset offset_redirectedConstructorName;
4708 fb.Offset offset_returnType; 4725 fb.Offset offset_returnType;
4709 fb.Offset offset_typeParameters; 4726 fb.Offset offset_typeParameters;
4710 if (!(_annotations == null || _annotations.isEmpty)) { 4727 if (!(_annotations == null || _annotations.isEmpty)) {
4711 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish( fbBuilder)).toList()); 4728 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish( fbBuilder)).toList());
4712 } 4729 }
4730 if (_bodyExpr != null) {
4731 offset_bodyExpr = _bodyExpr.finish(fbBuilder);
4732 }
4713 if (_codeRange != null) { 4733 if (_codeRange != null) {
4714 offset_codeRange = _codeRange.finish(fbBuilder); 4734 offset_codeRange = _codeRange.finish(fbBuilder);
4715 } 4735 }
4716 if (!(_constantInitializers == null || _constantInitializers.isEmpty)) { 4736 if (!(_constantInitializers == null || _constantInitializers.isEmpty)) {
4717 offset_constantInitializers = fbBuilder.writeList(_constantInitializers.ma p((b) => b.finish(fbBuilder)).toList()); 4737 offset_constantInitializers = fbBuilder.writeList(_constantInitializers.ma p((b) => b.finish(fbBuilder)).toList());
4718 } 4738 }
4719 if (_documentationComment != null) { 4739 if (_documentationComment != null) {
4720 offset_documentationComment = _documentationComment.finish(fbBuilder); 4740 offset_documentationComment = _documentationComment.finish(fbBuilder);
4721 } 4741 }
4722 if (!(_localFunctions == null || _localFunctions.isEmpty)) { 4742 if (!(_localFunctions == null || _localFunctions.isEmpty)) {
(...skipping 20 matching lines...) Expand all
4743 if (_returnType != null) { 4763 if (_returnType != null) {
4744 offset_returnType = _returnType.finish(fbBuilder); 4764 offset_returnType = _returnType.finish(fbBuilder);
4745 } 4765 }
4746 if (!(_typeParameters == null || _typeParameters.isEmpty)) { 4766 if (!(_typeParameters == null || _typeParameters.isEmpty)) {
4747 offset_typeParameters = fbBuilder.writeList(_typeParameters.map((b) => b.f inish(fbBuilder)).toList()); 4767 offset_typeParameters = fbBuilder.writeList(_typeParameters.map((b) => b.f inish(fbBuilder)).toList());
4748 } 4768 }
4749 fbBuilder.startTable(); 4769 fbBuilder.startTable();
4750 if (offset_annotations != null) { 4770 if (offset_annotations != null) {
4751 fbBuilder.addOffset(6, offset_annotations); 4771 fbBuilder.addOffset(6, offset_annotations);
4752 } 4772 }
4773 if (offset_bodyExpr != null) {
4774 fbBuilder.addOffset(29, offset_bodyExpr);
4775 }
4753 if (offset_codeRange != null) { 4776 if (offset_codeRange != null) {
4754 fbBuilder.addOffset(26, offset_codeRange); 4777 fbBuilder.addOffset(26, offset_codeRange);
4755 } 4778 }
4756 if (offset_constantInitializers != null) { 4779 if (offset_constantInitializers != null) {
4757 fbBuilder.addOffset(14, offset_constantInitializers); 4780 fbBuilder.addOffset(14, offset_constantInitializers);
4758 } 4781 }
4759 if (_constCycleSlot != null && _constCycleSlot != 0) { 4782 if (_constCycleSlot != null && _constCycleSlot != 0) {
4760 fbBuilder.addUint32(25, _constCycleSlot); 4783 fbBuilder.addUint32(25, _constCycleSlot);
4761 } 4784 }
4762 if (offset_documentationComment != null) { 4785 if (offset_documentationComment != null) {
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
4845 _UnlinkedExecutableImpl createObject(fb.BufferContext bc, int offset) => new _ UnlinkedExecutableImpl(bc, offset); 4868 _UnlinkedExecutableImpl createObject(fb.BufferContext bc, int offset) => new _ UnlinkedExecutableImpl(bc, offset);
4846 } 4869 }
4847 4870
4848 class _UnlinkedExecutableImpl extends Object with _UnlinkedExecutableMixin imple ments idl.UnlinkedExecutable { 4871 class _UnlinkedExecutableImpl extends Object with _UnlinkedExecutableMixin imple ments idl.UnlinkedExecutable {
4849 final fb.BufferContext _bc; 4872 final fb.BufferContext _bc;
4850 final int _bcOffset; 4873 final int _bcOffset;
4851 4874
4852 _UnlinkedExecutableImpl(this._bc, this._bcOffset); 4875 _UnlinkedExecutableImpl(this._bc, this._bcOffset);
4853 4876
4854 List<idl.UnlinkedConst> _annotations; 4877 List<idl.UnlinkedConst> _annotations;
4878 idl.UnlinkedConst _bodyExpr;
4855 idl.CodeRange _codeRange; 4879 idl.CodeRange _codeRange;
4856 List<idl.UnlinkedConstructorInitializer> _constantInitializers; 4880 List<idl.UnlinkedConstructorInitializer> _constantInitializers;
4857 int _constCycleSlot; 4881 int _constCycleSlot;
4858 idl.UnlinkedDocumentationComment _documentationComment; 4882 idl.UnlinkedDocumentationComment _documentationComment;
4859 int _inferredReturnTypeSlot; 4883 int _inferredReturnTypeSlot;
4860 bool _isAbstract; 4884 bool _isAbstract;
4861 bool _isAsynchronous; 4885 bool _isAsynchronous;
4862 bool _isConst; 4886 bool _isConst;
4863 bool _isExternal; 4887 bool _isExternal;
4864 bool _isFactory; 4888 bool _isFactory;
(...skipping 16 matching lines...) Expand all
4881 int _visibleLength; 4905 int _visibleLength;
4882 int _visibleOffset; 4906 int _visibleOffset;
4883 4907
4884 @override 4908 @override
4885 List<idl.UnlinkedConst> get annotations { 4909 List<idl.UnlinkedConst> get annotations {
4886 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst Reader()).vTableGet(_bc, _bcOffset, 6, const <idl.UnlinkedConst>[]); 4910 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst Reader()).vTableGet(_bc, _bcOffset, 6, const <idl.UnlinkedConst>[]);
4887 return _annotations; 4911 return _annotations;
4888 } 4912 }
4889 4913
4890 @override 4914 @override
4915 idl.UnlinkedConst get bodyExpr {
4916 _bodyExpr ??= const _UnlinkedConstReader().vTableGet(_bc, _bcOffset, 29, nul l);
4917 return _bodyExpr;
4918 }
4919
4920 @override
4891 idl.CodeRange get codeRange { 4921 idl.CodeRange get codeRange {
4892 _codeRange ??= const _CodeRangeReader().vTableGet(_bc, _bcOffset, 26, null); 4922 _codeRange ??= const _CodeRangeReader().vTableGet(_bc, _bcOffset, 26, null);
4893 return _codeRange; 4923 return _codeRange;
4894 } 4924 }
4895 4925
4896 @override 4926 @override
4897 List<idl.UnlinkedConstructorInitializer> get constantInitializers { 4927 List<idl.UnlinkedConstructorInitializer> get constantInitializers {
4898 _constantInitializers ??= const fb.ListReader<idl.UnlinkedConstructorInitial izer>(const _UnlinkedConstructorInitializerReader()).vTableGet(_bc, _bcOffset, 1 4, const <idl.UnlinkedConstructorInitializer>[]); 4928 _constantInitializers ??= const fb.ListReader<idl.UnlinkedConstructorInitial izer>(const _UnlinkedConstructorInitializerReader()).vTableGet(_bc, _bcOffset, 1 4, const <idl.UnlinkedConstructorInitializer>[]);
4899 return _constantInitializers; 4929 return _constantInitializers;
4900 } 4930 }
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
5054 _visibleOffset ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 21, 0); 5084 _visibleOffset ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 21, 0);
5055 return _visibleOffset; 5085 return _visibleOffset;
5056 } 5086 }
5057 } 5087 }
5058 5088
5059 abstract class _UnlinkedExecutableMixin implements idl.UnlinkedExecutable { 5089 abstract class _UnlinkedExecutableMixin implements idl.UnlinkedExecutable {
5060 @override 5090 @override
5061 Map<String, Object> toJson() { 5091 Map<String, Object> toJson() {
5062 Map<String, Object> _result = <String, Object>{}; 5092 Map<String, Object> _result = <String, Object>{};
5063 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value ) => _value.toJson()).toList(); 5093 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value ) => _value.toJson()).toList();
5094 if (bodyExpr != null) _result["bodyExpr"] = bodyExpr.toJson();
5064 if (codeRange != null) _result["codeRange"] = codeRange.toJson(); 5095 if (codeRange != null) _result["codeRange"] = codeRange.toJson();
5065 if (constantInitializers.isNotEmpty) _result["constantInitializers"] = const antInitializers.map((_value) => _value.toJson()).toList(); 5096 if (constantInitializers.isNotEmpty) _result["constantInitializers"] = const antInitializers.map((_value) => _value.toJson()).toList();
5066 if (constCycleSlot != 0) _result["constCycleSlot"] = constCycleSlot; 5097 if (constCycleSlot != 0) _result["constCycleSlot"] = constCycleSlot;
5067 if (documentationComment != null) _result["documentationComment"] = document ationComment.toJson(); 5098 if (documentationComment != null) _result["documentationComment"] = document ationComment.toJson();
5068 if (inferredReturnTypeSlot != 0) _result["inferredReturnTypeSlot"] = inferre dReturnTypeSlot; 5099 if (inferredReturnTypeSlot != 0) _result["inferredReturnTypeSlot"] = inferre dReturnTypeSlot;
5069 if (isAbstract != false) _result["isAbstract"] = isAbstract; 5100 if (isAbstract != false) _result["isAbstract"] = isAbstract;
5070 if (isAsynchronous != false) _result["isAsynchronous"] = isAsynchronous; 5101 if (isAsynchronous != false) _result["isAsynchronous"] = isAsynchronous;
5071 if (isConst != false) _result["isConst"] = isConst; 5102 if (isConst != false) _result["isConst"] = isConst;
5072 if (isExternal != false) _result["isExternal"] = isExternal; 5103 if (isExternal != false) _result["isExternal"] = isExternal;
5073 if (isFactory != false) _result["isFactory"] = isFactory; 5104 if (isFactory != false) _result["isFactory"] = isFactory;
(...skipping 14 matching lines...) Expand all
5088 if (returnType != null) _result["returnType"] = returnType.toJson(); 5119 if (returnType != null) _result["returnType"] = returnType.toJson();
5089 if (typeParameters.isNotEmpty) _result["typeParameters"] = typeParameters.ma p((_value) => _value.toJson()).toList(); 5120 if (typeParameters.isNotEmpty) _result["typeParameters"] = typeParameters.ma p((_value) => _value.toJson()).toList();
5090 if (visibleLength != 0) _result["visibleLength"] = visibleLength; 5121 if (visibleLength != 0) _result["visibleLength"] = visibleLength;
5091 if (visibleOffset != 0) _result["visibleOffset"] = visibleOffset; 5122 if (visibleOffset != 0) _result["visibleOffset"] = visibleOffset;
5092 return _result; 5123 return _result;
5093 } 5124 }
5094 5125
5095 @override 5126 @override
5096 Map<String, Object> toMap() => { 5127 Map<String, Object> toMap() => {
5097 "annotations": annotations, 5128 "annotations": annotations,
5129 "bodyExpr": bodyExpr,
5098 "codeRange": codeRange, 5130 "codeRange": codeRange,
5099 "constantInitializers": constantInitializers, 5131 "constantInitializers": constantInitializers,
5100 "constCycleSlot": constCycleSlot, 5132 "constCycleSlot": constCycleSlot,
5101 "documentationComment": documentationComment, 5133 "documentationComment": documentationComment,
5102 "inferredReturnTypeSlot": inferredReturnTypeSlot, 5134 "inferredReturnTypeSlot": inferredReturnTypeSlot,
5103 "isAbstract": isAbstract, 5135 "isAbstract": isAbstract,
5104 "isAsynchronous": isAsynchronous, 5136 "isAsynchronous": isAsynchronous,
5105 "isConst": isConst, 5137 "isConst": isConst,
5106 "isExternal": isExternal, 5138 "isExternal": isExternal,
5107 "isFactory": isFactory, 5139 "isFactory": isFactory,
(...skipping 2887 matching lines...) Expand 10 before | Expand all | Expand 10 after
7995 8027
7996 @override 8028 @override
7997 String toString() => convert.JSON.encode(toJson()); 8029 String toString() => convert.JSON.encode(toJson());
7998 } 8030 }
7999 8031
8000 class UnlinkedVariableBuilder extends Object with _UnlinkedVariableMixin impleme nts idl.UnlinkedVariable { 8032 class UnlinkedVariableBuilder extends Object with _UnlinkedVariableMixin impleme nts idl.UnlinkedVariable {
8001 bool _finished = false; 8033 bool _finished = false;
8002 8034
8003 List<UnlinkedConstBuilder> _annotations; 8035 List<UnlinkedConstBuilder> _annotations;
8004 CodeRangeBuilder _codeRange; 8036 CodeRangeBuilder _codeRange;
8005 UnlinkedConstBuilder _constExpr;
8006 UnlinkedDocumentationCommentBuilder _documentationComment; 8037 UnlinkedDocumentationCommentBuilder _documentationComment;
8007 int _inferredTypeSlot; 8038 int _inferredTypeSlot;
8008 UnlinkedExecutableBuilder _initializer; 8039 UnlinkedExecutableBuilder _initializer;
8009 bool _isConst; 8040 bool _isConst;
8010 bool _isFinal; 8041 bool _isFinal;
8011 bool _isStatic; 8042 bool _isStatic;
8012 String _name; 8043 String _name;
8013 int _nameOffset; 8044 int _nameOffset;
8014 int _propagatedTypeSlot; 8045 int _propagatedTypeSlot;
8015 EntityRefBuilder _type; 8046 EntityRefBuilder _type;
(...skipping 16 matching lines...) Expand all
8032 8063
8033 /** 8064 /**
8034 * Code range of the variable. 8065 * Code range of the variable.
8035 */ 8066 */
8036 void set codeRange(CodeRangeBuilder _value) { 8067 void set codeRange(CodeRangeBuilder _value) {
8037 assert(!_finished); 8068 assert(!_finished);
8038 _codeRange = _value; 8069 _codeRange = _value;
8039 } 8070 }
8040 8071
8041 @override 8072 @override
8042 UnlinkedConstBuilder get constExpr => _constExpr;
8043
8044 /**
8045 * If [isConst] is true, and the variable has an initializer, the constant
8046 * expression in the initializer. Note that the presence of this expression
8047 * does not mean that it is a valid, check [UnlinkedConst.isInvalid].
8048 */
8049 void set constExpr(UnlinkedConstBuilder _value) {
8050 assert(!_finished);
8051 _constExpr = _value;
8052 }
8053
8054 @override
8055 UnlinkedDocumentationCommentBuilder get documentationComment => _documentation Comment; 8073 UnlinkedDocumentationCommentBuilder get documentationComment => _documentation Comment;
8056 8074
8057 /** 8075 /**
8058 * Documentation comment for the variable, or `null` if there is no 8076 * Documentation comment for the variable, or `null` if there is no
8059 * documentation comment. 8077 * documentation comment.
8060 */ 8078 */
8061 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) { 8079 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) {
8062 assert(!_finished); 8080 assert(!_finished);
8063 _documentationComment = _value; 8081 _documentationComment = _value;
8064 } 8082 }
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
8195 8213
8196 /** 8214 /**
8197 * If a local variable, the beginning of the visible range; zero otherwise. 8215 * If a local variable, the beginning of the visible range; zero otherwise.
8198 */ 8216 */
8199 void set visibleOffset(int _value) { 8217 void set visibleOffset(int _value) {
8200 assert(!_finished); 8218 assert(!_finished);
8201 assert(_value == null || _value >= 0); 8219 assert(_value == null || _value >= 0);
8202 _visibleOffset = _value; 8220 _visibleOffset = _value;
8203 } 8221 }
8204 8222
8205 UnlinkedVariableBuilder({List<UnlinkedConstBuilder> annotations, CodeRangeBuil der codeRange, UnlinkedConstBuilder constExpr, UnlinkedDocumentationCommentBuild er documentationComment, int inferredTypeSlot, UnlinkedExecutableBuilder initial izer, bool isConst, bool isFinal, bool isStatic, String name, int nameOffset, in t propagatedTypeSlot, EntityRefBuilder type, int visibleLength, int visibleOffse t}) 8223 UnlinkedVariableBuilder({List<UnlinkedConstBuilder> annotations, CodeRangeBuil der codeRange, UnlinkedDocumentationCommentBuilder documentationComment, int inf erredTypeSlot, UnlinkedExecutableBuilder initializer, bool isConst, bool isFinal , bool isStatic, String name, int nameOffset, int propagatedTypeSlot, EntityRefB uilder type, int visibleLength, int visibleOffset})
8206 : _annotations = annotations, 8224 : _annotations = annotations,
8207 _codeRange = codeRange, 8225 _codeRange = codeRange,
8208 _constExpr = constExpr,
8209 _documentationComment = documentationComment, 8226 _documentationComment = documentationComment,
8210 _inferredTypeSlot = inferredTypeSlot, 8227 _inferredTypeSlot = inferredTypeSlot,
8211 _initializer = initializer, 8228 _initializer = initializer,
8212 _isConst = isConst, 8229 _isConst = isConst,
8213 _isFinal = isFinal, 8230 _isFinal = isFinal,
8214 _isStatic = isStatic, 8231 _isStatic = isStatic,
8215 _name = name, 8232 _name = name,
8216 _nameOffset = nameOffset, 8233 _nameOffset = nameOffset,
8217 _propagatedTypeSlot = propagatedTypeSlot, 8234 _propagatedTypeSlot = propagatedTypeSlot,
8218 _type = type, 8235 _type = type,
8219 _visibleLength = visibleLength, 8236 _visibleLength = visibleLength,
8220 _visibleOffset = visibleOffset; 8237 _visibleOffset = visibleOffset;
8221 8238
8222 /** 8239 /**
8223 * Flush [informative] data recursively. 8240 * Flush [informative] data recursively.
8224 */ 8241 */
8225 void flushInformative() { 8242 void flushInformative() {
8226 _annotations?.forEach((b) => b.flushInformative()); 8243 _annotations?.forEach((b) => b.flushInformative());
8227 _codeRange = null; 8244 _codeRange = null;
8228 _constExpr?.flushInformative();
8229 _documentationComment = null; 8245 _documentationComment = null;
8230 _initializer?.flushInformative(); 8246 _initializer?.flushInformative();
8231 _nameOffset = null; 8247 _nameOffset = null;
8232 _type?.flushInformative(); 8248 _type?.flushInformative();
8233 } 8249 }
8234 8250
8235 fb.Offset finish(fb.Builder fbBuilder) { 8251 fb.Offset finish(fb.Builder fbBuilder) {
8236 assert(!_finished); 8252 assert(!_finished);
8237 _finished = true; 8253 _finished = true;
8238 fb.Offset offset_annotations; 8254 fb.Offset offset_annotations;
8239 fb.Offset offset_codeRange; 8255 fb.Offset offset_codeRange;
8240 fb.Offset offset_constExpr;
8241 fb.Offset offset_documentationComment; 8256 fb.Offset offset_documentationComment;
8242 fb.Offset offset_initializer; 8257 fb.Offset offset_initializer;
8243 fb.Offset offset_name; 8258 fb.Offset offset_name;
8244 fb.Offset offset_type; 8259 fb.Offset offset_type;
8245 if (!(_annotations == null || _annotations.isEmpty)) { 8260 if (!(_annotations == null || _annotations.isEmpty)) {
8246 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish( fbBuilder)).toList()); 8261 offset_annotations = fbBuilder.writeList(_annotations.map((b) => b.finish( fbBuilder)).toList());
8247 } 8262 }
8248 if (_codeRange != null) { 8263 if (_codeRange != null) {
8249 offset_codeRange = _codeRange.finish(fbBuilder); 8264 offset_codeRange = _codeRange.finish(fbBuilder);
8250 } 8265 }
8251 if (_constExpr != null) {
8252 offset_constExpr = _constExpr.finish(fbBuilder);
8253 }
8254 if (_documentationComment != null) { 8266 if (_documentationComment != null) {
8255 offset_documentationComment = _documentationComment.finish(fbBuilder); 8267 offset_documentationComment = _documentationComment.finish(fbBuilder);
8256 } 8268 }
8257 if (_initializer != null) { 8269 if (_initializer != null) {
8258 offset_initializer = _initializer.finish(fbBuilder); 8270 offset_initializer = _initializer.finish(fbBuilder);
8259 } 8271 }
8260 if (_name != null) { 8272 if (_name != null) {
8261 offset_name = fbBuilder.writeString(_name); 8273 offset_name = fbBuilder.writeString(_name);
8262 } 8274 }
8263 if (_type != null) { 8275 if (_type != null) {
8264 offset_type = _type.finish(fbBuilder); 8276 offset_type = _type.finish(fbBuilder);
8265 } 8277 }
8266 fbBuilder.startTable(); 8278 fbBuilder.startTable();
8267 if (offset_annotations != null) { 8279 if (offset_annotations != null) {
8268 fbBuilder.addOffset(8, offset_annotations); 8280 fbBuilder.addOffset(8, offset_annotations);
8269 } 8281 }
8270 if (offset_codeRange != null) { 8282 if (offset_codeRange != null) {
8271 fbBuilder.addOffset(14, offset_codeRange); 8283 fbBuilder.addOffset(5, offset_codeRange);
8272 }
8273 if (offset_constExpr != null) {
8274 fbBuilder.addOffset(5, offset_constExpr);
8275 } 8284 }
8276 if (offset_documentationComment != null) { 8285 if (offset_documentationComment != null) {
8277 fbBuilder.addOffset(10, offset_documentationComment); 8286 fbBuilder.addOffset(10, offset_documentationComment);
8278 } 8287 }
8279 if (_inferredTypeSlot != null && _inferredTypeSlot != 0) { 8288 if (_inferredTypeSlot != null && _inferredTypeSlot != 0) {
8280 fbBuilder.addUint32(9, _inferredTypeSlot); 8289 fbBuilder.addUint32(9, _inferredTypeSlot);
8281 } 8290 }
8282 if (offset_initializer != null) { 8291 if (offset_initializer != null) {
8283 fbBuilder.addOffset(13, offset_initializer); 8292 fbBuilder.addOffset(13, offset_initializer);
8284 } 8293 }
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
8321 } 8330 }
8322 8331
8323 class _UnlinkedVariableImpl extends Object with _UnlinkedVariableMixin implement s idl.UnlinkedVariable { 8332 class _UnlinkedVariableImpl extends Object with _UnlinkedVariableMixin implement s idl.UnlinkedVariable {
8324 final fb.BufferContext _bc; 8333 final fb.BufferContext _bc;
8325 final int _bcOffset; 8334 final int _bcOffset;
8326 8335
8327 _UnlinkedVariableImpl(this._bc, this._bcOffset); 8336 _UnlinkedVariableImpl(this._bc, this._bcOffset);
8328 8337
8329 List<idl.UnlinkedConst> _annotations; 8338 List<idl.UnlinkedConst> _annotations;
8330 idl.CodeRange _codeRange; 8339 idl.CodeRange _codeRange;
8331 idl.UnlinkedConst _constExpr;
8332 idl.UnlinkedDocumentationComment _documentationComment; 8340 idl.UnlinkedDocumentationComment _documentationComment;
8333 int _inferredTypeSlot; 8341 int _inferredTypeSlot;
8334 idl.UnlinkedExecutable _initializer; 8342 idl.UnlinkedExecutable _initializer;
8335 bool _isConst; 8343 bool _isConst;
8336 bool _isFinal; 8344 bool _isFinal;
8337 bool _isStatic; 8345 bool _isStatic;
8338 String _name; 8346 String _name;
8339 int _nameOffset; 8347 int _nameOffset;
8340 int _propagatedTypeSlot; 8348 int _propagatedTypeSlot;
8341 idl.EntityRef _type; 8349 idl.EntityRef _type;
8342 int _visibleLength; 8350 int _visibleLength;
8343 int _visibleOffset; 8351 int _visibleOffset;
8344 8352
8345 @override 8353 @override
8346 List<idl.UnlinkedConst> get annotations { 8354 List<idl.UnlinkedConst> get annotations {
8347 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst Reader()).vTableGet(_bc, _bcOffset, 8, const <idl.UnlinkedConst>[]); 8355 _annotations ??= const fb.ListReader<idl.UnlinkedConst>(const _UnlinkedConst Reader()).vTableGet(_bc, _bcOffset, 8, const <idl.UnlinkedConst>[]);
8348 return _annotations; 8356 return _annotations;
8349 } 8357 }
8350 8358
8351 @override 8359 @override
8352 idl.CodeRange get codeRange { 8360 idl.CodeRange get codeRange {
8353 _codeRange ??= const _CodeRangeReader().vTableGet(_bc, _bcOffset, 14, null); 8361 _codeRange ??= const _CodeRangeReader().vTableGet(_bc, _bcOffset, 5, null);
8354 return _codeRange; 8362 return _codeRange;
8355 } 8363 }
8356 8364
8357 @override 8365 @override
8358 idl.UnlinkedConst get constExpr {
8359 _constExpr ??= const _UnlinkedConstReader().vTableGet(_bc, _bcOffset, 5, nul l);
8360 return _constExpr;
8361 }
8362
8363 @override
8364 idl.UnlinkedDocumentationComment get documentationComment { 8366 idl.UnlinkedDocumentationComment get documentationComment {
8365 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable Get(_bc, _bcOffset, 10, null); 8367 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable Get(_bc, _bcOffset, 10, null);
8366 return _documentationComment; 8368 return _documentationComment;
8367 } 8369 }
8368 8370
8369 @override 8371 @override
8370 int get inferredTypeSlot { 8372 int get inferredTypeSlot {
8371 _inferredTypeSlot ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 9, 0 ); 8373 _inferredTypeSlot ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 9, 0 );
8372 return _inferredTypeSlot; 8374 return _inferredTypeSlot;
8373 } 8375 }
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
8432 return _visibleOffset; 8434 return _visibleOffset;
8433 } 8435 }
8434 } 8436 }
8435 8437
8436 abstract class _UnlinkedVariableMixin implements idl.UnlinkedVariable { 8438 abstract class _UnlinkedVariableMixin implements idl.UnlinkedVariable {
8437 @override 8439 @override
8438 Map<String, Object> toJson() { 8440 Map<String, Object> toJson() {
8439 Map<String, Object> _result = <String, Object>{}; 8441 Map<String, Object> _result = <String, Object>{};
8440 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value ) => _value.toJson()).toList(); 8442 if (annotations.isNotEmpty) _result["annotations"] = annotations.map((_value ) => _value.toJson()).toList();
8441 if (codeRange != null) _result["codeRange"] = codeRange.toJson(); 8443 if (codeRange != null) _result["codeRange"] = codeRange.toJson();
8442 if (constExpr != null) _result["constExpr"] = constExpr.toJson();
8443 if (documentationComment != null) _result["documentationComment"] = document ationComment.toJson(); 8444 if (documentationComment != null) _result["documentationComment"] = document ationComment.toJson();
8444 if (inferredTypeSlot != 0) _result["inferredTypeSlot"] = inferredTypeSlot; 8445 if (inferredTypeSlot != 0) _result["inferredTypeSlot"] = inferredTypeSlot;
8445 if (initializer != null) _result["initializer"] = initializer.toJson(); 8446 if (initializer != null) _result["initializer"] = initializer.toJson();
8446 if (isConst != false) _result["isConst"] = isConst; 8447 if (isConst != false) _result["isConst"] = isConst;
8447 if (isFinal != false) _result["isFinal"] = isFinal; 8448 if (isFinal != false) _result["isFinal"] = isFinal;
8448 if (isStatic != false) _result["isStatic"] = isStatic; 8449 if (isStatic != false) _result["isStatic"] = isStatic;
8449 if (name != '') _result["name"] = name; 8450 if (name != '') _result["name"] = name;
8450 if (nameOffset != 0) _result["nameOffset"] = nameOffset; 8451 if (nameOffset != 0) _result["nameOffset"] = nameOffset;
8451 if (propagatedTypeSlot != 0) _result["propagatedTypeSlot"] = propagatedTypeS lot; 8452 if (propagatedTypeSlot != 0) _result["propagatedTypeSlot"] = propagatedTypeS lot;
8452 if (type != null) _result["type"] = type.toJson(); 8453 if (type != null) _result["type"] = type.toJson();
8453 if (visibleLength != 0) _result["visibleLength"] = visibleLength; 8454 if (visibleLength != 0) _result["visibleLength"] = visibleLength;
8454 if (visibleOffset != 0) _result["visibleOffset"] = visibleOffset; 8455 if (visibleOffset != 0) _result["visibleOffset"] = visibleOffset;
8455 return _result; 8456 return _result;
8456 } 8457 }
8457 8458
8458 @override 8459 @override
8459 Map<String, Object> toMap() => { 8460 Map<String, Object> toMap() => {
8460 "annotations": annotations, 8461 "annotations": annotations,
8461 "codeRange": codeRange, 8462 "codeRange": codeRange,
8462 "constExpr": constExpr,
8463 "documentationComment": documentationComment, 8463 "documentationComment": documentationComment,
8464 "inferredTypeSlot": inferredTypeSlot, 8464 "inferredTypeSlot": inferredTypeSlot,
8465 "initializer": initializer, 8465 "initializer": initializer,
8466 "isConst": isConst, 8466 "isConst": isConst,
8467 "isFinal": isFinal, 8467 "isFinal": isFinal,
8468 "isStatic": isStatic, 8468 "isStatic": isStatic,
8469 "name": name, 8469 "name": name,
8470 "nameOffset": nameOffset, 8470 "nameOffset": nameOffset,
8471 "propagatedTypeSlot": propagatedTypeSlot, 8471 "propagatedTypeSlot": propagatedTypeSlot,
8472 "type": type, 8472 "type": type,
8473 "visibleLength": visibleLength, 8473 "visibleLength": visibleLength,
8474 "visibleOffset": visibleOffset, 8474 "visibleOffset": visibleOffset,
8475 }; 8475 };
8476 8476
8477 @override 8477 @override
8478 String toString() => convert.JSON.encode(toJson()); 8478 String toString() => convert.JSON.encode(toJson());
8479 } 8479 }
8480 8480
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