Changes in src/AST/Expr.hpp [0c327ce:0e6aba06]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Expr.hpp
r0c327ce r0e6aba06 11 11 // Last Modified By : Peter A. Buhr 12 12 // Created On : Fri May 10 10:30:00 2019 13 // Update Count : 713 // Update Count : 8 14 14 // 15 15 … … 86 86 87 87 /// initializes from other InferUnion 88 void init_from( const InferUnion & o ) {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 && o ) {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 & 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;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 & resnSlots() {114 ResnSlots & resnSlots() { 115 115 if (!data.resnSlots) { 116 116 data.resnSlots = new ResnSlots(); … … 119 119 } 120 120 121 const ResnSlots & resnSlots() const {121 const ResnSlots & resnSlots() const { 122 122 if (data.resnSlots) { 123 123 return *data.resnSlots; … … 127 127 } 128 128 129 InferredParams & inferParams() {129 InferredParams & inferParams() { 130 130 if (!data.inferParams) { 131 131 data.inferParams = new InferredParams(); … … 134 134 } 135 135 136 const InferredParams & inferParams() const {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 & loc, const ApplicationExpr * call )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.