Ignore:
Timestamp:
Mar 16, 2018, 5:15:02 PM (7 years ago)
Author:
Aaron Moss <a3moss@…>
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)
Message:

First pass at delete removal

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Tuples/Explode.cc

    r6171841 r68f9c43  
    7070                                // should now be a tuple of references rather than a reference to a tuple.
    7171                                // 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() };
    7473                                if ( castAdded ) {
    7574                                        // if a cast was added by applyCast, then unique expr now has one more layer of reference
     
    8887                                // field is consistent with the type of the tuple expr, since the field
    8988                                // 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() };
    9590                        }
    9691                };
Note: See TracChangeset for help on using the changeset viewer.