Changeset 4d6d62e for src/SynTree
- Timestamp:
- May 18, 2018, 5:40:48 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, with_gc
- Children:
- 6b8c4a8
- Parents:
- 682dcae
- Location:
- src/SynTree
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/ApplicationExpr.cc
r682dcae r4d6d62e 49 49 } 50 50 51 ParamEntry::ParamEntry( ParamEntry && other ) : 52 decl( other.decl ), actualType( other.actualType ), formalType( other.formalType ), expr( other.expr ), inferParams( std::move( other.inferParams ) ) { 53 other.actualType = nullptr; 54 other.formalType = nullptr; 55 other.expr = nullptr; 56 } 57 58 ParamEntry & ParamEntry::operator=( ParamEntry && other ) { 59 if ( &other == this ) return *this; 60 delete actualType; 61 delete formalType; 62 delete expr; 63 decl = other.decl; 64 actualType = other.actualType; 65 formalType = other.formalType; 66 expr = other.expr; 67 other.actualType = nullptr; 68 other.formalType = nullptr; 69 other.expr = nullptr; 70 inferParams = std::move( other.inferParams ); 71 return *this; 72 } 73 51 74 ApplicationExpr::ApplicationExpr( Expression *funcExpr, const std::list<Expression *> & args ) : function( funcExpr ), args( args ) { 52 75 PointerType *pointer = strict_dynamic_cast< PointerType* >( funcExpr->get_result() ); -
src/SynTree/Expression.h
r682dcae r4d6d62e 41 41 ParamEntry( UniqueId decl, Type * actualType, Type * formalType, Expression* expr ): decl( decl ), actualType( actualType ), formalType( formalType ), expr( expr ), inferParams( new InferredParams ) {} 42 42 ParamEntry( const ParamEntry & other ); 43 ParamEntry( ParamEntry && other ); 43 44 ~ParamEntry(); 44 45 ParamEntry & operator=( const ParamEntry & other ); 46 ParamEntry & operator=( ParamEntry && other ); 45 47 46 48 UniqueId decl;
Note: See TracChangeset
for help on using the changeset viewer.