Changeset d29fa5f for src/GenPoly/Box.cc


Ignore:
Timestamp:
Oct 2, 2017, 4:58:51 PM (7 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:
effdde0
Parents:
bf4b4cf
Message:

Remove has_result

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/Box.cc

    rbf4b4cf rd29fa5f  
    600600
    601601                        // add size/align for generic types to parameter list
    602                         if ( ! appExpr->get_function()->has_result() ) return;
     602                        if ( ! appExpr->get_function()->result ) return;
    603603                        FunctionType *funcType = getFunctionType( appExpr->get_function()->get_result() );
    604604                        assert( funcType );
     
    714714
    715715                void Pass1::boxParam( Type *param, Expression *&arg, const TyVarMap &exprTyVars ) {
    716                         assertf( arg->has_result(), "arg does not have result: %s", toString( arg ).c_str() );
     716                        assertf( arg->result, "arg does not have result: %s", toString( arg ).c_str() );
    717717                        if ( isPolyType( param, exprTyVars ) ) {
    718718                                Type * newType = arg->get_result()->clone();
     
    965965                                if ( varExpr->get_var()->get_linkage() == LinkageSpec::Intrinsic ) {
    966966                                        if ( varExpr->get_var()->get_name() == "?[?]" ) {
    967                                                 assert( appExpr->has_result() );
     967                                                assert( appExpr->result );
    968968                                                assert( appExpr->get_args().size() == 2 );
    969969                                                Type *baseType1 = isPolyPtr( appExpr->get_args().front()->get_result(), scopeTyVars, env );
     
    999999                                                } // if
    10001000                                        } else if ( varExpr->get_var()->get_name() == "*?" ) {
    1001                                                 assert( appExpr->has_result() );
     1001                                                assert( appExpr->result );
    10021002                                                assert( ! appExpr->get_args().empty() );
    10031003                                                if ( isPolyType( appExpr->get_result(), scopeTyVars, env ) ) {
     
    10161016                                                } // if
    10171017                                        } else if ( varExpr->get_var()->get_name() == "?++" || varExpr->get_var()->get_name() == "?--" ) {
    1018                                                 assert( appExpr->has_result() );
     1018                                                assert( appExpr->result );
    10191019                                                assert( appExpr->get_args().size() == 1 );
    10201020                                                if ( Type *baseType = isPolyPtr( appExpr->get_result(), scopeTyVars, env ) ) {
     
    10361036                                                } // if
    10371037                                        } else if ( varExpr->get_var()->get_name() == "++?" || varExpr->get_var()->get_name() == "--?" ) {
    1038                                                 assert( appExpr->has_result() );
     1038                                                assert( appExpr->result );
    10391039                                                assert( appExpr->get_args().size() == 1 );
    10401040                                                if ( Type *baseType = isPolyPtr( appExpr->get_result(), scopeTyVars, env ) ) {
     
    10421042                                                } // if
    10431043                                        } else if ( varExpr->get_var()->get_name() == "?+?" || varExpr->get_var()->get_name() == "?-?" ) {
    1044                                                 assert( appExpr->has_result() );
     1044                                                assert( appExpr->result );
    10451045                                                assert( appExpr->get_args().size() == 2 );
    10461046                                                Type *baseType1 = isPolyPtr( appExpr->get_args().front()->get_result(), scopeTyVars, env );
     
    10681068                                                } // if
    10691069                                        } else if ( varExpr->get_var()->get_name() == "?+=?" || varExpr->get_var()->get_name() == "?-=?" ) {
    1070                                                 assert( appExpr->has_result() );
     1070                                                assert( appExpr->result );
    10711071                                                assert( appExpr->get_args().size() == 2 );
    10721072                                                Type *baseType = isPolyPtr( appExpr->get_result(), scopeTyVars, env );
     
    11621162                void Pass1::premutate( AddressExpr * ) { visit_children = false; }
    11631163                Expression * Pass1::postmutate( AddressExpr * addrExpr ) {
    1164                         assert( addrExpr->get_arg()->has_result() && ! addrExpr->get_arg()->get_result()->isVoid() );
     1164                        assert( addrExpr->get_arg()->result && ! addrExpr->get_arg()->get_result()->isVoid() );
    11651165
    11661166                        bool needs = false;
    11671167                        if ( UntypedExpr *expr = dynamic_cast< UntypedExpr *>( addrExpr->get_arg() ) ) {
    1168                                 if ( expr->has_result() && isPolyType( expr->get_result(), scopeTyVars, env ) ) {
     1168                                if ( expr->result && isPolyType( expr->get_result(), scopeTyVars, env ) ) {
    11691169                                        if ( NameExpr *name = dynamic_cast< NameExpr *>( expr->get_function() ) ) {
    11701170                                                if ( name->get_name() == "*?" ) {
    11711171                                                        if ( ApplicationExpr * appExpr = dynamic_cast< ApplicationExpr * >( expr->get_args().front() ) ) {
    1172                                                                 assert( appExpr->get_function()->has_result() );
     1172                                                                assert( appExpr->get_function()->result );
    11731173                                                                FunctionType *function = getFunctionType( appExpr->get_function()->get_result() );
    11741174                                                                assert( function );
Note: See TracChangeset for help on using the changeset viewer.