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

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

Issue 1713753002: Allow linked types to refer to local executables. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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
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 712 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 "units": units, 723 "units": units,
724 }; 724 };
725 } 725 }
726 726
727 class LinkedReferenceBuilder extends Object with _LinkedReferenceMixin implement s idl.LinkedReference { 727 class LinkedReferenceBuilder extends Object with _LinkedReferenceMixin implement s idl.LinkedReference {
728 bool _finished = false; 728 bool _finished = false;
729 729
730 int _containingReference; 730 int _containingReference;
731 int _dependency; 731 int _dependency;
732 idl.ReferenceKind _kind; 732 idl.ReferenceKind _kind;
733 int _localIndex;
733 String _name; 734 String _name;
734 int _numTypeParameters; 735 int _numTypeParameters;
735 int _unit; 736 int _unit;
736 737
737 @override 738 @override
738 int get containingReference => _containingReference ??= 0; 739 int get containingReference => _containingReference ??= 0;
739 740
740 /** 741 /**
741 * If this [LinkedReference] doesn't have an associated [UnlinkedReference], 742 * If this [LinkedReference] doesn't have an associated [UnlinkedReference],
742 * and the entity being referred to is contained within another entity, index 743 * and the entity being referred to is contained within another entity, index
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 /** 777 /**
777 * The kind of the entity being referred to. For the pseudo-types `dynamic` 778 * The kind of the entity being referred to. For the pseudo-types `dynamic`
778 * and `void`, the kind is [ReferenceKind.classOrEnum]. 779 * and `void`, the kind is [ReferenceKind.classOrEnum].
779 */ 780 */
780 void set kind(idl.ReferenceKind _value) { 781 void set kind(idl.ReferenceKind _value) {
781 assert(!_finished); 782 assert(!_finished);
782 _kind = _value; 783 _kind = _value;
783 } 784 }
784 785
785 @override 786 @override
787 int get localIndex => _localIndex ??= 0;
788
789 /**
790 * If [kind] is [ReferenceKind.function] (that is, the entity being referred
791 * to is a local function), the index of the function within
792 * [UnlinkedExecutable.localFunctions]. If [kind] is
793 * [ReferenceKind.variable], the index of the variable within
794 * [UnlinkedExecutable.localVariables]. Otherwise zero.
795 */
796 void set localIndex(int _value) {
797 assert(!_finished);
798 assert(_value == null || _value >= 0);
799 _localIndex = _value;
800 }
801
802 @override
786 String get name => _name ??= ''; 803 String get name => _name ??= '';
787 804
788 /** 805 /**
789 * If this [LinkedReference] doesn't have an associated [UnlinkedReference], 806 * If this [LinkedReference] doesn't have an associated [UnlinkedReference],
790 * name of the entity being referred to. For the pseudo-type `dynamic`, the 807 * name of the entity being referred to. For the pseudo-type `dynamic`, the
791 * string is "dynamic". For the pseudo-type `void`, the string is "void". 808 * string is "dynamic". For the pseudo-type `void`, the string is "void".
792 */ 809 */
793 void set name(String _value) { 810 void set name(String _value) {
794 assert(!_finished); 811 assert(!_finished);
795 _name = _value; 812 _name = _value;
(...skipping 23 matching lines...) Expand all
819 * 836 *
820 * Zero if this entity is contained within another entity (e.g. a class 837 * Zero if this entity is contained within another entity (e.g. a class
821 * member). 838 * member).
822 */ 839 */
823 void set unit(int _value) { 840 void set unit(int _value) {
824 assert(!_finished); 841 assert(!_finished);
825 assert(_value == null || _value >= 0); 842 assert(_value == null || _value >= 0);
826 _unit = _value; 843 _unit = _value;
827 } 844 }
828 845
829 LinkedReferenceBuilder({int containingReference, int dependency, idl.Reference Kind kind, String name, int numTypeParameters, int unit}) 846 LinkedReferenceBuilder({int containingReference, int dependency, idl.Reference Kind kind, int localIndex, String name, int numTypeParameters, int unit})
830 : _containingReference = containingReference, 847 : _containingReference = containingReference,
831 _dependency = dependency, 848 _dependency = dependency,
832 _kind = kind, 849 _kind = kind,
850 _localIndex = localIndex,
833 _name = name, 851 _name = name,
834 _numTypeParameters = numTypeParameters, 852 _numTypeParameters = numTypeParameters,
835 _unit = unit; 853 _unit = unit;
836 854
837 fb.Offset finish(fb.Builder fbBuilder) { 855 fb.Offset finish(fb.Builder fbBuilder) {
838 assert(!_finished); 856 assert(!_finished);
839 _finished = true; 857 _finished = true;
840 fb.Offset offset_name; 858 fb.Offset offset_name;
841 if (_name != null) { 859 if (_name != null) {
842 offset_name = fbBuilder.writeString(_name); 860 offset_name = fbBuilder.writeString(_name);
843 } 861 }
844 fbBuilder.startTable(); 862 fbBuilder.startTable();
845 if (_containingReference != null && _containingReference != 0) { 863 if (_containingReference != null && _containingReference != 0) {
846 fbBuilder.addUint32(5, _containingReference); 864 fbBuilder.addUint32(5, _containingReference);
847 } 865 }
848 if (_dependency != null && _dependency != 0) { 866 if (_dependency != null && _dependency != 0) {
849 fbBuilder.addUint32(1, _dependency); 867 fbBuilder.addUint32(1, _dependency);
850 } 868 }
851 if (_kind != null && _kind != idl.ReferenceKind.classOrEnum) { 869 if (_kind != null && _kind != idl.ReferenceKind.classOrEnum) {
852 fbBuilder.addUint8(2, _kind.index); 870 fbBuilder.addUint8(2, _kind.index);
853 } 871 }
872 if (_localIndex != null && _localIndex != 0) {
873 fbBuilder.addUint32(6, _localIndex);
874 }
854 if (offset_name != null) { 875 if (offset_name != null) {
855 fbBuilder.addOffset(3, offset_name); 876 fbBuilder.addOffset(3, offset_name);
856 } 877 }
857 if (_numTypeParameters != null && _numTypeParameters != 0) { 878 if (_numTypeParameters != null && _numTypeParameters != 0) {
858 fbBuilder.addUint32(4, _numTypeParameters); 879 fbBuilder.addUint32(4, _numTypeParameters);
859 } 880 }
860 if (_unit != null && _unit != 0) { 881 if (_unit != null && _unit != 0) {
861 fbBuilder.addUint32(0, _unit); 882 fbBuilder.addUint32(0, _unit);
862 } 883 }
863 return fbBuilder.endTable(); 884 return fbBuilder.endTable();
864 } 885 }
865 } 886 }
866 887
867 class _LinkedReferenceReader extends fb.TableReader<_LinkedReferenceImpl> { 888 class _LinkedReferenceReader extends fb.TableReader<_LinkedReferenceImpl> {
868 const _LinkedReferenceReader(); 889 const _LinkedReferenceReader();
869 890
870 @override 891 @override
871 _LinkedReferenceImpl createObject(fb.BufferPointer bp) => new _LinkedReference Impl(bp); 892 _LinkedReferenceImpl createObject(fb.BufferPointer bp) => new _LinkedReference Impl(bp);
872 } 893 }
873 894
874 class _LinkedReferenceImpl extends Object with _LinkedReferenceMixin implements idl.LinkedReference { 895 class _LinkedReferenceImpl extends Object with _LinkedReferenceMixin implements idl.LinkedReference {
875 final fb.BufferPointer _bp; 896 final fb.BufferPointer _bp;
876 897
877 _LinkedReferenceImpl(this._bp); 898 _LinkedReferenceImpl(this._bp);
878 899
879 int _containingReference; 900 int _containingReference;
880 int _dependency; 901 int _dependency;
881 idl.ReferenceKind _kind; 902 idl.ReferenceKind _kind;
903 int _localIndex;
882 String _name; 904 String _name;
883 int _numTypeParameters; 905 int _numTypeParameters;
884 int _unit; 906 int _unit;
885 907
886 @override 908 @override
887 int get containingReference { 909 int get containingReference {
888 _containingReference ??= const fb.Uint32Reader().vTableGet(_bp, 5, 0); 910 _containingReference ??= const fb.Uint32Reader().vTableGet(_bp, 5, 0);
889 return _containingReference; 911 return _containingReference;
890 } 912 }
891 913
892 @override 914 @override
893 int get dependency { 915 int get dependency {
894 _dependency ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0); 916 _dependency ??= const fb.Uint32Reader().vTableGet(_bp, 1, 0);
895 return _dependency; 917 return _dependency;
896 } 918 }
897 919
898 @override 920 @override
899 idl.ReferenceKind get kind { 921 idl.ReferenceKind get kind {
900 _kind ??= const _ReferenceKindReader().vTableGet(_bp, 2, idl.ReferenceKind.c lassOrEnum); 922 _kind ??= const _ReferenceKindReader().vTableGet(_bp, 2, idl.ReferenceKind.c lassOrEnum);
901 return _kind; 923 return _kind;
902 } 924 }
903 925
904 @override 926 @override
927 int get localIndex {
928 _localIndex ??= const fb.Uint32Reader().vTableGet(_bp, 6, 0);
929 return _localIndex;
930 }
931
932 @override
905 String get name { 933 String get name {
906 _name ??= const fb.StringReader().vTableGet(_bp, 3, ''); 934 _name ??= const fb.StringReader().vTableGet(_bp, 3, '');
907 return _name; 935 return _name;
908 } 936 }
909 937
910 @override 938 @override
911 int get numTypeParameters { 939 int get numTypeParameters {
912 _numTypeParameters ??= const fb.Uint32Reader().vTableGet(_bp, 4, 0); 940 _numTypeParameters ??= const fb.Uint32Reader().vTableGet(_bp, 4, 0);
913 return _numTypeParameters; 941 return _numTypeParameters;
914 } 942 }
915 943
916 @override 944 @override
917 int get unit { 945 int get unit {
918 _unit ??= const fb.Uint32Reader().vTableGet(_bp, 0, 0); 946 _unit ??= const fb.Uint32Reader().vTableGet(_bp, 0, 0);
919 return _unit; 947 return _unit;
920 } 948 }
921 } 949 }
922 950
923 abstract class _LinkedReferenceMixin implements idl.LinkedReference { 951 abstract class _LinkedReferenceMixin implements idl.LinkedReference {
924 @override 952 @override
925 Map<String, Object> toMap() => { 953 Map<String, Object> toMap() => {
926 "containingReference": containingReference, 954 "containingReference": containingReference,
927 "dependency": dependency, 955 "dependency": dependency,
928 "kind": kind, 956 "kind": kind,
957 "localIndex": localIndex,
929 "name": name, 958 "name": name,
930 "numTypeParameters": numTypeParameters, 959 "numTypeParameters": numTypeParameters,
931 "unit": unit, 960 "unit": unit,
932 }; 961 };
933 } 962 }
934 963
935 class LinkedUnitBuilder extends Object with _LinkedUnitMixin implements idl.Link edUnit { 964 class LinkedUnitBuilder extends Object with _LinkedUnitMixin implements idl.Link edUnit {
936 bool _finished = false; 965 bool _finished = false;
937 966
938 List<LinkedReferenceBuilder> _references; 967 List<LinkedReferenceBuilder> _references;
(...skipping 4762 matching lines...) Expand 10 before | Expand all | Expand 10 after
5701 "isStatic": isStatic, 5730 "isStatic": isStatic,
5702 "name": name, 5731 "name": name,
5703 "nameOffset": nameOffset, 5732 "nameOffset": nameOffset,
5704 "propagatedTypeSlot": propagatedTypeSlot, 5733 "propagatedTypeSlot": propagatedTypeSlot,
5705 "type": type, 5734 "type": type,
5706 "visibleLength": visibleLength, 5735 "visibleLength": visibleLength,
5707 "visibleOffset": visibleOffset, 5736 "visibleOffset": visibleOffset,
5708 }; 5737 };
5709 } 5738 }
5710 5739
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/summary/idl.dart » ('j') | pkg/analyzer/lib/src/summary/resynthesize.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698