Changes in src/GenPoly/Specialize.cc [7754cde:803deb1]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/Specialize.cc
r7754cde r803deb1 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // Specialize.cc -- 7 // Specialize.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 : Tue Sep 22 14:04:13 201513 // Update Count : 1 512 // Last Modified On : Wed Jan 20 12:40:33 2016 13 // Update Count : 18 14 14 // 15 15 … … 140 140 return new AddressExpr( new VariableExpr( thunkFunc ) ); 141 141 } 142 142 143 143 Expression * Specialize::doSpecialization( Type *formalType, Expression *actual, InferredParams *inferParams ) { 144 assert( ! actual->get_results().empty() ); 144 145 if ( needsSpecialization( formalType, actual->get_results().front(), env ) ) { 145 146 FunctionType *funType; … … 198 199 Expression * Specialize::mutate( CastExpr *castExpr ) { 199 200 castExpr->get_arg()->acceptMutator( *this ); 201 if ( castExpr->get_results().empty() ) { 202 // can't specialize if we don't have a return value 203 return castExpr; 204 } 200 205 Expression *specialized = doSpecialization( castExpr->get_results().front(), castExpr->get_arg() ); 201 206 if ( specialized != castExpr->get_arg() ) {
Note: See TracChangeset
for help on using the changeset viewer.