Changeset b3b2077 for src/Tuples
- Timestamp:
- Nov 9, 2016, 2:05:09 PM (8 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:
- 23bb1b9
- Parents:
- 8780e30
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Tuples/TupleAssignment.cc
r8780e30 rb3b2077 9 9 // Author : Rodolfo G. Esteves 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Mon May 18 15:02:53 201511 // Last Modified By : Rob Schluntz 12 // Last Modified On : Wed Nov 9 13:48:42 2016 13 13 // Update Count : 2 14 14 // … … 180 180 // explode the lhs so that each field of the tuple-valued-expr is assigned. 181 181 explode( lhsAlt, spotter.currentFinder.get_indexer(), back_inserter(lhs) ); 182 182 183 // and finally, re-add the cast to each lhs expr, so that qualified tuple fields can be constructed 183 184 if ( isCast ) { … … 192 193 } 193 194 } 194 // } 195 } 196 197 TupleAssignSpotter::MassAssignMatcher::MassAssignMatcher( TupleAssignSpotter &spotter,const ResolvExpr::AltList & alts ) : Matcher( spotter, alts ) { 195 } 196 197 TupleAssignSpotter::MassAssignMatcher::MassAssignMatcher( TupleAssignSpotter &spotter, const ResolvExpr::AltList & alts ) : Matcher( spotter, alts ) { 198 198 assert( alts.size() == 1 || alts.size() == 2 ); 199 199 if ( alts.size() == 2 ) { … … 210 210 assert( left ); 211 211 std::list< Expression * > args; 212 args.push_back( new AddressExpr( new UntypedExpr( new NameExpr("*?"), std::list< Expression * >{ new VariableExpr( left ) }) ) );212 args.push_back( new AddressExpr( UntypedExpr::createDeref( new VariableExpr( left ) ) ) ); 213 213 // args.push_back( new AddressExpr( new VariableExpr( left ) ) ); 214 214 if ( right ) args.push_back( new VariableExpr( right ) ); … … 238 238 static UniqueName lhsNamer( "__multassign_L" ); 239 239 static UniqueName rhsNamer( "__multassign_R" ); 240 240 241 // xxx - need more complicated matching? 241 242 if ( lhs.size() == rhs.size() ) {
Note: See TracChangeset
for help on using the changeset viewer.