Changeset a64644c for src/Tuples
- Timestamp:
- Dec 14, 2016, 2:23:11 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:
- 1486116
- Parents:
- 1aa4b71
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Tuples/Explode.cc
r1aa4b71 ra64644c 23 23 Expression * applyAddr( Expression * expr, bool first = true ) { 24 24 if ( TupleExpr * tupleExpr = dynamic_cast< TupleExpr * >( expr ) ){ 25 foundUniqueExpr = true; 25 26 std::list< Expression * > exprs; 26 27 for ( Expression *& expr : tupleExpr->get_exprs() ) { … … 46 47 // should now be a tuple of addresses rather than the address of a tuple. 47 48 // Still, this code is a bit awkward, and could use some improvement. 48 foundUniqueExpr = true; 49 if ( dynamic_cast< AddressExpr * > ( uniqueExpr->get_expr() ) ) { 50 // this unique expression has already been mutated or otherwise shouldn't be (can't take the address-of an address-of expression) 51 return uniqueExpr; 52 } 49 53 UniqueExpr * newUniqueExpr = new UniqueExpr( applyAddr( uniqueExpr->get_expr() ), uniqueExpr->get_id() ); 50 54 delete uniqueExpr;
Note: See TracChangeset
for help on using the changeset viewer.