Changeset d7dc824 for src/GenPoly/Box.cc
- Timestamp:
- Jun 7, 2017, 4:53:42 PM (7 years ago)
- 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:
- c77fd8b, ec95d11
- Parents:
- af397ef8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/Box.cc
raf397ef8 rd7dc824 110 110 Type *replaceWithConcrete( ApplicationExpr *appExpr, Type *type, bool doClone = true ); 111 111 /// wraps a function application returning a polymorphic type with a new temporary for the out-parameter return value 112 Expression *addDynRetParam( ApplicationExpr *appExpr, FunctionType *function,Type *polyType, std::list< Expression *>::iterator &arg );112 Expression *addDynRetParam( ApplicationExpr *appExpr, Type *polyType, std::list< Expression *>::iterator &arg ); 113 113 Expression *applyAdapter( ApplicationExpr *appExpr, FunctionType *function, std::list< Expression *>::iterator &arg, const TyVarMap &exprTyVars ); 114 114 void boxParam( Type *formal, Expression *&arg, const TyVarMap &exprTyVars ); … … 728 728 } 729 729 730 Expression *Pass1::addDynRetParam( ApplicationExpr *appExpr, FunctionType *function,Type *dynType, std::list< Expression *>::iterator &arg ) {730 Expression *Pass1::addDynRetParam( ApplicationExpr *appExpr, Type *dynType, std::list< Expression *>::iterator &arg ) { 731 731 assert( env ); 732 732 Type *concrete = replaceWithConcrete( appExpr, dynType ); … … 1148 1148 if ( dynRetType ) { 1149 1149 Type *concRetType = appExpr->get_result()->isVoid() ? nullptr : appExpr->get_result(); 1150 ret = addDynRetParam( appExpr, function,concRetType, arg ); // xxx - used to use dynRetType instead of concRetType1150 ret = addDynRetParam( appExpr, concRetType, arg ); // xxx - used to use dynRetType instead of concRetType 1151 1151 } else if ( needsAdapter( function, scopeTyVars ) && ! needsAdapter( function, exprTyVars) ) { // xxx - exprTyVars is used above...? 1152 1152 // xxx - the ! needsAdapter check may be incorrect. It seems there is some situation where an adapter is applied where it shouldn't be, and this fixes it for some cases. More investigation is needed.
Note: See TracChangeset
for help on using the changeset viewer.