Changeset 540de412 for src/GenPoly
- Timestamp:
- May 2, 2016, 3:09:08 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, with_gc
- Children:
- fbfde843
- Parents:
- d8ba086
- Location:
- src/GenPoly
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/Box.cc
rd8ba086 r540de412 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Rob Schluntz 12 // Last Modified On : Fri Apr 29 12:16:11 201612 // Last Modified On : Mon May 02 14:49:01 2016 13 13 // Update Count : 295 14 14 // … … 785 785 } else { 786 786 /// xxx - should this be an assertion? 787 throw SemanticError( "unbound type variable in application ", appExpr );787 throw SemanticError( "unbound type variable: " + tyParm->first + " in application ", appExpr ); 788 788 } // if 789 789 } // if -
src/GenPoly/GenPoly.cc
rd8ba086 r540de412 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // GenPoly.cc -- 7 // GenPoly.cc -- 8 8 // 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Tue Dec 15 16:11:18 201511 // Last Modified By : Rob Schluntz 12 // Last Modified On : Mon May 02 14:53:33 2016 13 13 // Update Count : 13 14 14 // … … 81 81 return 0; 82 82 } 83 83 84 84 Type *isPolyType( Type *type, const TyVarMap &tyVars, const TypeSubstitution *env ) { 85 85 if ( TypeInstType *typeInst = dynamic_cast< TypeInstType * >( type ) ) { … … 112 112 return 0; 113 113 } 114 114 115 115 Type *isPolyPtr( Type *type, const TyVarMap &tyVars, const TypeSubstitution *env ) { 116 116 if ( PointerType *ptr = dynamic_cast< PointerType *>( type ) ) { … … 146 146 return isPolyType( type, env ); 147 147 } 148 148 149 149 Type * hasPolyBase( Type *type, const TyVarMap &tyVars, int *levels, const TypeSubstitution *env ) { 150 150 int dummy; … … 192 192 if ( ! fn || fn->get_name() != std::string("*?") ) return 0; 193 193 expr = *untypedExpr->begin_args(); 194 } else if ( CommaExpr *commaExpr = dynamic_cast< CommaExpr* >( expr ) ) { 195 // copy constructors insert comma exprs, look at second argument which contains the variable 196 expr = commaExpr->get_arg2(); 197 continue; 194 198 } else break; 195 199 … … 209 213 } 210 214 } 211 215 212 216 void printTyVarMap( std::ostream &os, const TyVarMap &tyVarMap ) { 213 217 for ( TyVarMap::const_iterator i = tyVarMap.begin(); i != tyVarMap.end(); ++i ) { -
src/GenPoly/PolyMutator.cc
rd8ba086 r540de412 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // PolyMutator.cc -- 7 // PolyMutator.cc -- 8 8 // 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Rob Schluntz 12 // Last Modified On : Fri Aug 14 15:28:50 201512 // Last Modified On : Mon May 02 14:50:58 2016 13 13 // Update Count : 11 14 14 // … … 63 63 env = expr->get_env(); 64 64 } 65 // xxx - should env be cloned (or moved) onto the result of the mutate? 65 66 return expr->acceptMutator( *this ); 66 67 } else { … … 144 145 return untypedExpr; 145 146 } 146 147 147 148 148 149 Initializer *PolyMutator::mutate( SingleInit *singleInit ) { 149 150 singleInit->set_value( mutateExpression( singleInit->get_value() ) );
Note: See TracChangeset
for help on using the changeset viewer.