Changes in src/GenPoly/GenPoly.cc [d76c588:682dcae]
- File:
-
- 1 edited
-
src/GenPoly/GenPoly.cc (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/GenPoly.cc
rd76c588 r682dcae 24 24 #include <vector> // for vector 25 25 26 #include "AST/Type.hpp"27 26 #include "GenPoly/ErasableScopedMap.h" // for ErasableScopedMap<>::const_it... 28 27 #include "ResolvExpr/typeops.h" // for flatten … … 263 262 } else { 264 263 return dynamic_cast< FunctionType* >( ty ); // pointer if FunctionType, NULL otherwise 265 }266 }267 268 const ast::FunctionType * getFunctionType( const ast::Type * ty ) {269 if ( auto pty = dynamic_cast< const ast::PointerType * >( ty ) ) {270 return pty->base.as< ast::FunctionType >();271 } else {272 return dynamic_cast< const ast::FunctionType * >( ty );273 264 } 274 265 } … … 449 440 } 450 441 451 bool needsBoxing( Type * param, Type * arg, const TyVarMap &exprTyVars, constTypeSubstitution * env ) {442 bool needsBoxing( Type * param, Type * arg, const TyVarMap &exprTyVars, TypeSubstitution * env ) { 452 443 // is parameter is not polymorphic, don't need to box 453 444 if ( ! isPolyType( param, exprTyVars ) ) return false; … … 459 450 } 460 451 461 bool needsBoxing( Type * param, Type * arg, ApplicationExpr * appExpr, constTypeSubstitution * env ) {452 bool needsBoxing( Type * param, Type * arg, ApplicationExpr * appExpr, TypeSubstitution * env ) { 462 453 FunctionType * function = getFunctionType( appExpr->function->result ); 463 454 assertf( function, "ApplicationExpr has non-function type: %s", toString( appExpr->function->result ).c_str() );
Note:
See TracChangeset
for help on using the changeset viewer.