Changeset fea7ca7 for src/GenPoly
- Timestamp:
- Apr 29, 2016, 12:26:50 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- d8ba086
- Parents:
- a0fdbd5
- Location:
- src/GenPoly
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/Box.cc
ra0fdbd5 rfea7ca7 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Rob Schluntz 12 // Last Modified On : Mon Apr 18 13:22:15201612 // Last Modified On : Fri Apr 29 12:16:11 2016 13 13 // Update Count : 295 14 14 // … … 911 911 } else if ( arg->get_results().front()->get_isLvalue() ) { 912 912 // VariableExpr and MemberExpr are lvalues; need to check this isn't coming from the second arg of a comma expression though (not an lvalue) 913 // xxx - need to test that this code is still reachable 913 914 if ( CommaExpr *commaArg = dynamic_cast< CommaExpr* >( arg ) ) { 914 915 commaArg->set_arg2( new AddressExpr( commaArg->get_arg2() ) ); … … 1346 1347 } // if 1347 1348 } // if 1349 // isPolyType check needs to happen before mutating addrExpr arg, so pull it forward 1350 // out of the if condition. 1351 bool polytype = isPolyType( addrExpr->get_arg()->get_results().front(), scopeTyVars, env ); 1348 1352 addrExpr->set_arg( mutateExpression( addrExpr->get_arg() ) ); 1349 if ( isPolyType( addrExpr->get_arg()->get_results().front(), scopeTyVars, env )|| needs ) {1353 if ( polytype || needs ) { 1350 1354 Expression *ret = addrExpr->get_arg(); 1351 1355 delete ret->get_results().front(); -
src/GenPoly/Specialize.cc
ra0fdbd5 rfea7ca7 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Rob Schluntz 12 // Last Modified On : Wed Jan 20 13:00:00201612 // Last Modified On : Thu Apr 28 15:17:45 2016 13 13 // Update Count : 24 14 14 // … … 41 41 virtual Expression * mutate( AddressExpr *castExpr ); 42 42 virtual Expression * mutate( CastExpr *castExpr ); 43 virtual Expression * mutate( LogicalExpr *logicalExpr );44 virtual Expression * mutate( ConditionalExpr *conditionalExpr );45 virtual Expression * mutate( CommaExpr *commaExpr );43 // virtual Expression * mutate( LogicalExpr *logicalExpr ); 44 // virtual Expression * mutate( ConditionalExpr *conditionalExpr ); 45 // virtual Expression * mutate( CommaExpr *commaExpr ); 46 46 47 47 private: … … 212 212 } 213 213 214 Expression * Specialize::mutate( LogicalExpr *logicalExpr ) { 215 return logicalExpr; 216 } 217 218 Expression * Specialize::mutate( ConditionalExpr *condExpr ) { 219 return condExpr; 220 } 221 222 Expression * Specialize::mutate( CommaExpr *commaExpr ) { 223 return commaExpr; 224 } 214 // Removing these for now. Richard put these in for some reason, but it's not clear why. 215 // In particular, copy constructors produce a comma expression, and with this code the parts 216 // of that comma expression are not specialized, which causes problems. 217 218 // Expression * Specialize::mutate( LogicalExpr *logicalExpr ) { 219 // return logicalExpr; 220 // } 221 222 // Expression * Specialize::mutate( ConditionalExpr *condExpr ) { 223 // return condExpr; 224 // } 225 226 // Expression * Specialize::mutate( CommaExpr *commaExpr ) { 227 // return commaExpr; 228 // } 225 229 } // namespace GenPoly 226 230
Note: See TracChangeset
for help on using the changeset viewer.