Ignore:
Timestamp:
Jun 5, 2017, 1:59:11 PM (7 years ago)
Author:
Thierry Delisle <tdelisle@…>
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:
7b13aeb
Parents:
b3c36f4
Message:

Some more unused argument removal, also removed some functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/Box.cc

    rb3c36f4 r7e003011  
    103103                        void passTypeVars( ApplicationExpr *appExpr, Type *polyRetType, std::list< Expression *>::iterator &arg, const TyVarMap &exprTyVars );
    104104                        /// wraps a function application with a new temporary for the out-parameter return value
    105                         Expression *addRetParam( ApplicationExpr *appExpr, FunctionType *function, Type *retType, std::list< Expression *>::iterator &arg );
     105                        Expression *addRetParam( ApplicationExpr *appExpr, Type *retType, std::list< Expression *>::iterator &arg );
    106106                        /// Replaces all the type parameters of a generic type with their concrete equivalents under the current environment
    107107                        void replaceParametersWithConcrete( ApplicationExpr *appExpr, std::list< Expression* >& params );
     
    136136                  public:
    137137                        template< typename DeclClass >
    138                         DeclClass *handleDecl( DeclClass *decl, Type *type );
     138                        DeclClass *handleDecl( DeclClass *decl );
    139139                        template< typename AggDecl >
    140140                        AggDecl * handleAggDecl( AggDecl * aggDecl );
     
    665665                }
    666666
    667                 Expression *Pass1::addRetParam( ApplicationExpr *appExpr, FunctionType *function, Type *retType, std::list< Expression *>::iterator &arg ) {
     667                Expression *Pass1::addRetParam( ApplicationExpr *appExpr, Type *retType, std::list< Expression *>::iterator &arg ) {
    668668                        // Create temporary to hold return value of polymorphic function and produce that temporary as a result
    669669                        // using a comma expression.
     
    732732                        Type *concrete = replaceWithConcrete( appExpr, dynType );
    733733                        // add out-parameter for return value
    734                         return addRetParam( appExpr, function, concrete, arg );
     734                        return addRetParam( appExpr, concrete, arg );
    735735                }
    736736
     
    739739//                      if ( ! function->get_returnVals().empty() && isPolyType( function->get_returnVals().front()->get_type(), tyVars ) ) {
    740740                        if ( isDynRet( function, tyVars ) ) {
    741                                 ret = addRetParam( appExpr, function, function->get_returnVals().front()->get_type(), arg );
     741                                ret = addRetParam( appExpr, function->get_returnVals().front()->get_type(), arg );
    742742                        } // if
    743743                        std::string mangleName = mangleAdapterName( function, tyVars );
     
    12821282
    12831283                template< typename DeclClass >
    1284                 DeclClass * Pass2::handleDecl( DeclClass *decl, Type *type ) {
     1284                DeclClass * Pass2::handleDecl( DeclClass *decl ) {
    12851285                        DeclClass *ret = static_cast< DeclClass *>( Parent::mutate( decl ) );
    12861286
     
    12961296
    12971297                DeclarationWithType * Pass2::mutate( FunctionDecl *functionDecl ) {
    1298                         functionDecl = safe_dynamic_cast< FunctionDecl * > ( handleDecl( functionDecl, functionDecl->get_functionType() ) );
     1298                        functionDecl = safe_dynamic_cast< FunctionDecl * > ( handleDecl( functionDecl ) );
    12991299                        FunctionType * ftype = functionDecl->get_functionType();
    13001300                        if ( ! ftype->get_returnVals().empty() && functionDecl->get_statements() ) {
     
    13211321
    13221322                ObjectDecl * Pass2::mutate( ObjectDecl *objectDecl ) {
    1323                         return handleDecl( objectDecl, objectDecl->get_type() );
     1323                        return handleDecl( objectDecl );
    13241324                }
    13251325
     
    13441344                        addToTyVarMap( typeDecl, scopeTyVars );
    13451345                        if ( typeDecl->get_base() ) {
    1346                                 return handleDecl( typeDecl, typeDecl->get_base() );
     1346                                return handleDecl( typeDecl );
    13471347                        } else {
    13481348                                return Parent::mutate( typeDecl );
     
    13511351
    13521352                TypedefDecl * Pass2::mutate( TypedefDecl *typedefDecl ) {
    1353                         return handleDecl( typedefDecl, typedefDecl->get_base() );
     1353                        return handleDecl( typedefDecl );
    13541354                }
    13551355
Note: See TracChangeset for help on using the changeset viewer.