Changeset fea7ca7 for src/GenPoly/Box.cc


Ignore:
Timestamp:
Apr 29, 2016, 12:26:50 PM (6 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
aaron-thesis, arm-eh, 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, resolv-new, with_gc
Children:
d8ba086
Parents:
a0fdbd5
Message:

Account for lvalue returning functions in FixCopyCtor?, removed ConditionalExpr?, CommaExpr?, Logical Expr mutates from Specialize, added before box debug flag

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/Box.cc

    ra0fdbd5 rfea7ca7  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Mon Apr 18 13:22:15 2016
     12// Last Modified On : Fri Apr 29 12:16:11 2016
    1313// Update Count     : 295
    1414//
     
    911911                                } else if ( arg->get_results().front()->get_isLvalue() ) {
    912912                                        // VariableExpr and MemberExpr are lvalues; need to check this isn't coming from the second arg of a comma expression though (not an lvalue)
     913                                        // xxx - need to test that this code is still reachable
    913914                                        if ( CommaExpr *commaArg = dynamic_cast< CommaExpr* >( arg ) ) {
    914915                                                commaArg->set_arg2( new AddressExpr( commaArg->get_arg2() ) );
     
    13461347                                } // if
    13471348                        } // if
     1349                        // isPolyType check needs to happen before mutating addrExpr arg, so pull it forward
     1350                        // out of the if condition.
     1351                        bool polytype = isPolyType( addrExpr->get_arg()->get_results().front(), scopeTyVars, env );
    13481352                        addrExpr->set_arg( mutateExpression( addrExpr->get_arg() ) );
    1349                         if ( isPolyType( addrExpr->get_arg()->get_results().front(), scopeTyVars, env ) || needs ) {
     1353                        if ( polytype || needs ) {
    13501354                                Expression *ret = addrExpr->get_arg();
    13511355                                delete ret->get_results().front();
Note: See TracChangeset for help on using the changeset viewer.