Changeset 68f9c43 for src/Tuples/Explode.cc
- Timestamp:
- Mar 16, 2018, 5:15:02 PM (7 years ago)
- Branches:
- new-env, with_gc
- Children:
- 8d7bef2
- Parents:
- 6171841
- git-author:
- Aaron Moss <a3moss@…> (03/16/18 17:04:24)
- git-committer:
- Aaron Moss <a3moss@…> (03/16/18 17:15:02)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Tuples/Explode.cc
r6171841 r68f9c43 70 70 // should now be a tuple of references rather than a reference to a tuple. 71 71 // Still, this code is a bit awkward, and could use some improvement. 72 UniqueExpr * newUniqueExpr = new UniqueExpr( applyCast( uniqueExpr->get_expr() ), uniqueExpr->get_id() ); 73 delete uniqueExpr; 72 UniqueExpr * newUniqueExpr = new UniqueExpr{ applyCast( uniqueExpr->get_expr() ), uniqueExpr->get_id() }; 74 73 if ( castAdded ) { 75 74 // if a cast was added by applyCast, then unique expr now has one more layer of reference … … 88 87 // field is consistent with the type of the tuple expr, since the field 89 88 // may have changed from type T to T&. 90 Expression * expr = tupleExpr->get_tuple(); 91 tupleExpr->set_tuple( nullptr ); 92 TupleIndexExpr * ret = new TupleIndexExpr( expr, tupleExpr->get_index() ); 93 delete tupleExpr; 94 return ret; 89 return new TupleIndexExpr{ tupleExpr->get_tuple(), tupleExpr->get_index() }; 95 90 } 96 91 };
Note: See TracChangeset
for help on using the changeset viewer.