Changeset 436c0de for src/GenPoly
- Timestamp:
- Jun 18, 2017, 9:22:22 AM (8 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:
- f1e80d8
- Parents:
- ade20d0 (diff), 42b0d73 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- src/GenPoly
- Files:
-
- 2 edited
-
Box.cc (modified) (3 diffs)
-
Specialize.cc (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/Box.cc
rade20d0 r436c0de 108 108 Type *replaceWithConcrete( ApplicationExpr *appExpr, Type *type, bool doClone = true ); 109 109 /// wraps a function application returning a polymorphic type with a new temporary for the out-parameter return value 110 Expression *addDynRetParam( ApplicationExpr *appExpr, FunctionType *function,Type *polyType, std::list< Expression *>::iterator &arg );110 Expression *addDynRetParam( ApplicationExpr *appExpr, Type *polyType, std::list< Expression *>::iterator &arg ); 111 111 Expression *applyAdapter( ApplicationExpr *appExpr, FunctionType *function, std::list< Expression *>::iterator &arg, const TyVarMap &exprTyVars ); 112 112 void boxParam( Type *formal, Expression *&arg, const TyVarMap &exprTyVars ); … … 726 726 } 727 727 728 Expression *Pass1::addDynRetParam( ApplicationExpr *appExpr, FunctionType *function,Type *dynType, std::list< Expression *>::iterator &arg ) {728 Expression *Pass1::addDynRetParam( ApplicationExpr *appExpr, Type *dynType, std::list< Expression *>::iterator &arg ) { 729 729 assert( env ); 730 730 Type *concrete = replaceWithConcrete( appExpr, dynType ); … … 1146 1146 if ( dynRetType ) { 1147 1147 Type *concRetType = appExpr->get_result()->isVoid() ? nullptr : appExpr->get_result(); 1148 ret = addDynRetParam( appExpr, function,concRetType, arg ); // xxx - used to use dynRetType instead of concRetType1148 ret = addDynRetParam( appExpr, concRetType, arg ); // xxx - used to use dynRetType instead of concRetType 1149 1149 } else if ( needsAdapter( function, scopeTyVars ) && ! needsAdapter( function, exprTyVars) ) { // xxx - exprTyVars is used above...? 1150 1150 // 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. -
src/GenPoly/Specialize.cc
rade20d0 r436c0de 93 93 } 94 94 95 bool needsTupleSpecialization( Type *formalType, Type *actualType , TypeSubstitution *env) {95 bool needsTupleSpecialization( Type *formalType, Type *actualType ) { 96 96 // Needs tuple specialization if the structure of the formal type and actual type do not match. 97 97 // This is the case if the formal type has ttype polymorphism, or if the structure of tuple types … … 112 112 113 113 bool needsSpecialization( Type *formalType, Type *actualType, TypeSubstitution *env ) { 114 return needsPolySpecialization( formalType, actualType, env ) || needsTupleSpecialization( formalType, actualType , env);114 return needsPolySpecialization( formalType, actualType, env ) || needsTupleSpecialization( formalType, actualType ); 115 115 } 116 116
Note:
See TracChangeset
for help on using the changeset viewer.