Changeset 23bb1b9 for src/SynTree/TupleExpr.cc
- Timestamp:
- Nov 9, 2016, 2:10:00 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, resolv-new, with_gc
- Children:
- 141b786
- Parents:
- b3b2077
- git-author:
- Rob Schluntz <rschlunt@…> (11/09/16 14:09:29)
- git-committer:
- Rob Schluntz <rschlunt@…> (11/09/16 14:10:00)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/TupleExpr.cc
rb3b2077 r23bb1b9 19 19 #include "Declaration.h" 20 20 #include "Tuples/Tuples.h" 21 #include "VarExprReplacer.h" 21 22 22 23 TupleExpr::TupleExpr( const std::list< Expression * > & exprs, Expression *_aname ) : Expression( _aname ), exprs( exprs ) { … … 91 92 } 92 93 93 TupleAssignExpr::TupleAssignExpr( const TupleAssignExpr &other ) : Expression( other ) , tempDecls( other.tempDecls ) /* temporary */{94 TupleAssignExpr::TupleAssignExpr( const TupleAssignExpr &other ) : Expression( other ) { 94 95 cloneAll( other.assigns, assigns ); 95 // xxx - clone needs to go into assigns and replace tempDecls 96 cloneAll( other.tempDecls, tempDecls ); 97 98 // clone needs to go into assigns and replace tempDecls 99 VarExprReplacer::DeclMap declMap; 100 std::list< ObjectDecl * >::const_iterator origit = other.tempDecls.begin(); 101 for ( ObjectDecl * temp : tempDecls ) { 102 assert( origit != other.tempDecls.end() ); 103 ObjectDecl * origTemp = *origit++; 104 assert( origTemp ); 105 assert( temp->get_name() == origTemp->get_name() ); 106 declMap[ origTemp ] = temp; 107 } 108 if ( ! declMap.empty() ) { 109 VarExprReplacer replacer( declMap ); 110 for ( Expression * assn : assigns ) { 111 assn->accept( replacer ); 112 } 113 } 96 114 } 97 115
Note: See TracChangeset
for help on using the changeset viewer.