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