Changeset a32b204 for translator/GenPoly/GenPoly.cc
- Timestamp:
- May 17, 2015, 1:19:35 PM (9 years ago)
- 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:
- 0dd3a2f
- Parents:
- b87a5ed
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
translator/GenPoly/GenPoly.cc
rb87a5ed ra32b204 26 26 isPolyVal( Type *type, const TyVarMap &tyVars, bool considerAllTyVars ) 27 27 { 28 if ( TypeInstType *typeInst = dynamic_cast< TypeInstType* >( type ) ) {29 if ( tyVars.find( typeInst->get_name() ) != tyVars.end() ) {28 if ( TypeInstType *typeInst = dynamic_cast< TypeInstType* >( type ) ) { 29 if ( tyVars.find( typeInst->get_name() ) != tyVars.end() ) { 30 30 return true; 31 31 } … … 41 41 { 42 42 bool needsAdapter = false; 43 if ( !adaptee->get_returnVals().empty() && isPolyVal( adaptee->get_returnVals().front()->get_type(), tyVars, considerAllTyVars ) ) {43 if ( ! adaptee->get_returnVals().empty() && isPolyVal( adaptee->get_returnVals().front()->get_type(), tyVars, considerAllTyVars ) ) { 44 44 needsAdapter = true; 45 45 } 46 for ( std::list< DeclarationWithType* >::const_iterator innerArg = adaptee->get_parameters().begin(); !needsAdapter && innerArg != adaptee->get_parameters().end(); ++innerArg ) {47 if ( isPolyVal( (*innerArg)->get_type(), tyVars, considerAllTyVars ) ) {46 for ( std::list< DeclarationWithType* >::const_iterator innerArg = adaptee->get_parameters().begin(); ! needsAdapter && innerArg != adaptee->get_parameters().end(); ++innerArg ) { 47 if ( isPolyVal( (*innerArg)->get_type(), tyVars, considerAllTyVars ) ) { 48 48 needsAdapter = true; 49 49 } … … 56 56 printTyVarMap( std::ostream &os, const TyVarMap &tyVarMap ) 57 57 { 58 for ( TyVarMap::const_iterator i = tyVarMap.begin(); i != tyVarMap.end(); ++i ) {58 for ( TyVarMap::const_iterator i = tyVarMap.begin(); i != tyVarMap.end(); ++i ) { 59 59 os << i->first << " (" << i->second << ") "; 60 60 }
Note: See TracChangeset
for help on using the changeset viewer.