Changes in / [aadb0c8:8a3d5e7]
- File:
-
- 1 edited
-
src/GenPoly/Box.cc (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/Box.cc
raadb0c8 r8a3d5e7 95 95 /// Pass the extra type parameters from polymorphic generic arguments or return types into a function application 96 96 /// Will insert 0, 2 or 3 more arguments. 97 std::list< Expression *>::iterator passArgTypeVars( ApplicationExpr *appExpr, Type *parmType, Type *argBaseType, std::list< Expression *>::iteratorarg, const TyVarMap &exprTyVars, std::set< std::string > &seenTypes );97 void passArgTypeVars( ApplicationExpr *appExpr, Type *parmType, Type *argBaseType, std::list< Expression *>::iterator &arg, const TyVarMap &exprTyVars, std::set< std::string > &seenTypes ); 98 98 /// passes extra type parameters into a polymorphic function application 99 99 /// Returns an iterator to the first argument after the added … … 531 531 } 532 532 533 std::list< Expression *>::iterator Pass1::passArgTypeVars( ApplicationExpr *appExpr, Type *parmType, Type *argBaseType, std::list< Expression *>::iteratorarg, const TyVarMap &exprTyVars, std::set< std::string > &seenTypes ) {533 void Pass1::passArgTypeVars( ApplicationExpr *appExpr, Type *parmType, Type *argBaseType, std::list< Expression *>::iterator &arg, const TyVarMap &exprTyVars, std::set< std::string > &seenTypes ) { 534 534 Type *polyType = isPolyType( parmType, exprTyVars ); 535 535 if ( polyType && ! dynamic_cast< TypeInstType* >( polyType ) ) { 536 536 std::string typeName = mangleType( polyType ); 537 if ( seenTypes.count( typeName ) ) return arg;537 if ( seenTypes.count( typeName ) ) return; 538 538 539 539 arg = appExpr->get_args().insert( arg, new SizeofExpr( argBaseType->clone() ) ); … … 555 555 seenTypes.insert( typeName ); 556 556 } 557 return arg;558 557 } 559 558 … … 594 593 if ( polyRetType ) { 595 594 Type *concRetType = replaceWithConcrete( polyRetType, env ); 596 arg =passArgTypeVars( appExpr, polyRetType, concRetType, arg, exprTyVars, seenTypes );595 passArgTypeVars( appExpr, polyRetType, concRetType, arg, exprTyVars, seenTypes ); 597 596 // Skip the return parameter in the argument list. 598 597 fnArg = arg + 1; … … 606 605 Type * argType = (*fnArg)->get_result(); 607 606 if ( ! argType ) continue; 608 arg =passArgTypeVars( appExpr, (*fnParm)->get_type(), argType, arg, exprTyVars, seenTypes );607 passArgTypeVars( appExpr, (*fnParm)->get_type(), argType, arg, exprTyVars, seenTypes ); 609 608 } 610 609 return arg;
Note:
See TracChangeset
for help on using the changeset viewer.