/home/andy/git/oilshell/oil/mycpp/gc_tuple.h
Line | Count | Source (jump to first uncovered line) |
1 | | #ifndef MYCPP_GC_TUPLE_H |
2 | | #define MYCPP_GC_TUPLE_H |
3 | | |
4 | | template <class A, class B> |
5 | | class Tuple2 { |
6 | | typedef Tuple2<A, B> this_type; |
7 | | |
8 | | public: |
9 | 194 | Tuple2(A a, B b) : a_(a), b_(b) { |
10 | 194 | } _ZN6Tuple2IP3StrS1_EC2ES1_S1_ Line | Count | Source | 9 | 10 | Tuple2(A a, B b) : a_(a), b_(b) { | 10 | 10 | } |
_ZN6Tuple2IiP3StrEC2EiS1_ Line | Count | Source | 9 | 37 | Tuple2(A a, B b) : a_(a), b_(b) { | 10 | 37 | } |
_ZN6Tuple2IP3StriEC2ES1_i Line | Count | Source | 9 | 61 | Tuple2(A a, B b) : a_(a), b_(b) { | 10 | 61 | } |
_ZN6Tuple2IN9expr_asdl5tok_eEP3StrEC2ES1_S3_ Line | Count | Source | 9 | 58 | Tuple2(A a, B b) : a_(a), b_(b) { | 10 | 58 | } |
Line | Count | Source | 9 | 26 | Tuple2(A a, B b) : a_(a), b_(b) { | 10 | 26 | } |
_ZN6Tuple2IiPS_IiP3StrEEC2EiS3_ Line | Count | Source | 9 | 2 | Tuple2(A a, B b) : a_(a), b_(b) { | 10 | 2 | } |
Unexecuted instantiation: _ZN6Tuple2IiPvEC2EiS0_ Unexecuted instantiation: _ZN6Tuple2IP4ListIPS0_IPS_IiiEEEP4DictIiiEEC2ES6_S9_ Unexecuted instantiation: _ZN6Tuple2IPN4args11_AttributesEPNS0_6ReaderEEC2ES2_S4_ Unexecuted instantiation: _ZN6Tuple2IP3StrPN11syntax_asdl5loc_tEEC2ES1_S4_ Unexecuted instantiation: _ZN6Tuple2IP4ListIP3StrEPS0_IPN11syntax_asdl12CompoundWordEEEC2ES4_S9_ Unexecuted instantiation: _ZN6Tuple2IP3StrbEC2ES1_b |
11 | | |
12 | 232 | A at0() { |
13 | 232 | return a_; |
14 | 232 | } Line | Count | Source | 12 | 75 | A at0() { | 13 | 75 | return a_; | 14 | 75 | } |
Line | Count | Source | 12 | 40 | A at0() { | 13 | 40 | return a_; | 14 | 40 | } |
Line | Count | Source | 12 | 47 | A at0() { | 13 | 47 | return a_; | 14 | 47 | } |
_ZN6Tuple2IN9expr_asdl5tok_eEP3StrE3at0Ev Line | Count | Source | 12 | 58 | A at0() { | 13 | 58 | return a_; | 14 | 58 | } |
_ZN6Tuple2IP3StrS1_E3at0Ev Line | Count | Source | 12 | 10 | A at0() { | 13 | 10 | return a_; | 14 | 10 | } |
_ZN6Tuple2IiPS_IiP3StrEE3at0Ev Line | Count | Source | 12 | 2 | A at0() { | 13 | 2 | return a_; | 14 | 2 | } |
|
15 | 200 | B at1() { |
16 | 200 | return b_; |
17 | 200 | } Line | Count | Source | 15 | 61 | B at1() { | 16 | 61 | return b_; | 17 | 61 | } |
Line | Count | Source | 15 | 29 | B at1() { | 16 | 29 | return b_; | 17 | 29 | } |
Line | Count | Source | 15 | 38 | B at1() { | 16 | 38 | return b_; | 17 | 38 | } |
_ZN6Tuple2IN9expr_asdl5tok_eEP3StrE3at1Ev Line | Count | Source | 15 | 58 | B at1() { | 16 | 58 | return b_; | 17 | 58 | } |
_ZN6Tuple2IP3StrS1_E3at1Ev Line | Count | Source | 15 | 10 | B at1() { | 16 | 10 | return b_; | 17 | 10 | } |
_ZN6Tuple2IiPS_IiP3StrEE3at1Ev Line | Count | Source | 15 | 4 | B at1() { | 16 | 4 | return b_; | 17 | 4 | } |
|
18 | | |
19 | 85 | static constexpr ObjHeader obj_header() { |
20 | 85 | return ObjHeader::Tuple(field_mask(), sizeof(this_type)); |
21 | 85 | } _ZN6Tuple2IiP3StrE10obj_headerEv Line | Count | Source | 19 | 27 | static constexpr ObjHeader obj_header() { | 20 | 27 | return ObjHeader::Tuple(field_mask(), sizeof(this_type)); | 21 | 27 | } |
_ZN6Tuple2IP3StriE10obj_headerEv Line | Count | Source | 19 | 37 | static constexpr ObjHeader obj_header() { | 20 | 37 | return ObjHeader::Tuple(field_mask(), sizeof(this_type)); | 21 | 37 | } |
_ZN6Tuple2IiiE10obj_headerEv Line | Count | Source | 19 | 19 | static constexpr ObjHeader obj_header() { | 20 | 19 | return ObjHeader::Tuple(field_mask(), sizeof(this_type)); | 21 | 19 | } |
_ZN6Tuple2IiPS_IiP3StrEE10obj_headerEv Line | Count | Source | 19 | 2 | static constexpr ObjHeader obj_header() { | 20 | 2 | return ObjHeader::Tuple(field_mask(), sizeof(this_type)); | 21 | 2 | } |
Unexecuted instantiation: _ZN6Tuple2IP3StrS1_E10obj_headerEv Unexecuted instantiation: _ZN6Tuple2IP4ListIPS0_IPS_IiiEEEP4DictIiiEE10obj_headerEv Unexecuted instantiation: _ZN6Tuple2IP3StrbE10obj_headerEv |
22 | | |
23 | 85 | static constexpr uint32_t field_mask() { |
24 | 85 | return (std::is_pointer<A>() ? maskbit(offsetof(this_type, a_)) : 0) | |
25 | 85 | (std::is_pointer<B>() ? maskbit(offsetof(this_type, b_)) : 0); |
26 | 85 | } _ZN6Tuple2IiP3StrE10field_maskEv Line | Count | Source | 23 | 27 | static constexpr uint32_t field_mask() { | 24 | 27 | return (std::is_pointer<A>() ? maskbit(offsetof(this_type, a_)) : 0) | | 25 | 27 | (std::is_pointer<B>() ? maskbit(offsetof(this_type, b_)) : 0); | 26 | 27 | } |
_ZN6Tuple2IP3StriE10field_maskEv Line | Count | Source | 23 | 37 | static constexpr uint32_t field_mask() { | 24 | 37 | return (std::is_pointer<A>() ? maskbit(offsetof(this_type, a_)) : 0) | | 25 | 37 | (std::is_pointer<B>() ? maskbit(offsetof(this_type, b_)) : 0); | 26 | 37 | } |
_ZN6Tuple2IiiE10field_maskEv Line | Count | Source | 23 | 19 | static constexpr uint32_t field_mask() { | 24 | 19 | return (std::is_pointer<A>() ? maskbit(offsetof(this_type, a_)) : 0) | | 25 | 19 | (std::is_pointer<B>() ? maskbit(offsetof(this_type, b_)) : 0); | 26 | 19 | } |
_ZN6Tuple2IiPS_IiP3StrEE10field_maskEv Line | Count | Source | 23 | 2 | static constexpr uint32_t field_mask() { | 24 | 2 | return (std::is_pointer<A>() ? maskbit(offsetof(this_type, a_)) : 0) | | 25 | 2 | (std::is_pointer<B>() ? maskbit(offsetof(this_type, b_)) : 0); | 26 | 2 | } |
Unexecuted instantiation: _ZN6Tuple2IP3StrS1_E10field_maskEv Unexecuted instantiation: _ZN6Tuple2IP4ListIPS0_IPS_IiiEEEP4DictIiiEE10field_maskEv Unexecuted instantiation: _ZN6Tuple2IP3StrbE10field_maskEv |
27 | | |
28 | | private: |
29 | | A a_; |
30 | | B b_; |
31 | | }; |
32 | | |
33 | | template <class A, class B, class C> |
34 | | class Tuple3 { |
35 | | typedef Tuple3<A, B, C> this_type; |
36 | | |
37 | | public: |
38 | 3 | Tuple3(A a, B b, C c) : a_(a), b_(b), c_(c) { |
39 | 3 | } _ZN6Tuple3IiP3StrS1_EC2EiS1_S1_ Line | Count | Source | 38 | 2 | Tuple3(A a, B b, C c) : a_(a), b_(b), c_(c) { | 39 | 2 | } |
Line | Count | Source | 38 | 1 | Tuple3(A a, B b, C c) : a_(a), b_(b), c_(c) { | 39 | 1 | } |
|
40 | 3 | A at0() { |
41 | 3 | return a_; |
42 | 3 | } _ZN6Tuple3IiP3StrS1_E3at0Ev Line | Count | Source | 40 | 2 | A at0() { | 41 | 2 | return a_; | 42 | 2 | } |
Line | Count | Source | 40 | 1 | A at0() { | 41 | 1 | return a_; | 42 | 1 | } |
|
43 | 3 | B at1() { |
44 | 3 | return b_; |
45 | 3 | } _ZN6Tuple3IiP3StrS1_E3at1Ev Line | Count | Source | 43 | 2 | B at1() { | 44 | 2 | return b_; | 45 | 2 | } |
Line | Count | Source | 43 | 1 | B at1() { | 44 | 1 | return b_; | 45 | 1 | } |
|
46 | 3 | C at2() { |
47 | 3 | return c_; |
48 | 3 | } _ZN6Tuple3IiP3StrS1_E3at2Ev Line | Count | Source | 46 | 2 | C at2() { | 47 | 2 | return c_; | 48 | 2 | } |
Line | Count | Source | 46 | 1 | C at2() { | 47 | 1 | return c_; | 48 | 1 | } |
|
49 | | |
50 | 2 | static constexpr ObjHeader obj_header() { |
51 | 2 | return ObjHeader::Tuple(field_mask(), sizeof(this_type)); |
52 | 2 | } _ZN6Tuple3IiP3StrS1_E10obj_headerEv Line | Count | Source | 50 | 2 | static constexpr ObjHeader obj_header() { | 51 | 2 | return ObjHeader::Tuple(field_mask(), sizeof(this_type)); | 52 | 2 | } |
Unexecuted instantiation: _ZN6Tuple3IP3StrS1_S1_E10obj_headerEv |
53 | | |
54 | 2 | static constexpr uint32_t field_mask() { |
55 | 2 | return (std::is_pointer<A>() ? maskbit(offsetof(this_type, a_)) : 0) | |
56 | 2 | (std::is_pointer<B>() ? maskbit(offsetof(this_type, b_)) : 0) | |
57 | 2 | (std::is_pointer<C>() ? maskbit(offsetof(this_type, c_)) : 0); |
58 | 2 | } _ZN6Tuple3IiP3StrS1_E10field_maskEv Line | Count | Source | 54 | 2 | static constexpr uint32_t field_mask() { | 55 | 2 | return (std::is_pointer<A>() ? maskbit(offsetof(this_type, a_)) : 0) | | 56 | 2 | (std::is_pointer<B>() ? maskbit(offsetof(this_type, b_)) : 0) | | 57 | 2 | (std::is_pointer<C>() ? maskbit(offsetof(this_type, c_)) : 0); | 58 | 2 | } |
Unexecuted instantiation: _ZN6Tuple3IP3StrS1_S1_E10field_maskEv |
59 | | |
60 | | private: |
61 | | A a_; |
62 | | B b_; |
63 | | C c_; |
64 | | }; |
65 | | |
66 | | template <class A, class B, class C, class D> |
67 | | class Tuple4 { |
68 | | typedef Tuple4<A, B, C, D> this_type; |
69 | | |
70 | | public: |
71 | 2 | Tuple4(A a, B b, C c, D d) : a_(a), b_(b), c_(c), d_(d) { |
72 | 2 | } |
73 | 2 | A at0() { |
74 | 2 | return a_; |
75 | 2 | } |
76 | 2 | B at1() { |
77 | 2 | return b_; |
78 | 2 | } |
79 | 2 | C at2() { |
80 | 2 | return c_; |
81 | 2 | } |
82 | 2 | D at3() { |
83 | 2 | return d_; |
84 | 2 | } |
85 | | |
86 | 2 | static constexpr ObjHeader obj_header() { |
87 | 2 | return ObjHeader::Tuple(field_mask(), sizeof(this_type)); |
88 | 2 | } _ZN6Tuple4IiP3StrS1_iE10obj_headerEv Line | Count | Source | 86 | 2 | static constexpr ObjHeader obj_header() { | 87 | 2 | return ObjHeader::Tuple(field_mask(), sizeof(this_type)); | 88 | 2 | } |
Unexecuted instantiation: _ZN6Tuple4IiiP3StrS1_E10obj_headerEv |
89 | | |
90 | 2 | static constexpr uint32_t field_mask() { |
91 | 2 | return (std::is_pointer<A>() ? maskbit(offsetof(this_type, a_)) : 0) | |
92 | 2 | (std::is_pointer<B>() ? maskbit(offsetof(this_type, b_)) : 0) | |
93 | 2 | (std::is_pointer<C>() ? maskbit(offsetof(this_type, c_)) : 0) | |
94 | 2 | (std::is_pointer<D>() ? maskbit(offsetof(this_type, d_)) : 0); |
95 | 2 | } _ZN6Tuple4IiP3StrS1_iE10field_maskEv Line | Count | Source | 90 | 2 | static constexpr uint32_t field_mask() { | 91 | 2 | return (std::is_pointer<A>() ? maskbit(offsetof(this_type, a_)) : 0) | | 92 | 2 | (std::is_pointer<B>() ? maskbit(offsetof(this_type, b_)) : 0) | | 93 | 2 | (std::is_pointer<C>() ? maskbit(offsetof(this_type, c_)) : 0) | | 94 | 2 | (std::is_pointer<D>() ? maskbit(offsetof(this_type, d_)) : 0); | 95 | 2 | } |
Unexecuted instantiation: _ZN6Tuple4IiiP3StrS1_E10field_maskEv |
96 | | |
97 | | private: |
98 | | A a_; |
99 | | B b_; |
100 | | C c_; |
101 | | D d_; |
102 | | }; |
103 | | |
104 | | template <class A, class B, class C, class D, class E> |
105 | | class Tuple5 { |
106 | | typedef Tuple5<A, B, C, D, E> this_type; |
107 | | |
108 | | public: |
109 | | Tuple5(A a, B b, C c, D d, E e) : a_(a), b_(b), c_(c), d_(d), e_(e) { |
110 | | } |
111 | | A at0() { |
112 | | return a_; |
113 | | } |
114 | | B at1() { |
115 | | return b_; |
116 | | } |
117 | | C at2() { |
118 | | return c_; |
119 | | } |
120 | | D at3() { |
121 | | return d_; |
122 | | } |
123 | | E at4() { |
124 | | return e_; |
125 | | } |
126 | | |
127 | | static constexpr ObjHeader obj_header() { |
128 | | return ObjHeader::Tuple(field_mask(), sizeof(this_type)); |
129 | | } |
130 | | |
131 | | static constexpr uint32_t field_mask() { |
132 | | return (std::is_pointer<A>() ? maskbit(offsetof(this_type, a_)) : 0) | |
133 | | (std::is_pointer<B>() ? maskbit(offsetof(this_type, b_)) : 0) | |
134 | | (std::is_pointer<C>() ? maskbit(offsetof(this_type, c_)) : 0) | |
135 | | (std::is_pointer<D>() ? maskbit(offsetof(this_type, d_)) : 0) | |
136 | | (std::is_pointer<E>() ? maskbit(offsetof(this_type, e_)) : 0); |
137 | | } |
138 | | |
139 | | private: |
140 | | A a_; |
141 | | B b_; |
142 | | C c_; |
143 | | D d_; |
144 | | E e_; |
145 | | }; |
146 | | |
147 | | #endif // MYCPP_GC_TUPLE_H |