Changes in src/GenPoly/Specialize.cc [698664b3:7754cde]
- File:
-
- 1 edited
-
src/GenPoly/Specialize.cc (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/Specialize.cc
r698664b3 r7754cde 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 : Sat Jun 13 15:54:07201513 // Update Count : 611 // Last Modified By : Rob Schluntz 12 // Last Modified On : Tue Sep 22 14:04:13 2015 13 // Update Count : 15 14 14 // 15 15 … … 17 17 18 18 #include "Specialize.h" 19 #include "GenPoly.h" 19 20 #include "PolyMutator.h" 20 21 … … 87 88 } 88 89 89 /// Returns a pointer to the base FunctionType if ty is the type of a function (or pointer to one), NULL otherwise90 FunctionType * getFunctionType( Type *ty ) {91 PointerType *ptrType;92 if ( ( ptrType = dynamic_cast< PointerType* >( ty ) ) ) {93 return dynamic_cast< FunctionType* >( ptrType->get_base() ); // pointer if FunctionType, NULL otherwise94 } else {95 return dynamic_cast< FunctionType* >( ty ); // pointer if FunctionType, NULL otherwise96 }97 }98 99 90 /// Generates a thunk that calls `actual` with type `funType` and returns its address 100 91 Expression * Specialize::createThunkFunction( FunctionType *funType, Expression *actual, InferredParams *inferParams ) { … … 200 191 Expression * Specialize::mutate( AddressExpr *addrExpr ) { 201 192 addrExpr->get_arg()->acceptMutator( *this ); 193 assert( ! addrExpr->get_results().empty() ); 202 194 addrExpr->set_arg( doSpecialization( addrExpr->get_results().front(), addrExpr->get_arg() ) ); 203 195 return addrExpr;
Note:
See TracChangeset
for help on using the changeset viewer.