Changeset d335627 for src/GenPoly/Box.cc


Ignore:
Timestamp:
Jul 25, 2017, 10:48:07 AM (8 years ago)
Author:
Rob Schluntz <rschlunt@…>
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:
8a6cf7e
Parents:
6d267ca
Message:

Add address-of to intrinsic reference-returning functions that are arguments to non-intrinsic functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/Box.cc

    r6d267ca rd335627  
    10271027                                                } // if
    10281028                                                if ( baseType1 || baseType2 ) {
    1029                                                         ret->set_result( appExpr->get_result()->clone() );
     1029                                                        Type * baseType = InitTweak::getPointerBase( appExpr->get_result() );
     1030                                                        assert( baseType );
     1031                                                        ret->set_result( baseType->clone() );
    10301032                                                        if ( appExpr->get_env() ) {
    10311033                                                                ret->set_env( appExpr->get_env() );
     
    12221224                        // isPolyType check needs to happen before mutating addrExpr arg, so pull it forward
    12231225                        // out of the if condition.
     1226                        addrExpr->set_arg( mutateExpression( addrExpr->get_arg() ) );
     1227                        // ... but must happen after mutate, since argument might change (e.g. intrinsic *?, ?[?]) - re-evaluate above comment
    12241228                        bool polytype = isPolyType( addrExpr->get_arg()->get_result(), scopeTyVars, env );
    1225                         addrExpr->set_arg( mutateExpression( addrExpr->get_arg() ) );
    12261229                        if ( polytype || needs ) {
    12271230                                Expression *ret = addrExpr->get_arg();
Note: See TracChangeset for help on using the changeset viewer.