Changeset 6d51bd7 for src/AST/Expr.hpp
- Timestamp:
- May 15, 2019, 10:15:44 AM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- be567e9
- Parents:
- 712348a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Expr.hpp
r712348a r6d51bd7 27 27 namespace ast { 28 28 29 /// Contains the ID of a declaration and a type that is derived from that declaration, 29 /// Contains the ID of a declaration and a type that is derived from that declaration, 30 30 /// but subject to decay-to-pointer and type parameter renaming 31 31 struct ParamEntry { … … 74 74 case Empty: return; 75 75 case Slots: new(&data.resnSlots) ResnSlots{ std::move(o.data.resnSlots) }; return; 76 case Params: 76 case Params: 77 77 new(&data.inferParams) InferredParams{ std::move(o.data.inferParams) }; return; 78 78 } … … 121 121 Expr* set_extension( bool ex ) { extension = ex; return this; } 122 122 123 virtual Expr* accept( Visitor& v )override = 0;123 virtual const Expr * accept( Visitor& v ) const override = 0; 124 124 private: 125 virtual Expr * clone() const override = 0;125 virtual Expr * clone() const override = 0; 126 126 }; 127 127 128 129 //================================================================================================= 130 /// This disgusting and giant piece of boiler-plate is here to solve a cyclic dependency 131 /// remove only if there is a better solution 132 /// The problem is that ast::ptr< ... > uses increment/decrement which won't work well with 133 /// forward declarations 134 inline void increment( const class Expr * node, Node::ref_type ref ) { node->increment(ref); } 135 inline void decrement( const class Expr * node, Node::ref_type ref ) { node->decrement(ref); } 136 // inline void increment( const class ApplicationExpr * node, Node::ref_type ref ) { node->increment(ref); } 137 // inline void decrement( const class ApplicationExpr * node, Node::ref_type ref ) { node->decrement(ref); } 138 // inline void increment( const class UntypedExpr * node, Node::ref_type ref ) { node->increment(ref); } 139 // inline void decrement( const class UntypedExpr * node, Node::ref_type ref ) { node->decrement(ref); } 140 // inline void increment( const class NameExpr * node, Node::ref_type ref ) { node->increment(ref); } 141 // inline void decrement( const class NameExpr * node, Node::ref_type ref ) { node->decrement(ref); } 142 // inline void increment( const class AddressExpr * node, Node::ref_type ref ) { node->increment(ref); } 143 // inline void decrement( const class AddressExpr * node, Node::ref_type ref ) { node->decrement(ref); } 144 // inline void increment( const class LabelAddressExpr * node, Node::ref_type ref ) { node->increment(ref); } 145 // inline void decrement( const class LabelAddressExpr * node, Node::ref_type ref ) { node->decrement(ref); } 146 // inline void increment( const class CastExpr * node, Node::ref_type ref ) { node->increment(ref); } 147 // inline void decrement( const class CastExpr * node, Node::ref_type ref ) { node->decrement(ref); } 148 // inline void increment( const class KeywordCastExpr * node, Node::ref_type ref ) { node->increment(ref); } 149 // inline void decrement( const class KeywordCastExpr * node, Node::ref_type ref ) { node->decrement(ref); } 150 // inline void increment( const class VirtualCastExpr * node, Node::ref_type ref ) { node->increment(ref); } 151 // inline void decrement( const class VirtualCastExpr * node, Node::ref_type ref ) { node->decrement(ref); } 152 // inline void increment( const class MemberExpr * node, Node::ref_type ref ) { node->increment(ref); } 153 // inline void decrement( const class MemberExpr * node, Node::ref_type ref ) { node->decrement(ref); } 154 // inline void increment( const class UntypedMemberExpr * node, Node::ref_type ref ) { node->increment(ref); } 155 // inline void decrement( const class UntypedMemberExpr * node, Node::ref_type ref ) { node->decrement(ref); } 156 // inline void increment( const class VariableExpr * node, Node::ref_type ref ) { node->increment(ref); } 157 // inline void decrement( const class VariableExpr * node, Node::ref_type ref ) { node->decrement(ref); } 158 // inline void increment( const class ConstantExpr * node, Node::ref_type ref ) { node->increment(ref); } 159 // inline void decrement( const class ConstantExpr * node, Node::ref_type ref ) { node->decrement(ref); } 160 // inline void increment( const class SizeofExpr * node, Node::ref_type ref ) { node->increment(ref); } 161 // inline void decrement( const class SizeofExpr * node, Node::ref_type ref ) { node->decrement(ref); } 162 // inline void increment( const class AlignofExpr * node, Node::ref_type ref ) { node->increment(ref); } 163 // inline void decrement( const class AlignofExpr * node, Node::ref_type ref ) { node->decrement(ref); } 164 // inline void increment( const class UntypedOffsetofExpr * node, Node::ref_type ref ) { node->increment(ref); } 165 // inline void decrement( const class UntypedOffsetofExpr * node, Node::ref_type ref ) { node->decrement(ref); } 166 // inline void increment( const class OffsetofExpr * node, Node::ref_type ref ) { node->increment(ref); } 167 // inline void decrement( const class OffsetofExpr * node, Node::ref_type ref ) { node->decrement(ref); } 168 // inline void increment( const class OffsetPackExpr * node, Node::ref_type ref ) { node->increment(ref); } 169 // inline void decrement( const class OffsetPackExpr * node, Node::ref_type ref ) { node->decrement(ref); } 170 // inline void increment( const class AttrExpr * node, Node::ref_type ref ) { node->increment(ref); } 171 // inline void decrement( const class AttrExpr * node, Node::ref_type ref ) { node->decrement(ref); } 172 // inline void increment( const class LogicalExpr * node, Node::ref_type ref ) { node->increment(ref); } 173 // inline void decrement( const class LogicalExpr * node, Node::ref_type ref ) { node->decrement(ref); } 174 // inline void increment( const class ConditionalExpr * node, Node::ref_type ref ) { node->increment(ref); } 175 // inline void decrement( const class ConditionalExpr * node, Node::ref_type ref ) { node->decrement(ref); } 176 // inline void increment( const class CommaExpr * node, Node::ref_type ref ) { node->increment(ref); } 177 // inline void decrement( const class CommaExpr * node, Node::ref_type ref ) { node->decrement(ref); } 178 // inline void increment( const class TypeExpr * node, Node::ref_type ref ) { node->increment(ref); } 179 // inline void decrement( const class TypeExpr * node, Node::ref_type ref ) { node->decrement(ref); } 180 // inline void increment( const class AsmExpr * node, Node::ref_type ref ) { node->increment(ref); } 181 // inline void decrement( const class AsmExpr * node, Node::ref_type ref ) { node->decrement(ref); } 182 // inline void increment( const class ImplicitCopyCtorExpr * node, Node::ref_type ref ) { node->increment(ref); } 183 // inline void decrement( const class ImplicitCopyCtorExpr * node, Node::ref_type ref ) { node->decrement(ref); } 184 // inline void increment( const class ConstructorExpr * node, Node::ref_type ref ) { node->increment(ref); } 185 // inline void decrement( const class ConstructorExpr * node, Node::ref_type ref ) { node->decrement(ref); } 186 // inline void increment( const class CompoundLiteralExpr * node, Node::ref_type ref ) { node->increment(ref); } 187 // inline void decrement( const class CompoundLiteralExpr * node, Node::ref_type ref ) { node->decrement(ref); } 188 // inline void increment( const class UntypedValofExpr * node, Node::ref_type ref ) { node->increment(ref); } 189 // inline void decrement( const class UntypedValofExpr * node, Node::ref_type ref ) { node->decrement(ref); } 190 // inline void increment( const class RangeExpr * node, Node::ref_type ref ) { node->increment(ref); } 191 // inline void decrement( const class RangeExpr * node, Node::ref_type ref ) { node->decrement(ref); } 192 // inline void increment( const class UntypedTupleExpr * node, Node::ref_type ref ) { node->increment(ref); } 193 // inline void decrement( const class UntypedTupleExpr * node, Node::ref_type ref ) { node->decrement(ref); } 194 // inline void increment( const class TupleExpr * node, Node::ref_type ref ) { node->increment(ref); } 195 // inline void decrement( const class TupleExpr * node, Node::ref_type ref ) { node->decrement(ref); } 196 // inline void increment( const class TupleIndexExpr * node, Node::ref_type ref ) { node->increment(ref); } 197 // inline void decrement( const class TupleIndexExpr * node, Node::ref_type ref ) { node->decrement(ref); } 198 // inline void increment( const class TupleAssignExpr * node, Node::ref_type ref ) { node->increment(ref); } 199 // inline void decrement( const class TupleAssignExpr * node, Node::ref_type ref ) { node->decrement(ref); } 200 // inline void increment( const class StmtExpr * node, Node::ref_type ref ) { node->increment(ref); } 201 // inline void decrement( const class StmtExpr * node, Node::ref_type ref ) { node->decrement(ref); } 202 // inline void increment( const class UniqueExpr * node, Node::ref_type ref ) { node->increment(ref); } 203 // inline void decrement( const class UniqueExpr * node, Node::ref_type ref ) { node->decrement(ref); } 204 // inline void increment( const class UntypedInitExpr * node, Node::ref_type ref ) { node->increment(ref); } 205 // inline void decrement( const class UntypedInitExpr * node, Node::ref_type ref ) { node->decrement(ref); } 206 // inline void increment( const class InitExpr * node, Node::ref_type ref ) { node->increment(ref); } 207 // inline void decrement( const class InitExpr * node, Node::ref_type ref ) { node->decrement(ref); } 208 // inline void increment( const class DeletedExpr * node, Node::ref_type ref ) { node->increment(ref); } 209 // inline void decrement( const class DeletedExpr * node, Node::ref_type ref ) { node->decrement(ref); } 210 // inline void increment( const class DefaultArgExpr * node, Node::ref_type ref ) { node->increment(ref); } 211 // inline void decrement( const class DefaultArgExpr * node, Node::ref_type ref ) { node->decrement(ref); } 212 // inline void increment( const class GenericExpr * node, Node::ref_type ref ) { node->increment(ref); } 213 // inline void decrement( const class GenericExpr * node, Node::ref_type ref ) { node->decrement(ref); } 128 214 } 129 215
Note: See TracChangeset
for help on using the changeset viewer.