Changeset 1cced28


Ignore:
Timestamp:
Dec 30, 2015, 9:07:10 AM (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:
784deab, b18b0b5
Parents:
de91427b
Message:

box arguments to generic parameters

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/Box.cc

    rde91427b r1cced28  
    412412                void Pass1::boxParam( Type *param, Expression *&arg, const TyVarMap &exprTyVars ) {
    413413                        assert( ! arg->get_results().empty() );
    414 //   if ( ! dynamic_cast< PointerType *>( arg->get_results().front() ) ) {
    415                         TypeInstType *typeInst = dynamic_cast< TypeInstType *>( param );
    416                         if ( typeInst && exprTyVars.find( typeInst->get_name() ) != exprTyVars.end() ) {
     414                        if ( isPolyType( param, exprTyVars ) ) {
    417415                                if ( dynamic_cast< TypeInstType *>( arg->get_results().front() ) ) {
    418416                                        // if the argument's type is a type parameter, we don't need to box again!
     
    432430                                } // if
    433431                        } // if
    434 //   }
    435432                }
    436433
Note: See TracChangeset for help on using the changeset viewer.