Changes in / [5bf4712:e58be8e]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/Box.cc
r5bf4712 re58be8e 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Rob Schluntz 12 // Last Modified On : Thu Nov 26 17:01:55201513 // Update Count : 19112 // Last Modified On : Wed Dec 02 11:52:37 2015 13 // Update Count : 201 14 14 // 15 15 … … 183 183 } 184 184 185 // returns true if the given declaration is: (*?=?)(T *, T) for some T (return not checked, but maybe should be) 185 186 bool checkAssignment( DeclarationWithType *decl, std::string &name ) { 186 187 if ( decl->get_name() == "?=?" ) { … … 668 669 TypeInstType *typeInst1 = isPolyPtr( appExpr->get_args().front()->get_results().front(), env, scopeTyVars ); 669 670 TypeInstType *typeInst2 = isPolyPtr( appExpr->get_args().back()->get_results().front(), env, scopeTyVars ); 670 assert( ! typeInst1 || ! typeInst2 ); 671 assert( ! typeInst1 || ! typeInst2 ); // the arguments cannot both be polymorphic pointers 671 672 UntypedExpr *ret = 0; 672 if ( typeInst1 || typeInst2 ) { 673 if ( typeInst1 || typeInst2 ) { // one of the arguments is a polymorphic pointer 673 674 ret = new UntypedExpr( new NameExpr( "?+?" ) ); 674 675 } // if … … 866 867 867 868 Statement * Pass1::mutate(ReturnStmt *retStmt) { 868 // a cast expr on a polymorphic return value is either redundant or invalid869 // by this point, a cast expr on a polymorphic return value is redundant 869 870 while ( CastExpr *castExpr = dynamic_cast< CastExpr *>( retStmt->get_expr() ) ) { 870 871 retStmt->set_expr( castExpr->get_arg() );
Note:
See TracChangeset
for help on using the changeset viewer.