Changeset bc1ab61 for src/GenPoly


Ignore:
Timestamp:
Apr 6, 2016, 5:13:09 PM (9 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
Children:
78885b5
Parents:
b3ab8f0
Message:

Clean up previous fix to comma expression boxing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/Box.cc

    rb3ab8f0 rbc1ab61  
    906906                                        // VariableExpr and MemberExpr are lvalues; need to check this isn't coming from the second arg of a comma expression though (not an lvalue)
    907907                                        if ( CommaExpr *commaArg = dynamic_cast< CommaExpr* >( arg ) ) {
    908                                                 // hoist first half of expression and return second
    909                                                 stmtsToAdd.push_back( new ExprStmt( noLabels, commaArg->get_arg1() ) );
    910                                                 arg = new AddressExpr( commaArg->get_arg2() );
    911                                                
    912                                                 commaArg->set_arg1( 0 );
    913                                                 commaArg->set_arg2( 0 );
    914                                                 delete commaArg;
     908                                                commaArg->set_arg2( new AddressExpr( commaArg->get_arg2() ) );
    915909                                        } else {
    916910                                                arg = new AddressExpr( arg );
Note: See TracChangeset for help on using the changeset viewer.