Changes in src/AST/Expr.hpp [0e6aba06:0c327ce]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Expr.hpp
r0e6aba06 r0c327ce 11 11 // Last Modified By : Peter A. Buhr 12 12 // Created On : Fri May 10 10:30:00 2019 13 // Update Count : 813 // Update Count : 7 14 14 // 15 15 … … 86 86 87 87 /// initializes from other InferUnion 88 void init_from( const InferUnion 88 void init_from( const InferUnion& o ) { 89 89 if (o.data.resnSlots) { 90 90 data.resnSlots = new ResnSlots(*o.data.resnSlots); … … 96 96 97 97 /// initializes from other InferUnion (move semantics) 98 void init_from( InferUnion 98 void init_from( InferUnion&& o ) { 99 99 data.resnSlots = o.data.resnSlots; 100 100 data.inferParams = o.data.inferParams; … … 104 104 105 105 InferUnion() : mode(Empty), data() {} 106 InferUnion( const InferUnion 107 InferUnion( InferUnion 108 InferUnion & operator= ( const InferUnion& ) = delete;109 InferUnion & operator= ( InferUnion&& ) = delete;106 InferUnion( const InferUnion& o ) : mode( o.mode ), data() { init_from( o ); } 107 InferUnion( InferUnion&& o ) : mode( o.mode ), data() { init_from( std::move(o) ); } 108 InferUnion& operator= ( const InferUnion& ) = delete; 109 InferUnion& operator= ( InferUnion&& ) = delete; 110 110 111 111 bool hasSlots() const { return data.resnSlots; } 112 112 bool hasParams() const { return data.inferParams; } 113 113 114 ResnSlots 114 ResnSlots& resnSlots() { 115 115 if (!data.resnSlots) { 116 116 data.resnSlots = new ResnSlots(); … … 119 119 } 120 120 121 const ResnSlots 121 const ResnSlots& resnSlots() const { 122 122 if (data.resnSlots) { 123 123 return *data.resnSlots; … … 127 127 } 128 128 129 InferredParams 129 InferredParams& inferParams() { 130 130 if (!data.inferParams) { 131 131 data.inferParams = new InferredParams(); … … 134 134 } 135 135 136 const InferredParams 136 const InferredParams& inferParams() const { 137 137 if (data.inferParams) { 138 138 return *data.inferParams; … … 669 669 ptr<ApplicationExpr> callExpr; 670 670 671 ImplicitCopyCtorExpr( const CodeLocation 671 ImplicitCopyCtorExpr( const CodeLocation& loc, const ApplicationExpr * call ) 672 672 : Expr( loc, call->result ), callExpr(call) { assert( call ); assert(call->result); } 673 673
Note: See TracChangeset
for help on using the changeset viewer.